Querying Job Status on the Service Plane (1.0.0)
Function
This API is used to query the execution status of a job. After asynchronous APIs such as those for querying vertices and edges or executing algorithms are used, job IDs are returned. You can use the job ID to query the execution status of a job.
URI
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Project ID. For details about how to obtain the project ID, see Obtaining a Project ID. |
job_id |
Yes |
String |
Job ID |
offset |
No |
Integer |
Offset of a query. The default value is 0. |
limit |
No |
Integer |
Maximum number of records that can be queried. The default value is 100000. |
Response Parameters
Parameter |
Type |
Description |
---|---|---|
errorMessage |
String |
System prompt.
|
errorCode |
String |
System prompt.
|
status |
String |
Job status when the query is successful. The options are:
This parameter is left blank when the query fails. |
data |
Object |
Algorithm execution result. This parameter is left blank when the query fails. |
Parameter |
Type |
Description |
---|---|---|
vertices |
List |
Vertex-associated algorithm result |
edges |
List |
Edge-associated algorithm result |
outputs |
Object |
Other results |
data_return_size |
Integer |
Number of records returned after a query |
data_offset |
Integer |
Result offset of a query |
data_total_size |
Integer |
Total amount of result data generated by asynchronous jobs |
Example Request
Query the execution status of a job. The query offset is 0, and the maximum number of returned results is 2.
GET http://{SERVER_URL}/ges/v1.0/{project_id}/graphs/{graph_name}/jobs/{job_id}/status?offset=0&limit=2
- SERVER_URL: Address for accessing a graph. For details about its value, see Using Service Plane APIs.
- The results obtained from calling the API vary depending on job_id.
Example Response
Status code: 200
Example response (successful request)
Http Status Code: 200 { "data": { "outputs": { "data_return_size": 2, "vertices": [ { "id": "Sarah", "label": "user", "properties": { "Occupation": [ "other or not specified" ], "Name": [ "Sarah" ], "Zip-code": [ "55105" ], "Gender": [ "F" ], "Age": [ "18-24" ] } }, { "id": "Sidney", "label": "user", "properties": { "Occupation": [ "writer" ], "Name": [ "Sidney" ], "Zip-code": [ "85296" ], "Gender": [ "M" ], "Age": [ "18-24" ] } } ], "data_offset": 0, "data_total_size": 19 } }, "status": "success" }
Status code: 400
Http Status Code: 400 { "errorMessage":"graph [demo] is not found", "errorCode":"GES.8402" }
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 Codes.
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