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.
Authorization Information
Each account has all the permissions required to call all APIs, but IAM users must be assigned the required permissions.
- If you are using role/policy-based authorization, see Permissions Policies and Supported Actions for details on the required permissions.
- If you are using identity policy-based authorization, the following identity policy-based permissions are required.
Action
Access Level
Resource Type (*: required)
Condition Key
Alias
Dependencies
workspace:scheduledTasks:listRecords
List
scheduledTask *
-
-
-
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
None
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. |
|
expire_time |
String |
Expiration time in yyyy-MM-dd HH:mm:ss. |
|
extra_params |
String |
Extended parameter in JSON format. |
Status code: 400
|
Parameter |
Type |
Description |
|---|---|---|
|
error_code |
String |
Error code, which is returned upon failure. |
|
error_msg |
String |
Error message. |
|
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 message. |
|
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