历史作业API

QueryRestfulApi 类

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

请求方式:GET

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

响应数据类型:application/json

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

请求参数: 无

响应示例:

  1. {
  2. "method": null,
  3. "status": 0,
  4. "message": "OK",
  5. "data": {
  6. "admin": true
  7. }
  8. }

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

请求方式:GET

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

响应数据类型:application/json

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

请求参数:

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

响应示例:

  1. {
  2. "method": null,
  3. "status": 0,
  4. "message": "OK",
  5. "data": {
  6. "task": {
  7. "taskID": 1,
  8. "instance": "xxx",
  9. "execId": "exec-id-xxx",
  10. "umUser": "test",
  11. "engineInstance": "xxx",
  12. "progress": "10%",
  13. "logPath": "hdfs://xxx/xxx/xxx",
  14. "resultLocation": "hdfs://xxx/xxx/xxx",
  15. "status": "FAILED",
  16. "createdTime": "2019-01-01 00:00:00",
  17. "updatedTime": "2019-01-01 01:00:00",
  18. "engineType": "spark",
  19. "errorCode": 100,
  20. "errDesc": "Task Failed with error code 100",
  21. "executeApplicationName": "hello world",
  22. "requestApplicationName": "hello world",
  23. "runType": "xxx",
  24. "paramJson": "{\"xxx\":\"xxx\"}",
  25. "costTime": 10000,
  26. "strongerExecId": "execId-xxx",
  27. "sourceJson": "{\"xxx\":\"xxx\"}"
  28. }
  29. }
  30. }

接口地址:/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

响应示例:

  1. {
  2. "method": null,
  3. "status": 0,
  4. "message": "OK",
  5. "data": {
  6. "tasks": [{
  7. "taskID": 1,
  8. "instance": "xxx",
  9. "execId": "exec-id-xxx",
  10. "umUser": "test",
  11. "engineInstance": "xxx",
  12. "progress": "10%",
  13. "logPath": "hdfs://xxx/xxx/xxx",
  14. "resultLocation": "hdfs://xxx/xxx/xxx",
  15. "status": "FAILED",
  16. "createdTime": "2019-01-01 00:00:00",
  17. "updatedTime": "2019-01-01 01:00:00",
  18. "engineType": "spark",
  19. "errorCode": 100,
  20. "errDesc": "Task Failed with error code 100",
  21. "executeApplicationName": "hello world",
  22. "requestApplicationName": "hello world",
  23. "runType": "xxx",
  24. "paramJson": "{\"xxx\":\"xxx\"}",
  25. "costTime": 10000,
  26. "strongerExecId": "execId-xxx",
  27. "sourceJson": "{\"xxx\":\"xxx\"}"
  28. },
  29. {
  30. "taskID": 2,
  31. "instance": "xxx",
  32. "execId": "exec-id-xxx",
  33. "umUser": "test",
  34. "engineInstance": "xxx",
  35. "progress": "10%",
  36. "logPath": "hdfs://xxx/xxx/xxx",
  37. "resultLocation": "hdfs://xxx/xxx/xxx",
  38. "status": "FAILED",
  39. "createdTime": "2019-01-01 00:00:00",
  40. "updatedTime": "2019-01-01 01:00:00",
  41. "engineType": "spark",
  42. "errorCode": 100,
  43. "errDesc": "Task Failed with error code 100",
  44. "executeApplicationName": "hello world",
  45. "requestApplicationName": "hello world",
  46. "runType": "xxx",
  47. "paramJson": "{\"xxx\":\"xxx\"}",
  48. "costTime": 10000,
  49. "strongerExecId": "execId-xxx",
  50. "sourceJson": "{\"xxx\":\"xxx\"}"
  51. }],
  52. "totalPage": 1
  53. }
  54. }

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

请求方式:GET

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

响应数据类型:application/json

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

请求参数:

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

响应示例:

  1. {
  2. "method": null,
  3. "status": 0,
  4. "message": "OK",
  5. "data": {
  6. "tasks": [{
  7. "taskID": 1,
  8. "instance": "xxx",
  9. "execId": "exec-id-xxx",
  10. "umUser": "test",
  11. "engineInstance": "xxx",
  12. "progress": "10%",
  13. "logPath": "hdfs://xxx/xxx/xxx",
  14. "resultLocation": "hdfs://xxx/xxx/xxx",
  15. "status": "Running",
  16. "createdTime": "2019-01-01 00:00:00",
  17. "updatedTime": "2019-01-01 01:00:00",
  18. "engineType": "spark",
  19. "errorCode": 100,
  20. "errDesc": "Task Failed with error code 100",
  21. "executeApplicationName": "hello world",
  22. "requestApplicationName": "hello world",
  23. "runType": "xxx",
  24. "paramJson": "{\"xxx\":\"xxx\"}",
  25. "costTime": 10000,
  26. "strongerExecId": "execId-xxx",
  27. "sourceJson": "{\"xxx\":\"xxx\"}"
  28. },
  29. {
  30. "taskID": 2,
  31. "instance": "xxx",
  32. "execId": "exec-id-xxx",
  33. "umUser": "test",
  34. "engineInstance": "xxx",
  35. "progress": "10%",
  36. "logPath": "hdfs://xxx/xxx/xxx",
  37. "resultLocation": "hdfs://xxx/xxx/xxx",
  38. "status": "Running",
  39. "createdTime": "2019-01-01 00:00:00",
  40. "updatedTime": "2019-01-01 01:00:00",
  41. "engineType": "spark",
  42. "errorCode": 100,
  43. "errDesc": "Task Failed with error code 100",
  44. "executeApplicationName": "hello world",
  45. "requestApplicationName": "hello world",
  46. "runType": "xxx",
  47. "paramJson": "{\"xxx\":\"xxx\"}",
  48. "costTime": 10000,
  49. "strongerExecId": "execId-xxx",
  50. "sourceJson": "{\"xxx\":\"xxx\"}"
  51. }],
  52. "totalPage": 1
  53. }
  54. }