Querying Job Details in the Job Center
Function
This API is used to query asynchronous job details in the job center on the management plane. Asynchronous jobs include creating, closing, starting, deleting, adding, importing, exporting, and upgrading graphs, as well as adding backups.
URI
GET /v2/{project_id}/graphs/jobs
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Project ID, which is used for resource isolation. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
end_time |
No |
String |
Job end date. Currently, only the date is supported. The format is yyyy-MM-dd, for example, 2019-03-27. |
graph_name |
No |
String |
Associated graph name |
limit |
No |
String |
Maximum number of resources displayed on a single page. The default value is 10. |
offset |
No |
String |
Start position of the request. The default value is 0. |
start_time |
No |
String |
Job start date. Currently, only the date is supported. The format is yyyy-MM-dd, for example, 2019-03-27. |
status |
No |
String |
The task status. Options:
|
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_count |
Integer |
Total number of jobs |
job_list |
Array of job_list objects |
Task list |
Parameter |
Type |
Description |
---|---|---|
job_id |
String |
Job ID |
status |
String |
The task status.
|
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 code.
|
error_msg |
String |
System prompt code.
|
Example Request
Query asynchronous job details in the job center on the management plane.
GET https://Endpoint/v2/{project_id}/graphs/jobs?offset=0&limit=100
Example Response
Status code: 200
Example response for a successful request
{ "job_count" : 2, "job_list" : [ { "job_id" : "ff80808167bb90340167bc3c7b5b026a", "status" : "success", "job_type" : "GraphManagement", "job_name" : "ImportGraph", "related_graph" : "test1217", "begin_time" : "2018-12-17T12:55:40", "end_time" : "2018-12-17T12:56:32", "job_detail" : { "vertexset_path" : null, "edgeset_path" : [ { "path" : "hkmovie/edge.csv", "log" : null, "cause" : null, "status" : "success" } ], "schema_path" : [ { "path" : "hkmovie/schema.xml", "log" : null, "cause" : null, "status" : "success" } ] }, "job_progress" : 0 }, { "job_id" : "ff80808167bb90340167bc5d0b1d0358", "status" : "success", "job_type" : "GraphManagement", "job_name" : "DeleteGraph", "related_graph" : "test1218", "begin_time" : "2018-12-17T13:31:14", "end_time" : "2018-12-17T13:34:48", "job_progress" : 0 } ] }
Status code: 400
Example response for a failed request
{ "error_msg" : "failed", "error_code" : "GES.9999" }
Status Code
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 Code
See Error Code.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.