Help Center/ Cloud Operations Center/ API Reference/ API/ Script Tickets/ Displaying Instance Status Statistics
Updated on 2024-04-19 GMT+08:00

Displaying Instance Status Statistics

Function

This API is used to query instance status statistics.

URI

GET /v1/job/script/orders/{execute_uuid}/statistics

Table 1 Path parameters

Parameter

Mandatory or Not

Type

Description

execute_uuid

Yes

String

Execution ID of a script service ticket, which is obtained from the response bodies of executeJobScript and ListJobScriptOrders.

Minimum length: 1 character

Maximum length: 26 characters

Request Parameters

None

Response Parameters

Status code: 200

Table 2 Response body parameters

Parameter

Type

Description

total_instance

Integer

Total instances.

execute_statistics

Array of ExectuionStatistic objects

Each state has a count, which records the total number of instances in this state and the batch list containing the state.

Table 3 ExectuionStatistic

Parameter

Type

Description

instance_status

String

Execution instance status

instance_count

Integer

Number of instances executed in this state

batch_indexes

Array of integers

Batch index list in this state

Request Example

None

Response Example

Status code: 200

{
  "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 Code

Status Code

Description

200

Instance state statistics

Error code

See Error code.