Querying Scheduled Tasks
Function
This function is used to query scheduled tasks based on specified conditions.
Constraints
This API supports the following instances:
- GeminiDB Influx
- GeminiDB Redis
- GeminiDB Mongo
- GeminiDB Cassandra
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}/scheduled-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 |
|---|---|---|---|
| job_name | No | String | Definition Task name. Constraints N/A Range
Default Value This parameter is left blank by default. |
| job_status | No | String | Definition Task execution status. Constraints N/A Range
Default Value This parameter is left blank by default. |
| instance_id | No | String | Definition Instance ID. To obtain the value, call the Querying Instances and Details API. If no instance is available, call the Creating an Instance API to create one. Constraints N/A Range N/A Default Value If this parameter is not specified, all instances that meet the search criteria are queried by default. |
| start_time | No | String | Definition Start time of task creation. Constraints 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, if the time zone offset is one hour, the value of Z is +0100. Range N/A Default Value If this parameter is not specified, the default value is seven days before the current time. |
| end_time | No | String | Definition End time of task creation. Constraints 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, if the time zone offset is one hour, the value of Z is +0100. Range N/A Default Value If this parameter is not specified, the current time is used by default. |
| offset | No | Integer | Definition Index offset. Constraints N/A Range N/A Default Value The query starts from the next piece of data indexed by this parameter. The value is 0 by default. |
| limit | No | Integer | Definition Number of records returned by a query. Constraints N/A Range 1–100 Default Value 10 |
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 |
|---|---|---|
| total_count | Integer | Definition Total number of records. Range N/A |
| schedules | Array of Table 5 objects | Definition Task details. |
| Parameter | Type | Description |
|---|---|---|
| job_id | String | Definition Task ID. Range N/A |
| job_name | String | Definition Task name. Range
|
| job_status | String | Definition Task execution status. Range
|
| instance_id | String | Definition Instance ID. Range N/A |
| instance_name | String | Definition Instance name. Range N/A |
| instance_status | String | Definition Instance status. Range
|
| datastore_type | String | Definition Database type. Range
|
| create_time | String | Definition Task 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. For example, if the time zone offset is one hour, the value of Z is +0100. Range N/A |
| start_time | String | Definition Task start 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. For example, if the time zone offset is one hour, the value of Z is +0100. Range N/A |
| end_time | String | Definition Task 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. For example, if the time zone offset is one hour, the value of Z is +0100. Range N/A |
Example Requests
Querying scheduled tasks based on specified conditions
GET https://{Endpoint}/v3/0549b4a43100d4f32f51c01c2fe4acdb/scheduled-jobs?offset=2&limit=2&start_time=2019-05-27T03:38:51+0000&job_status=Pending Example Responses
Status code: 200
Success
{
"schedules" : [ {
"job_id" : "56d3c1138dcf4f1da73b0170700c78d0",
"job_name" : "REBOOT",
"job_status" : "Pending",
"instance_id" : "8a6117ece8a0457a90060441fa372e8ein06",
"instance_name" : "gauss-nosql",
"instance_status" : "normal",
"datastore_type" : "GeminiDB Cassandra",
"create_time" : "2019-05-26T10:41:14+0000",
"start_time" : "2019-05-26T12:41:14+0000",
"end_time" : "2019-05-26T12:51:14+0000"
} ],
"total_count" : 1
} 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