Help Center/ Cloud Eye/ API Reference/ API v3/ Agent maintenance tasks/ Querying the Agent Maintenance Tasks
Updated on 2024-04-30 GMT+08:00

Querying the Agent Maintenance Tasks

Function

This API is used to querying the Agent maintenance tasks.

Constraints

This API is not supported at the following regions: LA-Buenos Aires1, and LA-Lima1.

URI

GET /v3/{project_id}/agent-invocations

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Specifies the project ID.

Minimum: 1

Maximum: 64

Regex Pattern: ^[a-z0-9]+$

Table 2 Query Parameters

Parameter

Mandatory

Type

Description

instance_id

No

String

Specifies the server ID.

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

instance_type

No

String

Specifies the server type. The value can be ECS or BMS.

Enumeration values:

  • ECS
  • BMS

invocation_id

No

String

Specifies the task ID.

Regex Pattern: ^([0-9A-Za-z]){1}([0-9A-Za-z]|_|-)*$

invocation_type

No

String

Specifies the task type, which can be INSTALL, UPDATE, ROLLBACK or RETRY.

Enumeration values:

  • INSTALL
  • UPDATE
  • ROLLBACK
  • RETRY

invocation_target

No

String

Specifies the task object. Only telescope is supported.

Default: telescope

Enumeration values:

  • telescope

offset

No

Long

Specifies the pagination offset.

Minimum: 0

Maximum: 9999999999999

Default: 0

limit

No

Integer

Specifies the number of records on each page.

Minimum: 1

Maximum: 100

Default: 100

Request Parameters

Table 3 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

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

Response Parameters

Status code: 200

Table 4 Response body parameters

Parameter

Type

Description

invocations

Array of InvocationInfo objects

Specifies the task list.

Array Length: 0 - 100

count

Long

Specifies the total number of tasks in the task list.

Minimum: 0

Maximum: 9999999999999

Table 5 InvocationInfo

Parameter

Type

Description

invocation_id

String

Specifies the task ID.

Regex Pattern: ^([0-9A-Za-z]){1}([0-9A-Za-z]|_|-)*$

instance_id

String

Specifies the server ID.

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

instance_name

String

Specifies the server name.

Minimum: 1

Maximum: 128

instance_type

String

Specifies the server type. The value can be ECS or BMS.

Enumeration values:

  • ECS
  • BMS

intranet_ips

Array of strings

Specifies the private IP address list.

Array Length: 0 - 10

elastic_ips

Array of strings

Specifies the EIP list.

Array Length: 0 - 10

invocation_type

String

Specifies the task type, which can be INSTALL, UPDATE, ROLLBACK or RETRY.

Enumeration values:

  • INSTALL
  • UPDATE
  • ROLLBACK
  • RETRY

invocation_status

String

Specifies the task status. The value can be PENDING, RUNNING, TIMEOUT, FAILED, SUCCEEDED, CANCELED, or ROLLBACKED.

Enumeration values:

  • PENDING
  • RUNNING
  • TIMEOUT
  • FAILED
  • SUCCEEDED
  • CANCELED
  • ROLLBACKED

invocation_target

String

Specifies the task object. Only telescope is supported.

Enumeration values:

  • telescope

create_time

Long

Specifies when the task was created.

Minimum: 1111111111111

Maximum: 9999999999999

update_time

Long

Specifies when the task was updated.

Minimum: 1111111111111

Maximum: 9999999999999

current_version

String

Specifies the current version of the Agent.

Minimum: 1

Maximum: 64

target_version

String

Specifies the target version.

Minimum: 1

Maximum: 64

Status code: 400

Table 6 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 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: 403

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: 500

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

Example Requests

None

Example Responses

Status code: 200

OK

{
  "invocations" : [ {
    "invocation_id" : "invocationxxx001",
    "instance_id" : "instancexxx001",
    "instance_name" : "xxxx",
    "instance_type" : "ECS",
    "intranet_ips" : [ "10.xxx.xx.1" ],
    "elastic_ips" : [ "1.xx.xx.1" ],
    "invocation_type" : "INSTALL",
    "invocation_status" : "RUNNING",
    "invocation_target" : "telescope",
    "current_version" : "2.5.1",
    "target_version" : "2.6.1",
    "create_time" : 1678070008306,
    "update_time" : 1678070008306
  } ],
  "count" : 1
}

Status Codes

Status Code

Description

200

OK

400

Bad Request

401

Unauthorized

403

Forbidden

500

Internal Server Error

Error Codes

See Error Codes.