Logo
OpenScaler
API DocumentationElastic Servers

List elastic servers

GET
/v1/elastic-servers

List elastic server pools in a project.

Authorization

bearer_auth
AuthorizationBearer <token>

OAuth Authentication

OpenScaler API uses OAuth, a standard for secure authorization. To access the API, obtain a token via the OpenScaler Platform.

Use the access_token in the Authorization header for requests:

Authorization: Bearer <token>

Always keep your token secure and do not share it with anyone.

In: header

Query Parameters

project_id*string

ID of the project used to filter results.

page*integer

Page number (1-based).

Range1 <= value
page_size*integer

Number of elastic servers per page.

Range1 <= value
region?string

Filter by region slug.

Response Body

application/json

application/json

text/pain

application/json

application/json

curl -X GET "https://example.com/v1/elastic-servers?project_id=default&page=1&page_size=10"
{  "elastic_servers": [    {      "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",      "name": "my-servers",      "description": "My elastic servers",      "user_id": "2abb7c25-a2d5-42ac-a776-e8ac5dfb16c3",      "project_id": "default",      "distro": "debian-12",      "region": "alg1",      "vcpus": 1,      "storageGB": 25,      "memoryMB": 1024,      "transferGB": 1000,      "size": "s-1vcpu-1gb",      "vpc_id": "f47ac10b-58cc-4372-a567-0e02b2c3d479",      "vpc_subnet": "10.0.20.0/24",      "scale_config": {        "autoscale": true,        "min_nodes": 1,        "max_nodes": 5,        "autoscaling_metrics": [          {            "type": "cpu",            "min_threshold": 30,            "max_threshold": 60          }        ],        "cooldown": 90,        "metrics_interval": 60      },      "paused": false,      "created_at": "2024-06-01T12:00:00Z",      "updated_at": "2024-06-15T08:30:00Z"    }  ]}
{  "errors": [    {      "message": "'vcpus' field must be an integer",      "field": "resource_id"    }  ]}
"Access denied"
{  "errors": [    {      "message": "User not initialized (missing required fields in token), please init user by sending POST request to `/v1/init` then refresh your token\n"    }  ]}
{  "errors": [    {      "message": "VM with ID 23 not found"    }  ]}