Querying the Execution Records of a Scheduled Task
Function
Query the execution records of a scheduled task.
Debugging
You can debug this API through automatic authentication in API Explorer or use the SDK sample code generated by API Explorer.
URI
GET /v2/{project_id}/scheduled-tasks/{task_id}/records
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Project ID. |
task_id |
Yes |
String |
Task ID. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
offset |
No |
Integer |
Where the pagination query starts. The value starts from 0. |
limit |
No |
Integer |
Limits the quantity of returned desktops in pagination query. The value ranges from 0 to 100. The default value is 10. |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
X-Auth-Token |
No |
String |
User token. It can be obtained by calling the IAM API used to obtain a user token. The value of X-Subject-Token in the response header is the user token. |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
tasks_records |
Array of ScheduledTasksRecords objects |
Scheduled task execution records. |
total_count |
Integer |
Total number. |
Parameter |
Type |
Description |
---|---|---|
id |
String |
Task execution record ID. |
start_time |
String |
Execution time in yyyy-MM-dd HH:mm:ss. |
task_type |
String |
Task type. START: start; STOP: stop; REBOOT: restart; HIBERNATE: hibernate; REBUILD: recompose the system disk. |
scheduled_type |
String |
Execution period type. FIXED_TIME: specified time. DAY: by day. WEEK: by week. MONTH: by month. |
life_cycle_type |
String |
Triggering scenario type. |
status |
String |
Execution status. |
success_num |
Integer |
Number of successful desktops. |
failed_num |
Integer |
Specifies the number of failed desktops. |
skip_num |
Integer |
Number of skipped desktops. |
time_zone |
String |
Time zone. |
execute_task_id |
String |
ID of the scheduled task to be executed. This parameter is returned only when the scheduled script is executed. |
execute_object_type |
String |
Object type of the scheduled task to be executed. This parameter is returned only when the scheduled script is executed. |
Status code: 400
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code, which is returned upon failure. |
error_msg |
String |
Error description. |
error_detail |
String |
Error details. |
encoded_authorization_message |
String |
Encrypted detailed reason for rejection. You can call the API decode-authorization-message of STS to decrypt the reason. |
Status code: 500
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code, which is returned upon failure. |
error_msg |
String |
Error description. |
error_detail |
String |
Error details. |
encoded_authorization_message |
String |
Encrypted detailed reason for rejection. You can call the API decode-authorization-message of STS to decrypt the reason. |
Example Requests
None
Example Responses
Status code: 200
Normal.
{ "tasks_records" : [ { "id" : "2b31e-d520xxxx-xxebedb6-e57xxxxxx", "start_time" : "2022-12-31 09:00:00", "task_type" : "START", "scheduled_type" : "FIXED_TIME", "status" : "SUCCESS", "success_num" : 1, "failed_num" : 1, "skip_num" : 1, "time_zone" : "Asia/Shanghai", "execute_task_id" : "string", "execute_object_type" : "string" } ], "total_count" : 10 }
Status Codes
Status Code |
Description |
---|---|
200 |
Normal. |
400 |
The request cannot be understood by the server due to malformed syntax. |
500 |
An internal service error occurred. For details about the error code, see the error code description. |
Error Codes
See Error Codes.
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