History Job Interface

QueryRestfulApi class

governanceStationAdmin

Interface address:/api/rest_j/v1/jobhistory/governanceStationAdmin

Request method: GET

Request data type: application/x-www-form-urlencoded

Response data type: application/json

Interface description: Determine whether the user is an administrator

Request Parameters: none

Sample Response:

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

getHistoryTask

Interface address:/api/rest_j/v1/jobhistory/{id}/get

Request method: GET

Request data type: application/x-www-form-urlencoded

Response data type: application/json

Interface description: Get the list of database names of the data source

Request Parameters:

Parameter nameParameter descriptionRequest typeRequiredData typeschema
ididpathtruestring

Sample Response:

  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. }

listHistoryTask

Interface address:/api/rest_j/v1/jobhistory/list

Request method: GET

Request data type: application/x-www-form-urlencoded

Response data type: application/json

Interface description:

Request Parameters:

Parameter nameParameter descriptionRequest typeRequiredData typeschema
startDatestartDatepathfalseLong
endDateendDatepathfalseLong
statusstatuspathfalsestring
pageNowpageNowpathfalseInteger
pageSizepageSizepathfalseInteger
taskIDtaskIDpathfalseLong
executeApplicationNameexecuteApplicationNamepathfalsestring
creatorcreatorpathfalsestring
proxyUserproxyUserpathfalsestring
isAdminViewisAdminViewpathfalseBoolean

Sample Response:

  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. }

listUndoneHistoryTask

Interface address:/api/rest_j/v1/jobhistory/listundone

Request method: GET

Request data type: application/x-www-form-urlencoded

Response data type: application/json

Interface description:

Request Parameters:

Parameter nameParameter descriptionRequest typeRequiredData typeschema
startDatestartDatepathfalseLong
endDateendDatepathfalseLong
statusstatuspathfalsestring
pageNowpageNowpathfalseInteger
pageSizepageSizepathfalseInteger
startTaskIDstartTaskIDpathfalseLong
engineTypeengineTypepathfalsestring
creatorcreatorpathfalsestring

Sample Response:

  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. }