Obtaining Scheduled Tasks
Function
This API is used to obtain the scheduled tasks. Before calling this API:
- Learn how to authorize and authenticate it.
- Obtain the required region and endpoint.
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 can contain 32 characters. Only letters and digits are allowed. Default Value N/A |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
offset |
No |
String |
Definition Index offset. The query starts from the next piece of data indexed by this parameter. Constraints The value must be an integer and cannot be a negative number. Range ≥ 0 Default Value 0 |
limit |
No |
String |
Definition Number of records to be queried. Constraints The value must be an integer and cannot be a negative number. Range 1–100 Default Value 100 |
status |
No |
String |
Definition Task execution status. Constraints N/A Range Default Value N/A |
start_time |
No |
String |
Definition Start time. 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 N/A |
end_time |
No |
String |
Definition End time. 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 N/A |
job_id |
No |
String |
Definition Task ID. Constraints N/A Range N/A Default Value N/A |
job_name |
No |
String |
Definition Task scheduling type. Constraints N/A Range N/A Default Value N/A |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
X-Auth-Token |
Yes |
String |
Definition User token. To obtain this value, call the IAM API for obtaining a user token. The value of X-Subject-Token in the response header is the token value. Constraints N/A Range N/A Default Value N/A |
X-Language |
No |
String |
Definition Request language type. Constraints N/A Range Default Value en-us |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
schedules |
Array of ScheduleTask objects |
Definition Task details. |
total_count |
Integer |
Definition Total number of records. Range N/A |
Status code: 400
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code. |
error_msg |
String |
Error message. |
Status code: 500
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code. |
error_msg |
String |
Error message. |
Example Request
Obtaining scheduled tasks
GET https://{endpoint}/v3/619d3e78f61b4be68bc5aa0b59edcf7b/scheduled-jobs?offset=1&limit=10
Example Response
Status code: 200
Success.
{ "schedules" : [ { "job_id" : "56d3c1138dcf4f1da73b0170700c78d0", "instance_id" : "79bc540dd4d6432784894a981fdfacfcin07", "instance_name" : "gauss-f821", "instance_status" : "BUILD", "project_id" : "053f533ead80d5102f0cc012e8d468a4", "job_name" : "UpgradeGaussDBforMySQLDatabaseVersion", "create_time" : "2018-08-06T10:41:14+0000", "start_time" : "2018-08-06T10:41:14+0000", "end_time" : "2018-08-06T10:41:14+0000", "job_status" : "Completed", "datastore_type" : "gaussdb-mysql", "target_config" : { "flavor" : "gaussdb.mysql.xlarge.arm.4", "mem" : "16", "cpu" : "4" } } ], "total_count" : 1 }
Status Code
For details, see Status Codes.
Error Code
For details, see Error Codes.
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