Querying the Status of a Task
Function
This API is used to query the status of a task.
Authorization Information
Each account has all the permissions required to call all APIs, but IAM users must be assigned the required permissions. For details about the required permissions, see Permissions Policies and Supported Actions.
URI
GET /v1/{project_id}/cloud-phone/jobs/{job_id}
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
project_id |
Yes |
String |
Specifies the project ID. |
|
job_id |
Yes |
String |
Specifies the task ID. |
Request Parameters
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
X-Auth-Token |
Yes |
String |
Specifies the user token. It can be obtained by calling an Identity and Access Management (IAM) API. The value of X-Subject-Token in the response header is the user token. |
Response Parameters
Status code: 200
|
Parameter |
Type |
Description |
|---|---|---|
|
request_id |
String |
Specifies the unique request ID. |
|
job_id |
String |
Specifies the unique ID of a task. |
|
begin_time |
String |
Specifies when the task processing started. The UTC time is in YYYY-MM-DDTHH:MM:SSZ format. |
|
end_time |
String |
Specifies when the task processing ended. The UTC time is in YYYY-MM-DDTHH:MM:SSZ format. |
|
status |
Integer |
Task status.
|
|
phone_id |
String |
Specifies the unique ID of a cloud phone. This parameter is contained in tasks related to cloud phones. |
|
server_id |
String |
Specifies the unique ID of a cloud phone server. This parameter is contained in tasks related to cloud phone servers. |
|
error_msg |
String |
Specifies the error message returned for the task. |
|
error_code |
String |
Task error code. |
|
execute_msg |
String |
Specifies the content returned after a task is executed. The value can contain a maximum of 1,024 bytes. |
Example Requests
Querying the status of a task
GET https://{CPH Endpoint}/v1/{project_id}/cloud-phone/jobs/6837531fd3f54550927b930180a706bf
Example Responses
Status code: 200
OK
{
"error_msg" : null,
"execute_msg" : null,
"job_id" : "6837531fd3f54550927b930180a706bf",
"phone_id" : "9b28fbe50ded4060b8149a47e55dba82",
"end_time" : "2019-04-26T07:00:06Z",
"begin_time" : "2019-04-26T07:00:00Z",
"error_code" : null,
"request_id" : "2676a3b4f7df49c297c6775989806d32",
"status" : 2
}
Status Codes
|
Status Code |
Description |
|---|---|
|
200 |
OK |
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.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot