Updated on 2023-12-25 GMT+08:00

Querying Job Status

Function

This API is used to query job status.

URI

GET /v1/{project_id}/jobs/{job_id}

Table 1 Path parameter

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID

job_id

Yes

String

Job ID returned by the batch operation

Request Parameters

None

Response Parameters

Status code: 200

Table 2 Response body parameters

Parameter

Type

Description

job_id

String

Job ID

job_type

String

Job type

begin_time

String

Creation start time

end_time

String

Creation end time

status

String

Job status

error_code

String

Error code

fail_reason

String

Error message

entities

SubJobsInfo object

Job information body, which is the loop body.

Table 3 SubJobsInfo

Parameter

Type

Description

sub_jobs

Array of objects

Sub-job information. The type is the same as that of the main job.

Example Request

None

Example Response

Status code: 200

Normal response to the GET operation

{
  "job_id" : "ff808082843684110184e155fdb36461",
  "job_type" : "createBatchPublicip",
  "begin_time" : "2022-12-05T08:10:19.951Z",
  "end_time" : "2022-12-05T08:10:21.864Z",
  "status" : "SUCCESS",
  "error_code" : null,
  "fail_reason" : null,
  "entities" : {
    "sub_jobs" : [ ]
  }
}

Status Code

See Status Codes.

Error Code

See Error Codes.