Querying Completed Tasks
Function
This API is used to query the tasks completed on the current day, on the previous day, and over the last seven days.
URI
- Parameter description
Table 1 URI parameters Parameter
Mandatory
Type
Description
project_id
Yes
String
Project ID. For details about how to obtain a project ID, see Project ID and Account ID.
type
No
String
Type of the tasks to be queried. The default value is all, indicating that all types of tasks will be queried. The following job operators are supported: Dummy, CDM Job, MRS Hive SQL, MRS Spark SQL, DLI SQL, DLI Spark, Python, DWS SQL, or Shell.
NOTE:The above operators are only examples.
This API collects successfully executed instances once an hour. A task is a job operator.
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
workspace |
No |
String |
Workspace ID
|
X-Auth-Token |
No |
String |
IAM Token Minimum length: 0 Maximum length: 4096 |
Response Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
yesterday |
No |
array[object] |
Task information of the previous day. For details, see task_record structure. |
average |
No |
array[object] |
Task information over the last seven days. For details, see task_record structure. |
today |
No |
array[object] |
Task information of the current day. For details, see task_record structure. |
Example Request
GET /v2/b384b9e9ab9b4ee8994c8633aabc9505/factory/monitor/task-completion-data?type=all
Example Response
- Success response
{ "yesterday": [ { "record_time": 1704124800000, "task_completion_num": 0 }, { "record_time": 1704128400000, "task_completion_num": 0 }, { "record_time": 1704132000000, "task_completion_num": 0 } ], "average": [ { "record_time": 1704124800000, "task_completion_num": 0 }, { "record_time": 1704128400000, "task_completion_num": 0 }, { "record_time": 1704132000000, "task_completion_num": 0 } ], "today": [ { "record_time": 1704124800000, "task_completion_num": 0 }, { "record_time": 1704128400000, "task_completion_num": 0 }, { "record_time": 1704132000000, "task_completion_num": 0 } ] }
- Failure response
{ "error_code": "DLF.3051", "error_msg": "The request parameter is invalid. " }
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot