Querying Task Statuses in Batches¶
Function¶
This API is used to query task statuses in batches by task ID.
URI¶
POST /v3/{project_id}/jobs/batch-status
Parameter | Mandatory | Type | Description |
---|---|---|---|
project_id | Yes | String | Project ID of a tenant in a region |
Request Parameters¶
Parameter | Mandatory | Type | Description |
---|---|---|---|
Content-Type | Yes | String | The content type. The default value is application/json. |
X-Auth-Token | Yes | String | User token obtained from IAM. |
X-Language | No | String | Request language type Default value: en-us Values:
|
Parameter | Mandatory | Type | Description |
---|---|---|---|
jobs | Yes | Array of strings | Querying task details in batches |
page_req | No | PageReq object | Pagination information. |
Parameter | Mandatory | Type | Description |
---|---|---|---|
cur_page | No | Integer | Current page number, which cannot exceed the maximum number of pages. (Number of pages = Number of transferred job IDs/Number of tasks on each page)
|
per_page | No | Integer | Number of items on each page. If this parameter is set to 0, all items are obtained.
|
Response Parameters¶
Status code: 200
Parameter | Type | Description |
---|---|---|
results | Array of QueryJobStatusResp objects | Task status information |
count | Integer | Number of returned tasks. |
Parameter | Type | Description |
---|---|---|
id | String | Task ID. |
status | String | Task status. Values:
|
error_code | String | Error code, which is optional and indicates the returned information about the failure status. |
error_message | String | Error message, which is optional and indicates the returned information about the failure status. |
Example Request¶
Example of querying task statuses in batches:
https://{EndPoint}/v3/054ba152d480d55b2f5dc0069e7ddef0/jobs/batch-status
{
"jobs" : [ "9a470239-2308-4bb5-a6bc-1040402fjb21", "dc67695a-ee3e-49b8-a022-a099bd81jb21" ],
"page_req" : {
"cur_page" : 1,
"per_page" : 10
}
}
Example Response¶
Status code: 200
OK
{
"results" : [ {
"id" : "9a470239-2308-4bb5-a6bc-1040402fjb21",
"status" : "INCRE_TRANSFER_STARTED"
}, {
"id" : "dc67695a-ee3e-49b8-a022-a099bd81jb21",
"status" : "INCRE_TRANSFER_FAILED"
} ],
"count" : 2
}
Status Code¶
Status Code | Description |
---|---|
200 | OK |
400 | Bad Request |
Error Code¶
For details, see Error Code.