Updated on 2024-05-11 GMT+08:00

Querying the Client List

Function

Querying the Client List

Debugging

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

URI

GET /v3/{project_id}/agents

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID

Table 2 Query Parameters

Parameter

Mandatory

Type

Description

agent_id

No

String

Client ID

limit

No

String

Number of records displayed on each page

Minimum: 1

Maximum: 1000

offset

No

Integer

Query offset, which is a positive integer

status

No

String

Status

Request Parameters

Table 3 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

User token The token can be obtained by calling the IAM API used to obtain a user token. The value of X-Subject-Token in the response header is the user token.

Response Parameters

Status code: 200

Table 4 Response body parameters

Parameter

Type

Description

agents

Array of Agent objects

Client list

count

Integer

Client quantity

limit

Integer

Number of records displayed on each page

offset

Integer

Offset where the query starts

Table 5 Agent

Parameter

Type

Description

created_at

String

Time when the Agent was installed

updated_at

String

Time when the Agent was updated

agent_id

String

Client ID

agent_version

String

Agent version

agent_type

String

Agent type

host_name

String

Name of the host where the Agent is installed

host_nickname

String

Host alias

host_ip

String

Host IP address

host_os

String

Host OS

status

String

Agent status

last_active_time

String

Time when the Agent was last activated

paths

Array of Path objects

Backup path of the client

Table 6 Path

Parameter

Type

Description

id

String

Path ID

status

String

Path status, which can either be available or remove

agent_id

String

ID of the Agent to which the path belongs

dir_path

String

Path details

Example Requests

GET  https://{endpoint}/v3/{project_id}/agents

Example Responses

Status code: 200

OK

{
  "count" : 2,
  "limit" : 1000,
  "offset" : 0,
  "agents" : [ {
    "created_at" : "2022-01-30T09:28:09.334+00:00",
    "agent_id" : "489654f2-363b-4ebf-966a-bdf079d97114",
    "host_name" : "eBackup",
    "host_ip" : "18.9.158.36",
    "status" : "normal",
    "last_active_time" : "2022-01-30T09:28:08.960+00:00"
  }, {
    "created_at" : "2022-01-14T06:47:17.524+00:00",
    "updated_at" : "2022-01-28T05:01:32.739+00:00",
    "agent_id" : "fb711278-e872-4224-b442-8dafc36a543d",
    "host_name" : "ecs-00001",
    "host_ip" : "10.10.0.1",
    "status" : "normal",
    "last_active_time" : "2022-01-28T05:01:32.000+00:00",
    "paths" : [ {
      "id" : "6c3d1ed6-b7d7-4e27-94ee-321431e84c5c",
      "dir_path" : "/home/hcp",
      "status" : "available",
      "agent_id" : "fb711278-e872-4224-b442-8dafc36a543d"
    }, {
      "id" : "e2af0fdd-9644-4db8-986e-5a6a2395c390",
      "dir_path" : "/opt/workspace",
      "status" : "available",
      "agent_id" : "fb711278-e872-4224-b442-8dafc36a543d"
    } ]
  } ]
}

Status Codes

Status Code

Description

200

OK

Error Codes

See Error Codes.