Query task information
Function
This API is used to query the execution status of the current task based on the task ID returned by the SSH key pair API.
URI
GET /v3/{project_id}/tasks/{task_id}
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
project_id |
Yes |
String |
Project ID. |
|
task_id |
Yes |
String |
Task ID. |
Request Parameters
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
X-Auth-Token |
Yes |
String |
User token. The token can be obtained by calling the IAM API (value of X-Subject-Token in the response header). |
Response Parameters
Status code: 200
|
Parameter |
Type |
Description |
|---|---|---|
|
server_id |
String |
Tenant VM ID. |
|
task_id |
String |
ID returned when a task is successfully delivered. |
|
task_status |
String |
Key pair processing state. It can be:
|
Status code: 400
|
Parameter |
Type |
Description |
|---|---|---|
|
error_code |
String |
Error code. |
|
error_msg |
String |
Error message. |
Example Requests
None
Example Responses
Status code: 200
OK.
{
"task_id" : "aee8d2fe-5484-4753-9177-5a38dc15546c",
"task_status" : "RUNNING_RESET",
"server_id" : "c9aa197b-a6b6-4c33-b3a6-fa0b4ec50006"
}
Status code: 400
Error occurred.
{
"error_code" : "KPS.XXX",
"error_msg" : "XXX"
}
Status Codes
|
Status Code |
Description |
|---|---|
|
200 |
OK. |
|
400 |
Error occurred. |
Error Codes
See Error Codes.
Last Article: Unbind an SSH key pair
Next Article: Query task failure details
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.