Querying Completed Tasks
Function
This API is used to query the tasks completed on the current day, 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.
Table 2 Query parameters Parameter
Mandatory
Type
Description
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.
start_day
No
String
Date for obtaining the task completion status, which is in yyyy-MM-dd format. The default value is today.
start_time
No
Integer
Start time for obtaining the task completion status. The default value is 00:00. The value is on the hour and ranges from 0 to 23.
NOTE:For example, if start_day is 2025-01-18, and start_time is 10:
The tasks completed during the following time periods are returned:
2025-01-18 10:00:00 to 2025-01-19 09:59:59: one day starting from 2025-01-18 10:00:00
2025-01-17 10:00:00 to 2025-01-18 09:59:59: previous day
2025-01-11 10:00:00 to 2025-01-18 09:59:59: average number of tasks completed over the last seven days
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] |
Tasks of the previous day. For details, see the task_record structure. |
average |
No |
array[object] |
Tasks of the last seven days on average. For details, see the task_record structure. |
today |
No |
array[object] |
Tasks of the current day. For details, see the 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