Help Center/ Cloud Operations Center/ API Reference/ API/ Script Management/ Script Tickets/ Displaying the Batch Details of a Service Ticket
Updated on 2025-10-24 GMT+08:00

Displaying the Batch Details of a Service Ticket

Function

This API is used to query batch details, which is used to obtain the instance list in a batch by page.

Constraints

Filter criteria: pagination parameter.

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}/batches/{batch_index}

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

batch_index

Yes

Integer

Definition:

Batch index.

Constraints:

N/A.

Value range:

N/A.

Default value:

N/A.

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.

Table 2 Query Parameters

Parameter

Mandatory

Type

Description

status

No

String

Definition:

Instance execution status.

Constraints:

The value can be READY,

PROCESSING,

ABNORMAL,

CANCELED,

and FINISHED.

Value range:

READY, PROCESSING, ABNORMAL, CANCELED, or FINISHED.

Default value:

N/A.

limit

Yes

Integer

Definition:

Pagination parameter, which indicates the maximum number of records returned on each page.

Constraints:

N/A.

Value range:

N/A.

Default value:

N/A.

marker

No

Long

Definition:

Pagination parameter, which indicates ID of the last record on the previous page.

Constraints:

N/A.

Value range:

N/A.

Default value:

N/A.

Request Parameters

Table 3 Request header 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

Table 4 Response body parameters

Parameter

Type

Description

data

JobScriptBatchDetailModel object

Definition:

Response body of batch details.

Value range:

N/A.

Table 5 JobScriptBatchDetailModel

Parameter

Type

Description

batch_index

Integer

Definition:

Batch index, starting from 1.

Value range:

N/A.

total_instances

Integer

Definition:

Number of instances executed in a batch.

Value range:

N/A.

execute_instances

Array of ExectionInstanceModel objects

Definition:

Instances of execution, by page.

Value range:

N/A.

Table 6 ExectionInstanceModel

Parameter

Type

Description

id

Long

Definition:

Primary key ID.

Value range:

N/A.

target_instance

ResourceInstance object

Definition:

Target instance.

Value range:

N/A.

gmt_created

Long

Definition:

Creation time.

Value range:

N/A.

gmt_finished

Long

Definition:

Completion time.

Value range:

N/A.

execute_costs

Long

Definition:

Duration consumed, in seconds.

Value range:

N/A.

status

String

Definition:

Instance execution status.

Value range:

The value can be READY,

PROCESSING,

ABNORMAL,

CANCELED,

FINISHED,

or ROLLED BACK.

message

String

Definition:

Execution logs of an instance.

Value range:

N/A.

Table 7 ResourceInstance

Parameter

Type

Description

resource_id

String

Definition:

Unique ID of an instance.

Constraints:

N/A.

Value range:

N/A.

Default value:

N/A.

provider

String

Definition:

Resource provider: ECS. For a single script ticket, the provider of each instance is the same.

Constraints:

N/A.

Value range:

N/A.

Default value:

N/A.

region_id

String

Definition:

ID of the region to which the host belongs.

Constraints:

N/A.

Value range:

N/A.

Default value:

N/A.

type

String

Definition:

Resource type of the resource provider. If this parameter is not specified, CLOUDSERVER is used by default.

CLOUDSERVER: Cloud server type.

Constraints:

N/A.

Value range:

N/A.

Default value:

N/A.

custom_attributes

Array of Customttribute objects

Definition:

Custom attributes in the key_value format. A maximum of five attributes can be customized.

Constraints:

The length of the key is 10.

The length of the value is 20.

The maximum length of the map is 5.

Value range:

N/A.

Default value:

N/A.

agent_sn

String

Definition:

Agent management ID. This parameter will be discarded. Do not use it.

Constraints:

N/A.

Value range:

N/A.

Default value:

N/A.

agent_status

String

Definition:

Agent management status. This parameter will be discarded. Do not use it.

Constraints:

N/A.

Value range:

N/A.

Default value:

N/A.

properties

ResourceInstanceProp object

Definition:

Additional attributes of a host. This parameter will be discarded. Do not use it.

Constraints:

N/A.

Value range:

N/A.

Default value:

N/A.

Table 8 Customttribute

Parameter

Type

Description

key

String

Definition:

Key of a custom attribute.

Constraints:

N/A.

Value range:

N/A.

Default value:

N/A.

value

String

Definition:

Value of a custom attribute.

Constraints:

N/A.

Value range:

N/A.

Default value:

N/A.

Table 9 ResourceInstanceProp

Parameter

Type

Description

host_name

String

Definition:

The host name.

Constraints:

N/A.

Value range:

N/A.

Default value:

N/A.

fixed_ip

String

Definition:

Private IP address.

Constraints:

N/A.

Value range:

N/A.

Default value:

N/A.

floating_ip

String

Definition:

Elastic IP address.

Constraints:

N/A.

Value range:

N/A.

Default value:

N/A.

region_id

String

Definition:

Region.

Constraints:

N/A.

Value range:

N/A.

Default value:

N/A.

zone_id

String

Definition:

AZ.

Constraints:

N/A.

Value range:

N/A.

Default value:

N/A.

application

String

Definition:

CloudCMDB application. This parameter has a value only in the CloudCMDB application view, which is similar to the cloud services on the management plane.

Constraints:

N/A.

Value range:

N/A.

Default value:

N/A.

group

String

Definition:

CloudCMDB group. This parameter has a value only in the CloudCMDB application view, which is similar to the schema of the management plane.

Constraints:

N/A.

Value range:

N/A.

Default value:

N/A.

project_id

String

Definition:

Project ID of the instance.

Constraints:

N/A.

Value range:

N/A.

Default value:

N/A.

Example Requests

Display the batch details of a service ticket.

GET https://{Endpoint}/v1/job/script/orders/{execute_uuid}/batches/{batch_index}

Example Responses

Status code: 200

The result is returned.

For more status codes, see Status Codes.

{
  "data" : {
    "batch_index" : 1,
    "total_instances" : 1,
    "execute_instances" : [ {
      "id" : 1588,
      "target_instance" : {
        "resource_id" : "resource_id",
        "agent_sn" : "agent_sn",
        "agent_status" : null,
        "region_id" : null,
        "project_id" : null,
        "properties" : {
          "host_name" : "host_name",
          "fixed_ip" : "x.x.x.x",
          "floating_ip" : null,
          "region_id" : "***",
          "zone_id" : "***",
          "application" : null,
          "group" : null,
          "project_id" : null
        }
      },
      "gmt_created" : 1697946452436,
      "gmt_finished" : 1697946763467,
      "execute_costs" : 311031,
      "status" : "CANCELED",
      "message" : "Script execution result"
    } ]
  }
}

Status Codes

Status Code

Description

200

The result is returned.

For more status codes, see Status Codes.

Error Codes

See Error Codes.