Updated on 2024-04-22 GMT+08:00

Obtaining Edge Resource Pools

Function

This API is used to obtain edge resource pools.

URI

GET /v2/{project_id}/edge-pools

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID. For details, see Obtaining a Project ID and Name.

Table 2 Query Parameters

Parameter

Mandatory

Type

Description

is_paged

No

Boolean

Whether to display records on different pages

Default: false

page_size

No

Integer

Page number

Minimum: 1

Maximum: 1000

Default: 100

page_num

No

Integer

Number of records displayed on each page

Minimum: 1

Maximum: 10000

Default: 1

name_like

No

String

Name for fuzzy search

order_by

No

String

Sorting mode. Data is sorted in ascending or descending order based on the value of sort_name. asc indicates the ascending order, and desc indicates the descending order. Options:

  • asc

  • desc

Default: desc

sort_name

No

String

Sorting field. Options:

  • created_at

  • updated_at

Default: created_at

state

No

String

Status for filtering. You can select only one option. Options:

  • Running

  • Abnormal

Request Parameters

Table 3 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

User token. For details about how to obtain a user token, see Authentication.

Response Parameters

Status code: 200

Table 4 Response body parameters

Parameter

Type

Description

count

Integer

Total number of edge resource pools

edge_pools

Array of EdgePoolListItemDto objects

Response body for obtaining edge resource pools

Table 5 EdgePoolListItemDto

Parameter

Type

Description

id

String

Edge pool ID

name

String

Name of an edge resource pool

state

String

Edge pool status

project_id

String

Project ID

workspace_id

String

Workspace ID

created_at

Long

Creation time

updated_at

Long

Update time

description

String

Description

Status code: 400

Table 6 Response body parameters

Parameter

Type

Description

error_code

String

Error code

error_msg

String

Error description

detail

String

Error details

params

Array of strings

Error parameters

Array Length: 0 - 1

reason

String

Error cause

advice

String

Suggestion

Status code: 500

Table 7 Response body parameters

Parameter

Type

Description

error_code

String

Error code

error_msg

String

Error description

detail

String

Error details

params

Array of strings

Error parameters

Array Length: 0 - 1

reason

String

Error cause

advice

String

Suggestion

Example Requests

This request is used to obtain edge resource pools, which are displayed on one page containing a maximum of 10 records.

GET https://{endpoint}/v2/{project_id}/edge-pools?is_paged=true&page_size=10&page_num=1

Example Responses

Status code: 200

Response body for obtaining edge resource pools

{
  "count" : 2,
  "edge_pools" : [ {
    "id" : "xxx",
    "name" : "test1",
    "state" : "Running",
    "project_id" : "xxx",
    "workspace_id" : "0",
    "created_at" : 1685611513591,
    "updated_at" : 1685611513591
  }, {
    "id" : "xxx",
    "name" : "test2",
    "state" : "Running",
    "project_id" : "xxx",
    "workspace_id" : "0",
    "created_at" : 1683344661036,
    "updated_at" : 1683344661036
  } ]
}

Status Codes

Status Code

Description

200

Response body for obtaining edge resource pools

400

Request error

500

Internal error

Error Codes

See Error Codes.