Skip to main content
版本:1.3.2

历史作业API

QueryRestfulApi 类

判断用户是否是管理员

接口地址:/api/rest_j/v1/jobhistory/governanceStationAdmin

请求方式:GET

请求数据类型:application/x-www-form-urlencoded

响应数据类型:application/json

接口描述: 判断用户是否是管理员

请求参数: 无

响应示例:

{
"method": null,
"status": 0,
"message": "OK",
"data": {
"admin": true
}
}

获取数据源的数据库名称列表

接口地址:/api/rest_j/v1/jobhistory/{id}/get

请求方式:GET

请求数据类型:application/x-www-form-urlencoded

响应数据类型:application/json

接口描述:获取数据源的数据库名称列表

请求参数:

参数名称参数说明请求类型是否必须数据类型schema
ididpathtruestring

响应示例:

{
"method": null,
"status": 0,
"message": "OK",
"data": {
"task": {
"taskID": 1,
"instance": "xxx",
"execId": "exec-id-xxx",
"umUser": "test",
"engineInstance": "xxx",
"progress": "10%",
"logPath": "hdfs://xxx/xxx/xxx",
"resultLocation": "hdfs://xxx/xxx/xxx",
"status": "FAILED",
"createdTime": "2019-01-01 00:00:00",
"updatedTime": "2019-01-01 01:00:00",
"engineType": "spark",
"errorCode": 100,
"errDesc": "Task Failed with error code 100",
"executeApplicationName": "hello world",
"requestApplicationName": "hello world",
"runType": "xxx",
"paramJson": "{\"xxx\":\"xxx\"}",
"costTime": 10000,
"strongerExecId": "execId-xxx",
"sourceJson": "{\"xxx\":\"xxx\"}"
}
}
}

历史任务列表

接口地址:/api/rest_j/v1/jobhistory/list

请求方式:GET

请求数据类型:application/x-www-form-urlencoded

响应数据类型:application/json

接口描述:历史任务列表

请求参数:

参数名称参数说明请求类型是否必须数据类型schema
startDatestartDatepathfalseLong
endDateendDatepathfalseLong
statusstatuspathfalsestring
pageNowpageNowpathfalseInteger
pageSizepageSizepathfalseInteger
taskIDtaskIDpathfalseLong
executeApplicationNameexecuteApplicationNamepathfalsestring
creatorcreatorpathfalsestring
proxyUserproxyUserpathfalsestring
isAdminViewisAdminViewpathfalseBoolean

响应示例:

{
"method": null,
"status": 0,
"message": "OK",
"data": {
"tasks": [{
"taskID": 1,
"instance": "xxx",
"execId": "exec-id-xxx",
"umUser": "test",
"engineInstance": "xxx",
"progress": "10%",
"logPath": "hdfs://xxx/xxx/xxx",
"resultLocation": "hdfs://xxx/xxx/xxx",
"status": "FAILED",
"createdTime": "2019-01-01 00:00:00",
"updatedTime": "2019-01-01 01:00:00",
"engineType": "spark",
"errorCode": 100,
"errDesc": "Task Failed with error code 100",
"executeApplicationName": "hello world",
"requestApplicationName": "hello world",
"runType": "xxx",
"paramJson": "{\"xxx\":\"xxx\"}",
"costTime": 10000,
"strongerExecId": "execId-xxx",
"sourceJson": "{\"xxx\":\"xxx\"}"
},
{
"taskID": 2,
"instance": "xxx",
"execId": "exec-id-xxx",
"umUser": "test",
"engineInstance": "xxx",
"progress": "10%",
"logPath": "hdfs://xxx/xxx/xxx",
"resultLocation": "hdfs://xxx/xxx/xxx",
"status": "FAILED",
"createdTime": "2019-01-01 00:00:00",
"updatedTime": "2019-01-01 01:00:00",
"engineType": "spark",
"errorCode": 100,
"errDesc": "Task Failed with error code 100",
"executeApplicationName": "hello world",
"requestApplicationName": "hello world",
"runType": "xxx",
"paramJson": "{\"xxx\":\"xxx\"}",
"costTime": 10000,
"strongerExecId": "execId-xxx",
"sourceJson": "{\"xxx\":\"xxx\"}"
}],
"totalPage": 1
}
}

未完成的历史任务列表

接口地址:/api/rest_j/v1/jobhistory/listundone

请求方式:GET

请求数据类型:application/x-www-form-urlencoded

响应数据类型:application/json

接口描述:未完成的历史任务列表

请求参数:

参数名称参数说明请求类型是否必须数据类型schema
startDatestartDatepathfalseLong
endDateendDatepathfalseLong
statusstatuspathfalsestring
pageNowpageNowpathfalseInteger
pageSizepageSizepathfalseInteger
startTaskIDstartTaskIDpathfalseLong
engineTypeengineTypepathfalsestring
creatorcreatorpathfalsestring

响应示例:

{
"method": null,
"status": 0,
"message": "OK",
"data": {
"tasks": [{
"taskID": 1,
"instance": "xxx",
"execId": "exec-id-xxx",
"umUser": "test",
"engineInstance": "xxx",
"progress": "10%",
"logPath": "hdfs://xxx/xxx/xxx",
"resultLocation": "hdfs://xxx/xxx/xxx",
"status": "Running",
"createdTime": "2019-01-01 00:00:00",
"updatedTime": "2019-01-01 01:00:00",
"engineType": "spark",
"errorCode": 100,
"errDesc": "Task Failed with error code 100",
"executeApplicationName": "hello world",
"requestApplicationName": "hello world",
"runType": "xxx",
"paramJson": "{\"xxx\":\"xxx\"}",
"costTime": 10000,
"strongerExecId": "execId-xxx",
"sourceJson": "{\"xxx\":\"xxx\"}"
},
{
"taskID": 2,
"instance": "xxx",
"execId": "exec-id-xxx",
"umUser": "test",
"engineInstance": "xxx",
"progress": "10%",
"logPath": "hdfs://xxx/xxx/xxx",
"resultLocation": "hdfs://xxx/xxx/xxx",
"status": "Running",
"createdTime": "2019-01-01 00:00:00",
"updatedTime": "2019-01-01 01:00:00",
"engineType": "spark",
"errorCode": 100,
"errDesc": "Task Failed with error code 100",
"executeApplicationName": "hello world",
"requestApplicationName": "hello world",
"runType": "xxx",
"paramJson": "{\"xxx\":\"xxx\"}",
"costTime": 10000,
"strongerExecId": "execId-xxx",
"sourceJson": "{\"xxx\":\"xxx\"}"
}],
"totalPage": 1
}
}