Querying Tasks and Details
Function
This API is used to query tasks (by default) and details.
Authorization Information
Each account has permissions to call all APIs, but IAM users must have the required permissions specifically assigned.
- If you are using role/policy-based authorization, see the required permissions in Permissions and Supported Actions.
- If you are using identity policy-based authorization, the following identity policy-based permissions are required.
Action
Access Level
Resource Type (*: required)
Condition Key
Alias
Dependencies
gaussdbfornosql:task:list
List
instance *
- g:ResourceTag/<tag-key>
- g:EnterpriseProjectId
nosql:task:list
-
URI
GET /v3/{project_id}/jobs
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| project_id | Yes | String | Definition Project ID of a tenant in a region. To obtain this value, see Obtaining a Project ID. Constraints N/A Range The value contains 32 characters. Only letters and digits are allowed. Default Value N/A |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| id | No | String | Definition Task ID. Constraints N/A Range N/A Default Value N/A |
| start_time | No | String | Definition Query start time. Constraints The value is 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. Range N/A Default Value The default value is 30 days before the current time. |
| end_time | No | String | Definition Query end time. Constraints The value is in the yyyy-mm-ddThh:mm:ssZ format. The end time must be later than the start time, and the time span cannot be longer than 30 days. T is the separator between the calendar and the hourly notation of time. Z indicates the time zone offset. Range N/A Default Value The default value is the current time. |
| status | No | String | Definition Task status. Constraints N/A Range
Default Value N/A |
| name | No | String | Definition Task name. Constraints N/A Range
Default Value N/A |
| offset | No | Integer | Definition Index offset. Constraints The value must be a non-negative integer. Range N/A Default Value 0: The query starts from the first data record. |
| limit | No | Integer | Definition Number of records returned by a query. Constraints The value must be a non-negative integer. Range
Default Value 50 |
Request Parameters
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| X-Auth-Token | Yes | String | Definition User token You can obtain the token by calling the IAM API by following Obtaining a User Token Through Password Authentication. Constraints N/A Range N/A Default Value N/A |
Response Parameters
Status code: 200
| Parameter | Type | Description |
|---|---|---|
| jobs | Array of objects (Table 5) | Definition Task list. |
| total_count | Integer | Definition Total number of tasks in the task list. Range N/A |
| Parameter | Type | Description |
|---|---|---|
| id | String | Definition Task ID. Range N/A |
| name | String | Definition Task name. Range N/A |
| status | String | Definition Task execution status. Range
|
| start_time | String | Definition 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. Range N/A |
| end_time | String | Definition End time in the yyyy-mm-ddThh:mm:ssZ format. Range N/A |
| progress | String | Definition Task execution progress. 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. Range N/A |
| instance | Objects in Table 6 | Definition Details of the instance associated with the task. |
| fail_reason | String | Definition Task failure information. Range N/A |
Example Requests
GET https://{endpoint}/v3/0549b4a43100d4f32f51c01c2fe4acdb/jobs?id=89a0cde6-9c46-4b89-a92c-573e1083ff23 Example Responses
Status code: 200
Success
{
"total_count" : 1,
"jobs" : [ {
"id" : "6f85e061-04dd-42e7-86d6-d3b1e40aac2e",
"name" : "CreateCassandra",
"status" : "Running",
"start_time" : "2023-09-12T06:44:01+0000",
"end_time" : "2023-09-12T06:44:03+0000",
"progress" : "14%",
"instance" : {
"id" : "27a045b6bf9e46f691f81366d398cb04in06",
"name" : "nosql-12f5"
},
"fail_reason" : ""
} ]
} Status Codes
For details, see Status Codes.
Error Codes
For details, see Error Codes.
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