Updated on 2023-02-16 GMT+08:00

Querying the Task Execution Status

Function Description

  • API name

    QueryJobs

  • Function

    Query task execution status.

URI

GET /v1/{project_id}/cloud-phone/jobs/{job_id}

For details, see Table 1.
Table 1 Parameter description

Parameter

Mandatory

Type

Description

project_id

Yes

String

Specifies the project ID.

For details about how to obtain the project ID, see Obtaining a Project ID.

job_id

Yes

String

Specifies the job ID in the response after the task request is issued.

Request

  • Request parameters

    None

  • Example request
    1
    GET https://{CPH Endpoint}/v1/{project_id}/cloud-phone/jobs/6837531fd3f54550927b930180a706bf
    

Response

  • Parameter description

    Parameter

    Type

    Description

    request_id

    String

    Specifies the request ID, which is unique.

    job_id

    String

    Specifies the unique ID of a task.

    begin_time

    String

    Specifies the task start time.

    It is a UTC time in YYYY-MM-DDTHH:MM:SSZ format.

    end_time

    String

    Specifies the task end time.

    It is a UTC time in YYYY-MM-DDTHH:MM:SSZ format.

    status

    int

    Specifies the task status.

    • 1: The task is running.
    • 2: The task succeeds.
    • -1: The task fails.

    error_code

    String

    Specifies the task error code.

    error_msg

    String

    Specifies the task error code description.

    execute_msg

    String

    Specifies the content returned after a task is executed. The value can contain a maximum of 1,024 bytes.

  • Example response
    {
        "error_msg": null,
        "execute_msg": null,
        "job_id": "6837531fd3f54550927b930180a706bf",
        "end_time": "2019-04-26T07:00:06Z",
        "begin_time": "2019-04-26T07:00:00Z",
        "error_code": null,
        "request_id": "2676a3b4f7df49c297c6775989806d32",
        "status": 2
    }

Returned Values

See Returned Values.

Error Codes

See Error Codes.