Querying Task Statuses in Batches
Function
This API is used to query task statuses in batches by task ID.
Debugging
You can debug the API in API Explorer to support automatic authentication. API Explorer can automatically generate and debug example SDK code.
Authorization Information
Each account has all the permissions required to call all APIs, but IAM users must be assigned the required permissions. For details about the required permissions, see Permissions and Supported Actions.
URI
POST /v3/{project_id}/jobs/batch-status
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| project_id | Yes | String | Definition Project ID of a tenant in a region. For details about how to obtain the project ID, see Obtaining a Project ID. Constraints N/A Range N/A Default Value N/A |
Request Parameters
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| Content-Type | Yes | String | Definition MIME type of the request body. Use the default value application/json. For APIs used to upload objects or images, the value varies depending on the flow type. Constraints N/A Range application/json Default Value application/json |
| X-Auth-Token | Yes | String | Definition User token obtained from IAM. It is a response to the API for obtaining a user token. This API is the only one that does not require authentication. The token is the value of X-Subject-Token in the response header. Constraints N/A Range N/A Default Value N/A |
| X-Language | No | String | Definition Request language type. Constraints N/A Range
Default Value en-us |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| jobs | Yes | Array of strings | Definition Task IDs for batch query. This parameter is used to specify one or more tasks to be queried. Constraints N/A Range N/A Default Value N/A |
| page_req | No | Object | Definition Pagination information. For details, see Table 4. |
Response Parameters
Status code: 200
| Parameter | Type | Description |
|---|---|---|
| results | Array of objects | Definition Task status information For details, see Table 6. |
| count | Integer | Definition Number of returned tasks. Constraints N/A Range N/A |
| Parameter | Type | Description |
|---|---|---|
| id | String | Definition Task ID, which is used to identify the task corresponding to the query result. |
| status | String | Definition Task status. Constraints N/A Range
|
| error_code | String | Definition Error code returned if the task fails. Constraints N/A Range The value is in the format of DRS.XXXXXX. |
| error_message | String | Definition Error message returned if the task fails. Constraints N/A Range N/A |
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
} Error Code
For details, see Error Code.
What is your overall rating for this page?
Thank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot