Displaying Batch Details
Function
This API is used to query batch details, which is used to obtain the instance list in a batch by page. Filter criteria: pagination parameter
URI
GET /v1/job/script/orders/{execute_uuid}/batches/{batch_index}
|
Parameter |
Mandatory or Not |
Type |
Description |
|---|---|---|---|
|
batch_index |
Yes |
Integer |
Batch index. Minimum value: 1 Maximum value: 20 |
|
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 |
|
Parameter |
Mandatory or Not |
Type |
Description |
|---|---|---|---|
|
status |
No |
String |
Instance execution status. The options are as follows: READY: to be executed; PROCESSING: being executed; ABNORMAL: abnormal; CANCELED: canceled; FINISHED: successful. The value can be:
|
|
limit |
Yes |
Integer |
Pagination parameter: maximum number of records returned on each page. Minimum value: 1 Maximum value: 50 |
|
marker |
Yes |
Long |
Pagination parameter: ID of the last record on the previous page. Minimum value: 0 Maximum value: 2147483647 |
Request Parameters
None
Response Parameters
Status code: 200
|
Parameter |
Type |
Description |
|---|---|---|
|
batch_index |
Integer |
Batch index, starting from 1. |
|
total_instances |
Integer |
Number of instances executed in a batch |
|
execute_instances |
Array of ExectionInstanceModel objects |
Execution instance list, pagination |
|
Parameter |
Type |
Description |
|---|---|---|
|
id |
Long |
Primary key ID |
|
target_instance |
ResourceInstance object |
New instance |
|
gmt_created |
Long |
Creation time |
|
gmt_finished |
Long |
Completion time |
|
execute_costs |
Long |
Timeout interval, in seconds. |
|
status |
String |
Instance execution status The value can be:
|
|
message |
String |
Instance execution logs |
|
Parameter |
Type |
Description |
|---|---|---|
|
resource_id |
String |
Host ID of an ECS |
|
agent_sn |
String |
Agent management ID |
|
agent_status |
String |
Agent management status |
|
properties |
ResourceInstanceProp object |
Additional attributes of the host |
|
Parameter |
Type |
Description |
|---|---|---|
|
host_name |
String |
Host name |
|
fixed_ip |
String |
IP address of the internal network |
|
floating_ip |
String |
Elastic IP Address (EIP) |
|
region_id |
String |
Region ID |
|
zone_id |
String |
AZ |
|
application |
String |
CloudCMDB application. This parameter has a value only in the CloudCMDB application view, which is similar to the cloud services on the management plane. |
|
group |
String |
CloudCMDB group. This parameter has a value only in the CloudCMDB application view, which is similar to the schema of the management plane. |
|
project_id |
String |
Project ID of an instance. Consumption is required. This parameter is mandatory. |
Request Example
None
Response Example
Status code: 200
Response
{
"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" : "cn-north-7",
"zone_id" : "cn-north-7c",
"application" : null,
"group" : null,
"project_id" : null
}
},
"gmt_created" : 1697946452436,
"gmt_finished" : 1697946763467,
"execute_costs" : 311031,
"status" : "CANCELED",
"message" : "Script execution result"
} ]
}
}
Status Code
|
Status Code |
Description |
|---|---|
|
200 |
Response |
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.