This API is used to obtain information about a task with a specified ID in the task center.
Name |
Mandatory |
Description |
|---|---|---|
project_id |
Yes |
Project ID of a tenant in a region. For details about how to obtain the project ID, see Obtaining a Project ID. |
id |
Yes |
Task ID |
Name |
Type |
Description |
|---|---|---|
job |
Object |
Task information. For details, see Table 3. |
Name |
Type |
Description |
|---|---|---|
id |
String |
Task ID |
name |
String |
Task name |
status |
String |
Task execution status Valid value:
|
created |
String |
Creation time in the "yyyy-mm-ddThh:mm:ssZ" format. T is the separator between the calendar and the hourly notation of time. Z indicates the time zone offset. |
ended |
String |
End time in the "yyyy-mm-ddThh:mm:ssZ" format. T is the separator between the calendar and the hourly notation of time. Z indicates the time zone offset. |
progress |
String |
Task execution progress NOTE:
The execution progress (such as "60%", indicating the task execution progress is 60%) is displayed only when the task is being executed. Otherwise, "" is returned. |
instance |
Object |
Instance on which the task is executed. For details, see Table 4. |
fail_reason |
String |
Task failure information. |
Name |
Type |
Description |
|---|---|---|
id |
String |
Instance ID |
name |
String |
DB instance name |
In the response example, some tasks in the task center are used as examples.
A task is successfully executed.
{
"job": {
"id": "f85104b5-4a9c-4e0f-9505-fc5409d8f7ae",
"name": "Create_MongoDB",
"status": "Completed",
"created": "2021-07-12T09:22:04+0000",
"ended": "2021-07-12T10:10:13+0000",
"progress": "",
"instance": {
"id": "d87f5b33049144ec95f0cab0a5f22cfbin02",
"name": "dds-5ff4-sh"
},
"fail_reason": null
}
}
A task is being executed:
{
"job": {
"id": "9d10bfd1-affb-49c3-b977-298950a8d6fa",
"name": "Create_MongoDB",
"status": "Running",
"created": "2021-07-13T07:28:43+0000",
"ended": "2021-07-13T07:28:53+0000",
"progress": "9%",
"instance": {
"id": "cf538a2dd8ec4b26860b27060902712fin02",
"name": "dds-3a98-wcc"
},
"fail_reason": null
}
}
A task fails to be executed:
{
"job": {
"id": "a03b1b8a-b756-467c-8a49-38720c3d23ec",
"name": "Restore_MongoDB_Replica",
"status": "Failed",
"created": "2021-07-13T04:55:58+0000",
"ended": "2021-07-13T05:20:04+0000",
"progress": "",
"instance": {
"id": "7beb15d5db9c4742b7c817789244844ein02",
"name": "lenn-v3-restore-4"
},
"fail_reason": "Failed to upgrade the DB Agent."
}
}
For more information, see Error Code.