API v2: Poolsยถ

Pools serve grouping purposes for the server objects based on the same protocol to be managed within other objects (for example, accounts) as one server.


Data Structuresยถ

PoolModelยถ

Attribute

Type

Required

Description

id

string

yes

Read-only object identifier. Requires the following rights on object type pool depending on the HTTP method used: GET โ†’ read, PATCH โ†’ modify, DELETE โ†’ delete.

name

string

yes

Unique poolโ€™s name

description

string

no

servers

object-array

Read-only; expensive to use; JSON object array containing id, mask, name, port and address of assigned servers.

server_ids

string-array

Read-only; hidden; expensive to use

server_names

string-array

Read-only; hidden; expensive to use

protocol

string

Read-only; expensive to use.

rights

string-array

Read-only. List of rights the subject has to this object.

created_at

datetime

Read-only

modified_at

datetime

Read-only

removed

boolean

Read-only

builtin

boolean

Read-only; expensive to use; if true, the object is not editable.

hidden

boolean

Read-only; expensive to use; if true, the object is hidden in UI.

Retrieve Available Attributes of the PoolModelยถ

Request

Method

GET

Path

/api/v2/objspec/pool

To check allowed methods, available URL parameters and possible responses please refer to the API Overview section.

Refer to the Batch operations topic to create nested requests for operating on the Pool objects.


Get Pools Listยถ

Request

Method

GET

Path

/api/v2/pool

Example Request

GET /api/v2/pool

Response

    {
"result": "success",
"pool": [
    {
        "id": "1232678819172646913",
        "name": "Linux servers",
        "description": "Example Linux pool",
        "created_at": "2022-10-20 02:01:38.373501-07",
        "modified_at": "2022-10-20 02:01:38.373501-07",
        "servers": [
            "1202678819172646913"
        ]
    },
    {
        "id": "41232678819172646914",
        "name": "Windows servers",
        "description": "Example Windows pool",
        "created_at": "2022-10-20 02:01:38.376251-07",
        "modified_at": "2022-10-20 02:01:38.376251-07",
        "servers": [
            "1202678819172646914"
        ]
    },
    {
        "id": "1232678819172646915",
        "name": "test-pool",
        "created_at": "2022-10-24 06:34:53.510281-07",
        "modified_at": "2022-10-24 06:34:53.510281-07",
        "servers": [
            "1202678819172646913"
        ]}]}

Get a Poolยถ

Request

Method

GET

Path

/api/v2/pool/<id>

Example Request

GET /api/v2/pool/<id>

Response

    {
"result": "success",
"pool": {
    "id": "1232678819172646915",
    "name": "test-pool",
    "created_at": "2022-10-24 06:34:53.510281-07",
    "modified_at": "2022-10-24 06:34:53.510281-07",
    "servers": [
        "1202678819172646913"
    ]}}

Create a Poolยถ

Request

Method

POST

Path

/api/v2/pool

Headers

Content-Type: Application/json

Body

PoolModel

Example Request

POST /api/v2/pool

{"name": "my-2nd-pool"}

Response

    { "result": "success",
"pool": {
    "id": "1202678819172646916" }}

Modify a Poolยถ

Request

Method

PATCH

Path

/api/v2/pool/<id>

Headers

Content-Type: Application/json

Body

PoolModel

Example Request

PATCH /api/v2/pool/<id>

{"name": "my-cool-pool"}

Response

{ "result": "success" }

Deleting a Poolยถ

Request

Method

DELETE

Path

/api/v2/pool/<id>