Querying Job Status on the Management Plane (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
- URI format
GET /v1.0/{project_id}/graphs/{graph_id}/jobs/{job_id}/status - Parameter description
Table 1 URI parameter description Parameter
Mandatory
Type
Description
project_id
Yes
String
Project ID, which is used for resource isolation. For details, see Obtaining a Project ID.
graph_id
Yes
String
Graph ID
job_id
Yes
String
Job ID
Request
- Request example
GET https://Endpoint/v1.0/{project_id}/graphs/{graph_id}/jobs/{job_id}/status
Response
- Parameter description
Table 2 Parameter description Parameter
Mandatory
Type
Description
errorMessage
No
String
System prompt. If execution succeeds, this parameter may be left blank. If execution fails, this parameter is used to display the error message.
errorCode
No
String
System prompt. If execution succeeds, this parameter may be left blank. If execution fails, this parameter is used to display the error code.
Job property list
No
Json
For details, see Table3 Job property list.
Table 3 Job property list Parameter
Mandatory
Type
Description
job_id
Yes
String
Job ID
status
Yes
String
Job status:
- pending
- running
- success
- failed
jobType
Yes
String
Job type
jobName
Yes
JsonArray
Job name
relatedGraph
Yes
String
Associated graph name
beginTime
No
String
Job start time (UTC). The format is (yyyy-MM-dd HH:mm:ss).
endTime
No
String
Job end time (UTC). The format is (yyyy-MM-dd HH:mm:ss).
jobDetail
No
JobDetail data structure
This parameter is returned only when jobName is set to ImportGraph and is used to display graph import details.
failReason
No
String
Job failure cause
jobProgress
No
Double
Job execution progress. It is a reserved field, and not used currently.
Table 4 JobDetail data structure Parameter
Mandatory
Type
Description
schemaPath
Yes
JsonArray
OBS path for storing metadata
edgesetPath
Yes
JsonArray
OBS path for storing the edge data set
vertexsetPath
No
JsonArray
OBS path for storing the vertex data set
Table 5 edgesetPath and vertexsetPath property list Parameter
Mandatory
Type
Description
path
Yes
String
OBS storage path
log
No
String
Log file of the OBS file import operation
status
Yes
String
Status of the OBS file import operation:
- success: Imported successfully.
- Failed: Failed to import the file.
- partFailed: Partially failed.
cause
No
String
Import failure cause
totalLines
No
Long
Total number of imported lines. The value -1 indicates that this field is not returned in the current version.
failedLines
No
Long
Lines failed to be imported. The value -1 indicates that this field is not returned in the current version.
successfulLines
No
Long
Lines imported successfully. The value -1 indicates that this field is not returned in the current version.
Table 6 schemaPath property list Parameter
Mandatory
Type
Description
path
Yes
String
OBS storage path
log
No
String
Log file of the OBS file import operation
status
Yes
String
Status of the OBS file import operation:
- success: Imported successfully.
- Failed: Failed to import the file.
- partFailed: Partially failed.
cause
No
String
Import failure cause
- Response example (successful request)
Http Status Code: 200 { "jobId": "ff80808167f09aaa0167f19b35ec0305", "status": "success", "jobType": "GraphManagement", "jobName": "ImportGraph", "relatedGraph": "GES_UI_AUTO", "beginTime": "2018-11-27T21:39:00", "endTime": "2018-11-27T21:39:56", "jobDetail": { "vertexsetPath": [ { "path": "ges-ui/auDatas/list_set_vertex.csv", "log": null, "cause": null, "status": "success" } ], "edgesetPath": [ { "path": "ges-ui/auDatas/list_set_edge.csv", "log": null, "cause": null, "status": "success" } ], "schemaPath": [ { "path": "ges-ui/auDatas/list_set_schema.xml", "log": null, "cause": null, "status": "success" } ] }, "jobProgress": 0 } - Response example (failed request)
Http Status Code: 400 { "errorMessage": "can not find job, jobId is ff808081646e81d40164c5fb414b2b1a1", "errorCode": "GES.8301" }
Return Value
- Normal
- Abnormal
Table 7 Return code for failed requests Return Value
Description
400 Bad Request
Request error.
401 Unauthorized
Authentication failed.
403 Forbidden
No operation permission.
404 Not Found
The requested resource was not found.
500 Internal Server Error
Internal service error.
503 Service Unavailable
Service unavailable.
Last Article: Task Center APIs
Next Article: Querying the Job Center (1.1.8)
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.