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

Querying the Job Status (1.0.0)

Function

This API is used to query the execution status of a job. Asynchronous APIs that are used to create, stop, start, delete, and import graphs will return job IDs after commands are sent. You can query the job execution status according to the job IDs.

URI

GET /v2/{project_id}/graphs/{graph_id}/jobs/{job_id}/status

Table 1 URI parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Definition

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

Constraints

N/A

Range

The value can contain up to 64 characters. Only letters and digits are allowed.

Default Value

N/A

graph_id

Yes

String

Definition

Graph ID.

Constraints

N/A

Range

N/A

Default Value

N/A

job_id

Yes

String

Definition

ID of an asynchronous job.

Constraints

N/A

Range

N/A

Default Value

N/A

Request Parameters

Table 2 Request header parameter

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

Definition

User token. It is used to obtain the permission to call APIs. For how to obtain the token, see Authentication. (The token is the value of X-Subject-Token in the response header.)

Constraints

N/A

Range

N/A

Default Value

N/A

Response Parameters

Status code: 200

Table 3 Response body parameters

Parameter

Type

Description

job_id

String

Definition

Job ID.

Range

N/A

status

String

Definition

Job status.

Range

  • pending
  • running
  • success
  • partiallyFailed
  • failed

job_type

String

Definition

Job type.

Range

N/A

job_name

String

Definition

Job name.

Range

N/A

related_graph

String

Definition

Associated graph name.

Range

N/A

begin_time

String

Definition

Job start time, in UTC format yyyy-MM-dd HH:mm:ss.

Range

N/A

end_time

String

Definition

Job end time (UTC), in UTC format yyyy-MM-dd HH:mm:ss.

Range

N/A

job_detail

job_detail object

Definition

This parameter is returned only when job_name is set to ImportGraph and is used to display graph import details.

Range

N/A

fail_reason

String

Definition

Job failure cause.

Range

N/A

job_progress

Double

Definition

Job execution progress. This parameter is reserved and is not currently used.

Range

N/A

Table 4 job_detail

Parameter

Type

Description

schema_path

Array of schema_path objects

Definition

Metadata file path.

Range

N/A

edgeset_path

Array of edgeset_path objects

Definition

Path for storing edge datasets.

Range

N/A

vertexset_path

Array of vertexset_path objects

Definition

Path for storing vertex datasets.

Range

N/A

Table 5 schema_path

Parameter

Type

Description

path

String

Definition

OBS path.

Range

N/A

log

String

Definition

Import log.

Range

N/A

status

String

Definition

OBS file import status.

Range

  • success
  • failed
  • partFailed

cause

String

Definition

Import failure cause.

Range

N/A

total_lines

Long

Definition

Total number of imported lines. The value -1 indicates that this parameter is not returned in the current version.

Range

N/A

failed_lines

Long

Definition

Number of lines that failed to import. The value -1 indicates that this parameter is not returned in the current version.

Range

N/A

successful_lines

Long

Definition

Number of lines that are successfully imported. The value -1 indicates that this parameter is not returned in the current version.

Range

N/A

Table 6 edgeset_path

Parameter

Type

Description

path

String

Definition

OBS path.

Range

N/A

log

String

Definition

Import log.

Range

N/A

status

String

Definition

OBS file import status.

Range

  • success
  • failed
  • partFailed

cause

String

Definition

Import failure cause.

Range

N/A

total_lines

Long

Definition

Total number of imported lines. The value -1 indicates that this parameter is not returned in the current version.

Range

N/A

failed_lines

Long

Definition

Number of lines that failed to import. The value -1 indicates that this parameter is not returned in the current version.

Range

N/A

successful_lines

Long

Definition

Number of lines that are successfully imported. The value -1 indicates that this parameter is not returned in the current version.

Range

N/A

Table 7 vertexset_path

Parameter

Type

Description

path

String

Definition

OBS path.

Range

N/A

log

String

Definition

Import log.

Range

N/A

status

String

Definition

OBS file import status.

Range

  • success
  • failed
  • partFailed

cause

String

Definition

Import failure cause.

Range

N/A

total_lines

Long

Definition

Total number of imported lines. The value -1 indicates that this parameter is not returned in the current version.

Range

N/A

failed_lines

Long

Definition

Number of lines that failed to import. The value -1 indicates that this parameter is not returned in the current version.

Range

N/A

successful_lines

Long

Definition

Number of lines that are successfully imported. The value -1 indicates that this parameter is not returned in the current version.

Range

N/A

Status code: 400

Table 8 Response body parameters

Parameter

Type

Description

error_code

String

Definition

System prompt.

  • If the execution succeeds, this parameter may be left blank.
  • If the execution fails, this parameter is used to display the error code.

Range

N/A

error_msg

String

Definition

System prompt.

  • If the execution succeeds, this parameter may be left blank.
  • If the execution fails, this parameter is used to display the error message.

Range

N/A

Example Request

Query the execution status of a job.

GET https://{Endpoint}/v2/{project_id}/graphs/{graph_id}/jobs/{job_id}/status

Example Response

Status code: 200

Example response for a successful request

{
  "job_id" : "ff80808167f09aaa0167f19b35ec0305",
  "status" : "success",
  "job_type" : "GraphManagement",
  "job_name" : "ImportGraph",
  "related_graph" : "GES_UI_AUTO",
  "begin_time" : "2018-11-27T21:39:00",
  "end_time" : "2018-11-27T21:39:56",
  "job_detail" : {
    "vertexset_path" : [ {
      "path" : "ges-ui/auDatas/list_set_vertex.csv",
      "log" : null,
      "cause" : null,
      "status" : "success"
    } ],
    "edgeset_path" : [ {
      "path" : "ges-ui/auDatas/list_set_edge.csv",
      "log" : null,
      "cause" : null,
      "status" : "success"
    } ],
    "schema_path" : [ {
      "path" : "ges-ui/auDatas/list_set_schema.xml",
      "log" : null,
      "cause" : null,
      "status" : "success"
    } ]
  },
  "job_progress" : 0
}

Status code: 400

Example response for a failed request

{
  "error_msg" : "can not find job, jobId is ff808081646e81d40164c5fb414b2b1a1",
  "error_code" : "GES.8301"
}

Status Codes

Return Value

Description

400 Bad Request

Request error.

401 Unauthorized

Authorization failed.

403 Forbidden

No operation permissions.

404 Not Found

No resources found.

500 Internal Server Error

Internal server error.

503 Service Unavailable

Service unavailable.