Obtaining Instant Tasks
Function
This API is used to obtain the instant tasks. Before calling this API:
- Learn how to authorize and authenticate it.
- Obtain the required region and endpoint.
URI
GET /v3/{project_id}/immediate-jobs
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Project ID of a tenant in a region. To obtain this value, see Obtaining a Project ID. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
status |
No |
String |
Task execution status. Value:
|
job_name |
No |
String |
Task name. Value: Value:
|
job_id |
No |
String |
Task ID. |
offset |
No |
String |
Index offset. The query starts from the first piece of data. The default value is 1. The value must be a number and cannot be a negative number. |
limit |
No |
String |
Number of records to be queried. Value: 10 (default value), 20, or 50. |
start_time |
No |
String |
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. |
end_time |
No |
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. For example, if the time zone offset is one hour, the value of Z is +0100. |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
X-Auth-Token |
Yes |
String |
User token. If the following response body is returned for calling the API used to obtain a user token, the request is successful. After the request is processed, the value of X-Subject-Token in the message header is the token value. |
X-Language |
No |
String |
Request language type. The default value is en-us. Value:
|
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
jobs |
Array of TaskDetailInfo objects |
Task details. |
total_count |
Integer |
Total number of tasks. |
Parameter |
Type |
Description |
---|---|---|
instance_id |
String |
Instance ID. |
instance_name |
String |
Instance name. |
instance_status |
String |
Instance status. Value:
|
job_id |
String |
Task ID. |
order_id |
String |
Order ID. |
job_name |
String |
Task name. Value:
|
status |
String |
Task execution status. Value:
|
process |
String |
Task progress. |
created_time |
String |
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. |
ended_time |
String |
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. |
fail_reason |
String |
Task failure cause. |
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 the instant tasks
GET https://{endpoint}/v3/619d3e78f61b4be68bc5aa0b59edcf7b/immediate-jobs
Example Response
Status code: 200
Success.
{ "jobs" : [ { "instance_id" : "ede953923f06448d9be8686ef0c1378ein07", "instance_name" : "gauss-1234", "instance_status" : "deleted", "job_id" : "7155730b-a60b-4dc0-9f89-3f55897f29d6", "order_id" : "", "job_name" : "CloseGaussDBforMySQLProxy", "status" : "Completed", "process" : "", "created_time" : "2018-08-06T10:41:14+0000", "ended_time" : "2018-08-06T12:41:14+0000", "fail_reason" : "Single task exception." } ], "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.