Skip to main content

Get Job Status

Check the status of a Knowledge Base import job.

GET
/api/v1/indices/rag/index_job/status
cURL
curl -G "https://{workspaceId}.cn-beijing.maas.aliyuncs.com/api/v1/indices/rag/index_job/status" \
  -H "Authorization: Bearer $DASHSCOPE_API_KEY" \
  -d "index_id=your_index_id" \
  -d "job_id=your_job_id"
{
  "code": "Success",
  "status_code": 200,
  "data": {
    "id": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
    "ingestion_status": "COMPLETED",
    "ingestion_message": "COMPLETED",
    "total_count": 4,
    "rows": [
      {
        "code": "FINISH",
        "doc_id": "file_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx_xxxxxx",
        "doc_name": "sample_document",
        "doc_type": "pdf",
        "size": 191166,
        "status": "FINISH",
        "message": "Index build succeeded",
        "ingestion_id": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
        "dataSync": false,
        "canDelete": true,
        "meta_extract_info": [],
        "gmt_modified": 1782209511000
      }
    ],
    "page_number": 1,
    "page_size": 10,
    "started_at": 1782209506000,
    "ended_at": 1782209512000,
    "created_at": 1782209506000,
    "updated_at": 1782209512000
  },
  "success": true,
  "message": "success",
  "request_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "SUCCESS"
}
When the Knowledge Base has no import job in progress, this endpoint may return SystemError. Call it after submitting an import job.

Authorizations

string
header
required

DashScope API Key, obtained from the API Key page in the console.

Query Parameters

string
required

Knowledge Base ID — the pipelineId returned when the Knowledge Base was created.

length >= 1
string
required

Import job ID. This is the ingestionId returned by the Submit Job endpoint, or the ingestion_id field in the document list. Both index_id and job_id must be provided — passing only index_id returns SystemError.

length >= 1

Response

200-application/json
string

Response code. Success on success.

integer

HTTP status code.

string

Unique request identifier. Include this ID when reporting an issue.

object
boolean

Whether the request succeeded.

string

Informational message; success on success.

string

Request status: SUCCESS or FAILED.