Monitoring Playbook Running
Function
This API is used to monitor the running status of a playbook.
Calling Method
For details, see Calling APIs.
URI
GET /v1/{project_id}/workspaces/{workspace_id}/soc/playbooks/{playbook_id}/monitor
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Project ID. |
workspace_id |
Yes |
String |
Workspace ID. |
playbook_id |
Yes |
String |
Playbook ID. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
start_time |
Yes |
String |
Start time. ISO 8601 format: YYYY-MM-DDTHH:mm:ss.ms+timezone. Example: 2021-01-30T23:00:00Z+0800. The time zone is the one where the playbook instance was generated. If this parameter cannot be parsed, the default time zone GMT+8 is used. |
version_query_type |
Yes |
String |
Playbook version type. The options are: ALL: All versions; VALID: Valid versions; DELETED: Deleted versions. |
end_time |
Yes |
String |
End time. ISO 8601 format: YYYY-MM-DDTHH:mm:ss.ms+timezone. Example: 2021-01-30T23:00:00Z+0800. The time zone is the one where the playbook instance was generated. If this parameter cannot be parsed, the default time zone GMT+8 is used. |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
X-Auth-Token |
Yes |
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. |
content-type |
Yes |
String |
application/json;charset=UTF-8 |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
X-request-id |
String |
Request ID. Format: request_uuid-timestamp-hostname. |
Parameter |
Type |
Description |
---|---|---|
code |
String |
Error code. |
message |
String |
Error message. |
data |
Playbook monitoring details. |
Parameter |
Type |
Description |
---|---|---|
total_instance_run_num |
Integer |
Total execution times. |
schedule_instance_run_num |
Integer |
Number of scheduled executions. |
event_instance_run_num |
Integer |
Number of time-triggered executions. |
average_run_time |
Number |
Average running duration. |
min_run_time_instance |
Workflow with the shortest running duration. |
|
max_run_time_instance |
Workflow with the longest running duration. |
|
total_instance_num |
Integer |
Total number of playbook instances. |
success_instance_num |
Integer |
Number of instances that have been executed successfully. |
fail_instance_num |
Integer |
Number of instances that failed to be executed. |
terminate_instance_num |
Integer |
Number of terminated instances. |
running_instance_num |
Integer |
Number of running instances. |
Parameter |
Type |
Description |
---|---|---|
playbook_instance_id |
String |
Playbook instance ID. |
playbook_instance_name |
String |
Playbook instance name. |
playbook_instance_run_time |
Number |
Playbook instance running time. |
Status code: 400
Parameter |
Type |
Description |
---|---|---|
X-request-id |
String |
Request ID. Format: request_uuid-timestamp-hostname. |
Parameter |
Type |
Description |
---|---|---|
code |
String |
Error code. |
message |
String |
Error description. |
Example Requests
None
Example Responses
Status code: 200
Response to a successful request.
{ "code" : "00000000", "message" : "", "data" : { "total_instance_run_num" : "Unknown Type: in", "schedule_instance_run_num" : 99999999, "event_instance_run_num" : 99999999, "average_run_time" : 9999999999, "min_run_time_instance" : { "playbook_instance_id" : "string", "playbook_instance_name" : "string", "playbook_instance_run_time" : 9999999999 }, "max_run_time_instance" : { "playbook_instance_id" : "string", "playbook_instance_name" : "string", "playbook_instance_run_time" : 9999999999 }, "total_instance_num" : 99999999, "success_instance_num" : 99999999, "fail_instance_num" : 99999999, "terminate_instance_num" : 99999999, "running_instance_num" : 99999999 } }
Status Codes
Status Code |
Description |
---|---|
200 |
Response to a successful request. |
400 |
Response message for failed requests. |
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