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 For details about how to obtain the project ID, see Obtaining a Project ID. |
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 |
Object |
Pagination information. For details, see Table 4. |
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 objects |
Task status information For details, see Table 6. |
count |
Integer |
Number of returned tasks. |
Parameter |
Type |
Description |
---|---|---|
id |
String |
Task ID. |
status |
String |
Task status.
Enumerated values:
|
error_code |
String |
Error code. |
error_message |
String |
Error message. |
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.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.