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.
URI
POST /v3/{project_id}/agent-invocations/batch-create
Parameter | Mandatory | Type | Description |
|---|---|---|---|
project_id | Yes | String | Definition: Project ID. It is used to specify the project that an asset belongs to. You can query the assets of a project by project ID. You can obtain the project ID from the API or console. For details, see Obtaining a Project ID. Range: 1 to 64 characters Constraints N/A Range 1 to 64 characters Default Value N/A |
Request Parameters
Parameter | Mandatory | Type | Description |
|---|---|---|---|
Content-Type | No | String | Definition MIME type of the request body. Constraints N/A Range 1 to 64 characters Default Value application/json; charset=UTF-8 |
X-Auth-Token | No | String | Definition User project token. It is a response to the API used to obtain 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. Constraints N/A Range 1 to 16,384 characters Default Value N/A |
Parameter | Mandatory | Type | Description |
|---|---|---|---|
instance_ids | No | Array of strings | Definition Server ID list. (This parameter is mandatory when the task type is INSTALL or UPDATE.) Range The array length ranges from 1 to 100. |
invocation_type | Yes | String | Definition Task type. Range
|
invocation_target | No | String | Definition Task object. The value can only be telescope. Range
|
invocation_ids | No | Array of strings | Definition Task ID list. This parameter is mandatory when the task type is ROLLBACK or RETRY. Range The array length ranges from 1 to 100. |
version_type | No | String | Definition Version that the Agent will be upgraded to. Range
|
origin | No | String | Definition Source for calling the Agent task APIs. Range
|
version | No | String | Definition Version number. Range [0,64] |
remote_install_meta | No | Array of RemoteInstallHostInfo objects | Definition Information about the server for remotely installing the Agent when a remote installation task is created. Range [0,100] |
Parameter | Mandatory | Type | Description |
|---|---|---|---|
instance_name | No | String | Definition Name of the server for remotely installing the Agent. Range [1,128] |
remote_ip | No | String | Definition IP address of the server for remotely installing the Agent. Range The value allows 1 to 15 characters and can only contain digits and dots (.). |
user_name | No | String | Definition Username for logging in to the server for remotely installing the Agent. Range [1,16] |
port | No | String | Definition Port for logging in to the server for remotely installing the Agent. Range [1,5] |
password | No | String | Definition Password for logging in to the server for remotely installing the Agent. Range [1,3000] |
remote_use_pem | No | Boolean | Definition 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. Range
|
Response Parameters
Status code: 201
Parameter | Type | Description |
|---|---|---|
invocations | Array of BatchCreateInvocationInfo objects | Definition Information list of the created task. Range [0,100] |
Parameter | Type | Description |
|---|---|---|
instance_id | String | Definition Server ID. Range The value allows 1 to 64 characters and can only contain letters, digits, and hyphens (-). |
invocation_id | String | Definition Task ID. Range The value allows 1 to 64 characters and can only contain letters, digits, and hyphens (-). |
ret_status | String | Definition Task result. The value can be successful or error. Range
|
error_code | String | Definition Error code. Range The value starts with "invocationmgr." and is followed by four digits. |
error_msg | String | Definition Error message. Range [1,128] |
Status code: 400
Parameter | Type | Description |
|---|---|---|
error_code | String | Specifies the error code. |
error_msg | String | Specifies the error message. |
Status code: 401
Parameter | Type | Description |
|---|---|---|
error_code | String | Specifies the error code. |
error_msg | String | Specifies the error message. |
Status code: 403
Parameter | Type | Description |
|---|---|---|
error_code | String | Specifies the error code. |
error_msg | String | Specifies the error message. |
Status code: 500
Parameter | Type | Description |
|---|---|---|
error_code | String | Specifies the error code. |
error_msg | String | Specifies the error message. |
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.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.

