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.

    The time format is UTC, YYYY-MM-DDTHH:MM:SSZ.

    end_time

    String

    Specifies the task end time.

    The time format is UTC, YYYY-MM-DDTHH:MM:SSZ.

    status

    int

    Specifies the task status. The value can be any of the following:

    • 1: Running
    • 2: Succeeded
    • -1: Failed

    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 1024 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.