查询Job状态(1.0.0)-业务面
功能介绍
查询Job的执行状态。对点过滤查询、边过滤查询、执行算法等异步API,命令下发后,会返回jobId,通过jobId查询任务的执行状态。
URI
|
参数 |
是否必选 |
类型 |
说明 |
|---|---|---|---|
|
project_id |
是 |
String |
项目ID。获取方法请参见获取项目ID。 |
|
job_id |
是 |
String |
Job ID |
|
offset |
否 |
Integer |
本次查询偏移量,默认为0。 |
|
limit |
否 |
Integer |
本次查询返回最大数量(最大100000),默认为100000。 |
响应参数
|
参数 |
类型 |
说明 |
|---|---|---|
|
errorMessage |
String |
系统提示信息。
|
|
errorCode |
String |
系统提示信息。
|
|
status |
String |
查询成功时返回任务状态,包括以下五种状态:
查询失败时字段为空。 |
|
data |
Object |
算法运行的结果。查询失败时字段为空。 |
|
参数 |
类型 |
说明 |
|---|---|---|
|
vertices |
List |
点上关联的算法结果。 |
|
edges |
List |
边上关联的算法结果。 |
|
outputs |
Object |
其他输出结果。 |
|
data_return_size |
Integer |
本次查询返回结果数量。 |
|
data_offset |
Integer |
本次查询返回结果偏移量。 |
|
data_total_size |
Integer |
异步任务产生的结果数据总量。 |
请求示例
查询Job的执行状态,查询偏移量为0,查询返回最大数量为2。
GET http://{SERVER_URL}/ges/v1.0/{project_id}/graphs/{graph_name}/jobs/{job_id}/status?offset=0&limit=2
响应示例
状态码: 200
成功响应示例
Http Status Code: 200
{
"data": {
"outputs": {
"data_return_size": 2,
"vertices": [
{
"id": "Sarah",
"label": "user",
"properties": {
"Occupation": [
"other or not specified"
],
"Name": [
"莎拉"
],
"Zip-code": [
"55105"
],
"Gender": [
"F"
],
"Age": [
"18-24"
]
}
},
{
"id": "Sidney",
"label": "user",
"properties": {
"Occupation": [
"writer"
],
"Name": [
"西德尼"
],
"Zip-code": [
"85296"
],
"Gender": [
"M"
],
"Age": [
"18-24"
]
}
}
],
"data_offset": 0,
"data_total_size": 19
}
},
"status": "success"
}
状态码: 400
Http Status Code: 400
{
"errorMessage": "Not found. Please check the input parameters.",
"errorCode": "GES.8000"
}
状态码
|
返回值 |
说明 |
|---|---|
|
400 Bad Request |
请求错误。 |
|
401 Unauthorized |
鉴权失败。 |
|
403 Forbidden |
没有操作权限。 |
|
404 Not Found |
找不到资源。 |
|
500 Internal Server Error |
服务内部错误。 |
|
503 Service Unavailable |
服务不可用。 |
错误码
请参见错误码。
