Help Center/ Cloud Eye/ API Reference/ API V3/ Agent maintenance tasks/ Creating Agent maintenance Tasks in Batches
Updated on 2025-08-08 GMT+08:00

Creating Agent maintenance Tasks in Batches

Function

This API is used to create Agent maintenance tasks in batches.

Constraints

Currently, this API is not supported in the LA-Buenos Aires1 and LA-Lima1 regions.

Debugging

You can debug this API through automatic authentication in API Explorer or use the SDK sample code generated by API Explorer.

URI

POST /v3/{project_id}/agent-invocations/batch-create

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Specifies the project ID.

Minimum: 1

Maximum: 64

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

Content-Type

No

String

Specifies the MIME type of a request body. The default type is application/json; charset=UTF-8.

Default: application/json; charset=UTF-8

Minimum: 1

Maximum: 64

X-Auth-Token

No

String

Specifies the user token. It is a response to the API for obtaining a user token. This API is the only one that does not require authentication. The value of X-Subject-Token in the response header is the token.

Minimum: 1

Maximum: 16384

Table 3 Request body parameters

Parameter

Mandatory

Type

Description

instance_ids

No

Array of strings

Specifies the server ID list. (This parameter is mandatory when the task type is INSTALL or UPDATE.)

Array Length: 1 - 100

invocation_type

Yes

String

Task type. The options are INSTALL, UPDATE, ROLLBACK, RETRY, SET_REMOTE_INSTALL_HOST, and REMOTE_INSTALL.

Enumeration values:

  • INSTALL

  • UPDATE

  • ROLLBACK

  • RETRY

  • SET_REMOTE_INSTALL_HOST

  • REMOTE_INSTALL

invocation_target

No

String

Specifies the task object. Only telescope is supported.

Default: telescope

Enumeration values:

  • telescope

invocation_ids

No

Array of strings

Specifies the task ID list. This parameter is mandatory when the task type is ROLLBACK or RETRY.

Array Length: 1 - 100

version_type

No

String

Specifies the version the Agent will be upgraded to. The value can be BASIC_VERSION or ADVANCE_VERSION.

Enumeration values:

  • BASIC_VERSION

  • ADVANCE_VERSION

origin

No

String

Specifies the source that calls the Agent maintenance task APIs. CES indicates the Cloud Eye console, APICOM_BMS indicates Bare Metal Server (BMS), and ADMIN_SERVER indicates the O&M platform.

Enumeration values:

  • CES

  • APICOM_BMS

  • ADMIN_SERVER

version

No

String

Version number.

Minimum: 0

Maximum: 64

Regex Pattern: ^([0-9A-Za-z]|_|-|\.)+$

remote_install_meta

No

Array of RemoteInstallHostInfo objects

Information about the server for remotely installing the Agent when a remote installation task is created.

Array Length: 0 - 100

Table 4 RemoteInstallHostInfo

Parameter

Mandatory

Type

Description

instance_name

No

String

Name of the server for remotely installing the Agent.

Minimum: 1

Maximum: 128

remote_ip

No

String

IP address of the server for remotely installing the Agent.

Regex Pattern: ^(([0-9]|\.){1,15})$

user_name

No

String

Username for logging in to the server for remotely installing the Agent.

Minimum: 1

Maximum: 16

port

No

String

Port for logging in to the server for remotely installing the Agent.

Minimum: 1

Maximum: 5

password

No

String

Password for logging in to the server for remotely installing the Agent.

Minimum: 1

Maximum: 3000

remote_use_pem

No

Boolean

Whether a key pair is used to connect to the server for remotely installing the Agent. If the value is false, a password is used.

Default: false

Response Parameters

Status code: 201

Table 5 Response body parameters

Parameter

Type

Description

invocations

Array of BatchCreateInvocationInfo objects

Specifies the information list of the created task.

Array Length: 0 - 100

Table 6 BatchCreateInvocationInfo

Parameter

Type

Description

instance_id

String

Server ID.

Regex Pattern: ^[a-zA-Z0-9-]{1,64}$

invocation_id

String

Specifies the task ID.

Regex Pattern: ^[a-zA-Z0-9-]{1,64}$

ret_status

String

Specifies the task result. The value can be successful or error.

Enumeration values:

  • successful

  • error

error_code

String

Specifies the error code.

Regex Pattern: ^(invocationmgr\.[0-9]{4})$

error_msg

String

Specifies the error message.

Minimum: 1

Maximum: 128

Status code: 400

Table 7 Response body parameters

Parameter

Type

Description

error_code

String

Specifies the error code.

Regex Pattern: ^(taskmgr\.[0-9]{4})$

error_msg

String

Specifies the error message.

Minimum: 1

Maximum: 256

Status code: 401

Table 8 Response body parameters

Parameter

Type

Description

error_code

String

Specifies the error code.

Regex Pattern: ^(taskmgr\.[0-9]{4})$

error_msg

String

Specifies the error message.

Minimum: 1

Maximum: 256

Status code: 403

Table 9 Response body parameters

Parameter

Type

Description

error_code

String

Specifies the error code.

Regex Pattern: ^(taskmgr\.[0-9]{4})$

error_msg

String

Specifies the error message.

Minimum: 1

Maximum: 256

Status code: 500

Table 10 Response body parameters

Parameter

Type

Description

error_code

String

Specifies the error code.

Regex Pattern: ^(taskmgr\.[0-9]{4})$

error_msg

String

Specifies the error message.

Minimum: 1

Maximum: 256

Example Requests

{
  "instance_ids" : [ "instancexxx001", "instancexxx002" ],
  "invocation_type" : "INSTALL",
  "invocation_target" : "telescope"
}

Example Responses

Status code: 201

Created

[ {
  "instance_id" : "instancexxx001",
  "ret_status" : "successful"
}, {
  "instance_id" : "instancexxx002",
  "ret_status" : "error",
  "error_msg" : "do not meet the installation conditions"
} ]

Status Codes

Status Code

Description

201

Created

400

Bad Request

401

Unauthorized

403

Forbidden

500

Internal Server Error

Error Codes

See Error Codes.