Displaying Instance Status Statistics
Function
This API is used to query the instance execution status statistics of a specified service ticket.
Constraints
Query the real-time execution status of instances in a service ticket.
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
coc:job:get
Read
job *
-
-
-
-
coc:JobType
URI
GET /v1/job/script/orders/{execute_uuid}/statistics
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
execute_uuid |
Yes |
String |
Definition: Execution ID of a script service ticket, which is obtained from the response bodies of executeJobScript and ListJobScriptOrders. Constraints: N/A. Value range: N/A. Default value: N/A. |
Request Parameters
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
X-Auth-Token |
Yes |
String |
Definition: Tenant token. Constraints: Tenant token obtained from IAM. Value range: N/A. Default value: N/A. |
|
X-Language |
No |
String |
Definition: Internationalization tag. zh-cn indicates Chinese, and en-us or no value indicates English. Constraints: zh-cn indicates Chinese, and en-us or no value indicates English. Value range: zh-cn and en-us Default value: N/A. |
|
x-project-id |
No |
String |
Definition: The project ID. Constraints: Project ID corresponding to the region. Value range: N/A. Default value: N/A. |
|
x-user-profile |
No |
String |
Definition: IAM 5.0 user information. Constraints: N/A. Value range: N/A. Default value: N/A. |
Response Parameters
Status code: 200
|
Parameter |
Type |
Description |
|---|---|---|
|
data |
Definition: Instance status statistics. Value range: N/A. |
|
Parameter |
Type |
Description |
|---|---|---|
|
total_instance |
Integer |
Definition: Total instances. Value range: N/A. |
|
execute_statistics |
Array of ExectuionStatistic objects |
Definition: Status count, which records the total instances in the status and the batches that contain the status. Value range: N/A. |
|
Parameter |
Type |
Description |
|---|---|---|
|
instance_status |
String |
Definition: Status of an execution instance. Value range: N/A. |
|
instance_count |
Integer |
Definition: Number of instances executed in the status. Value range: N/A. |
|
batch_indexes |
Array of integers |
Definition: Batch index list in the status. Value range: N/A. |
Example Requests
Query the instance status statistics of a specified service ticket.
GET https://{Endpoint}/v1/job/script/orders/{execute_uuid}/statistics
Example Responses
Status code: 200
The instance status statistics are returned.
For more status codes, see Status Codes.
{
"data" : {
"total_instance" : 1,
"execute_statistics" : [ {
"instance_status" : "READY",
"instance_count" : 0,
"batch_indexes" : [ ]
}, {
"instance_status" : "PROCESSING",
"instance_count" : 0,
"batch_indexes" : [ ]
}, {
"instance_status" : "ABNORMAL",
"instance_count" : 0,
"batch_indexes" : [ ]
}, {
"instance_status" : "CANCELED",
"instance_count" : 1,
"batch_indexes" : [ 1 ]
}, {
"instance_status" : "FINISHED",
"instance_count" : 0,
"batch_indexes" : [ ]
} ]
}
}
Status Codes
|
Status Code |
Description |
|---|---|
|
200 |
The instance status statistics are returned. For more status codes, see Status Codes. |
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