Querying Task Information
Function
Queries the execution status of the current task based on the task ID returned by the SSH key pair API.
Calling Method
For details, see Calling APIs.
URI
GET /v3/{project_id}/tasks/{task_id}
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Project ID |
task_id |
Yes |
String |
The task ID. |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
X-Auth-Token |
Yes |
String |
User token. Can be obtained by calling the IAM API for obtaining the user token (the 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: - READY_RESET: Preparing for resetting the key pair. - RUNNING_RESET: Resetting the key pair. - FAILED_RESET: Reset failed. - SUCCESS_RESET: Reset succeeded. - READY_REPLACE: Preparing for replacing the key pair. - RUNNING_REPLACE: Replacing the key pair. - FAILED_RESET: Replacement failed. - SUCCESS_RESET: Replacement succeeded. - READY_UNBIND: Preparing for unbinding the key pair. - RUNNING_UNBIND: Unbinding the key pair. - FAILED_UNBIND: Unbinding failed. - SUCCESS_UNBIND: Unbinding succeeded. |
Status code: 400
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error Codes |
error_msg |
String |
Description |
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 response
{ "error_code" : "KPS.XXX", "error_msg" : "XXX" }
Status Codes
Status Code |
Description |
---|---|
200 |
OK |
400 |
Error response |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.