History Job Interface

QueryRestfulApi class

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

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 name Parameter description Request type Required Data type schema
id id path true string

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

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 name Parameter description Request type Required Data type schema
startDate startDate path false Long
endDate endDate path false Long
status status path false string
pageNow pageNow path false Integer
pageSize pageSize path false Integer
taskID taskID path false Long
executeApplicationName executeApplicationName path false string
creator creator path false string
proxyUser proxyUser path false string
isAdminView isAdminView path false Boolean

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

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 name Parameter description Request type Required Data type schema
startDate startDate path false Long
endDate endDate path false Long
status status path false string
pageNow pageNow path false Integer
pageSize pageSize path false Integer
startTaskID startTaskID path false Long
engineType engineType path false string
creator creator path false string

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