forked from docs/doc-exports
Reviewed-by: Kacur, Michal <michal.kacur@t-systems.com> Co-authored-by: Xiong, Chen Xiao <chenxiaoxiong@huawei.com> Co-committed-by: Xiong, Chen Xiao <chenxiaoxiong@huawei.com>
23 KiB
23 KiB
Querying a System Task
Function
This API is used to query details about asynchronous tasks.
URI
- Parameter description
Table 1 URI parameters Parameter
Mandatory
Type
Description
project_id
Yes
String
Project ID. For details about how to obtain a project ID, see Project ID and Account ID.
task_id
Yes
String
Task ID.
Request
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
workspace |
No |
String |
Workspace ID.
|
Response
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
id |
Yes |
String |
Task ID. |
name |
Yes |
String |
Name of the task. |
startTime |
Yes |
Long |
Start time. |
endTime |
No |
Long |
End time. |
lastUpdate |
Yes |
Long |
Time when the task was last updated. |
status |
Yes |
String |
Task status.
|
message |
No |
String |
Task information. |
subtasks |
No |
List<SubTask> |
Subtask. For details, see Table 4. |
Example
After the solution is imported successfully, query the task information.
- Request
GET /v1/b384b9e9ab9b4ee8994c8633aabc9505/systemTasks/008aae2e675d3bcb01675d40ab3f0005
- Success Response
{ "endTime":1543457514000, "id":"008aae2e675d3bcb01675d3c66f20000", "lastUpdate":1543457514000, "name": "Import the solution from OBS path obs://aaaaa/traffic.zip.", "startTime":1543457499000, "status":"SUCCESSFUL", "subtasks":[ { "id":"008aae2e675d3bcb01675d3c9f5f0002", "lastUpdate":1543457513000, "name": "Import the job_batch job.", "status":"SUCCESSFUL", } ] }
Parent topic: APIs to Be Taken Offline