Querying Tasks and Details
API Description
This API is used to query tasks and details in the task center based on specified conditions.
Restrictions
- Currently, only asynchronous tasks in the task center of DDS Community Edition within one month can be queried.
URI
Name |
Type |
IN |
Mandatory |
Description |
---|---|---|---|---|
X-Auth-Token |
string |
header |
Yes |
User token obtained from IAM. For details, see Authentication. |
project_id |
string |
path |
Yes |
Project ID of a tenant in a region. Obtain the project ID by following the instructions in Obtaining a Project ID. |
Name |
Mandatory |
Type |
Description |
---|---|---|---|
start_time |
Yes |
String |
The start time. The format of the start time is "yyyy-mm-ddThh:mm:ssZ". T is the separator between calendar and hourly notation of time. Z indicates the time zone offset. |
end_time |
Yes |
String |
The end time. The format of the end time is "yyyy-mm-ddThh:mm:ssZ" and the end time must be later than the start time. The time span cannot be longer than 30 days. T is the separator between calendar and hourly notation of time. Z indicates the time zone offset. |
status |
No |
String |
Task status. Running indicates that the task is being executed. Completed indicates that the task is completed. Failed indicates that the task fails. |
id |
No |
String |
Task ID. |
name |
No |
String |
Task name. The value can be:
|
offset |
No |
Integer |
Index offset. If offset is set to N, the resource query starts from the N+1 piece of data. The default value is 0, indicating that the query starts from the first piece of data. The value must be a positive integer. |
limit |
No |
Integer |
Number of records to be queried. The default value is 100. The value must be a positive integer. The minimum value is 1 and the maximum value is 100. |
Requests
None
Responses
- Parameter description
Table 3 Response body parameters Name
Type
Description
jobs
Array of Table 5-5 objects
Task list.
total_count
Integer
Total number of tasks in the task list.
Table 4 job Name
Type
Description
id
String
Task ID.
name
String
Task name.
instance_id
String
DB instance ID.
instance_name
String
DB instance name.
status
String
Task status. Running indicates that the task is being executed. Completed indicates that the task is completed. Failed indicates that the task fails.
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. Task execution progress.
fail_reason
String
Task failure information.
created_at
String
Creation time. The format is "yyyy-MM-ddTHH:mm:ssZ". T is the separator between the calendar and the hourly notation of time. Z indicates the time zone offset. For example, in the Beijing time zone, the time zone offset is shown as +0800.
ended_at
String
End time. The format is "yyyy-MM-ddTHH:mm:ssZ". T is the separator between the calendar and the hourly notation of time. Z indicates the time zone offset. For example, in the Beijing time zone, the time zone offset is shown as +0800.
- Example response
{ "jobs": [ { "id": "2f406db7-bdc4-402f-9dc4-2c1b094a5f93", "name": "RestartReplicaSetInstance", "status": "Completed", "created_at": "2022-09-05T06:24:14+0000", "ended_at": "2022-09-05T06:25:43+0000", "progress": "", "instance_id": "1f311e6a299345d7bbc878874844e233in02", "instance_name": "dds-6be2-fwyrestore", "fail_reason": "" } ] }
SDK
Click Document Database Service DDS SDK to download the SDK or view the SDK document. To learn how to install and authenticate an SDK, read the Usage section.
Status Code
For more information, see Status Code.
Error Code
For more information, see Error Code.
Feedback
Was this page helpful?
Provide feedbackThank 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