Querying Job Status on the Management Plane (1.0.0)
Function
This interface is used to query the execution status of a task, such as ECS creation, ECS deletion, ECS batch operation, and NIC operation. 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
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Project ID. For details about how to obtain the project ID, see Obtaining a Project ID. |
graph_id |
Yes |
String |
Graph ID |
job_id |
Yes |
String |
ID of the asynchronous job |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
X-Auth-Token |
Yes |
String |
User token. It is used to obtain the permission to call APIs. For details about how to obtain the token, see Authentication. The value of X-Subject-Token in the response header is the token. |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
job_id |
String |
Job ID |
status |
String |
Job status. The options are:
|
job_type |
String |
Job type. |
job_name |
String |
Task name |
related_graph |
String |
Associated graph name |
begin_time |
String |
Job start time (UTC). The format is yyyy-MM-dd'T'HH:mm:ss. |
end_time |
String |
Job end time (UTC). The format is yyyy-MM-dd'T'HH:mm:ss. |
job_detail |
job_detail object |
This parameter is returned only when jobName is set to ImportGraph and is used to display graph import details. |
fail_reason |
String |
Job failure cause |
job_progress |
Double |
Job execution progress. It is a reserved field, and not used currently. |
Parameter |
Type |
Description |
---|---|---|
schema_path |
Array of schema_path objects |
Path for storing metadata |
edgeset_path |
Array of edgeset_path objects |
Path for storing the edge data set |
vertexset_path |
Array of vertexset_path objects |
Path for storing the vertex data set |
Parameter |
Type |
Description |
---|---|---|
path |
String |
OBS storage path |
log |
String |
Import log |
status |
String |
OBS file status:
|
cause |
String |
Import failure cause |
total_lines |
Long |
Total number of imported lines. The value -1 indicates that this field is not returned in the current version. |
failed_lines |
Long |
Lines failed to be imported. The value -1 indicates that this field is not returned in the current version. |
successful_lines |
Long |
Number of lines that are successfully imported. The value -1 indicates that this field is not returned in the current version. |
Parameter |
Type |
Description |
---|---|---|
path |
String |
OBS storage path |
log |
String |
Import log |
status |
String |
OBS file status:
|
cause |
String |
Import failure cause |
total_lines |
Long |
Total number of imported lines. The value -1 indicates that this field is not returned in the current version. |
failed_lines |
Long |
Lines failed to be imported. The value -1 indicates that this field is not returned in the current version. |
successful_lines |
Long |
Number of lines that are successfully imported. The value -1 indicates that this field is not returned in the current version. |
Parameter |
Type |
Description |
---|---|---|
path |
String |
OBS storage path |
log |
String |
Import log |
status |
String |
OBS file status:
|
cause |
String |
Import failure cause |
total_lines |
Long |
Total number of imported lines. The value -1 indicates that this field is not returned in the current version. |
failed_lines |
Long |
Lines failed to be imported. The value -1 indicates that this field is not returned in the current version. |
successful_lines |
Long |
Number of lines that are successfully imported. The value -1 indicates that this field is not returned in the current version. |
Status code: 400
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
System prompt.
|
error_msg |
String |
System prompt.
|
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. |
Error Codes
See Error Code.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot