Logo
OpenScaler

List Kubernetes clusters

GET
/v1/kubernetes/clusters

List Kubernetes clusters in a project, with pagination and optional node/resource expansion.

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 clusters per page (1–99).

Range1 <= value <= 99
include_nodes?boolean

When true, include full node VM details on each cluster.

include_node_ids?boolean

When true, include compact node id/name/uuid entries on each cluster.

include_resources?boolean

When true, attach aggregated live resource usage under resources on each cluster.

Response Body

application/json

application/json

text/pain

application/json

application/json

curl -X GET "https://example.com/v1/kubernetes/clusters?project_id=default&page=1&page_size=10"
{  "clusters": [    {      "id": "0193e8a2-7c4b-7b1e-9f3a-2d5c8e1f0a6b",      "user_id": "2abb7c25-a2d5-42ac-a776-e8ac5dfb16c3",      "project_id": "default",      "name": "my-cluster",      "description": "Production workloads",      "region": "alg1",      "vpc_id": "f47ac10b-58cc-4372-a567-0e02b2c3d479",      "api_endpoint": "https://k8s.example.com:6443",      "vpc_subnet": "10.0.20.0/24",      "public_ip": "10.99.88.77",      "os": "Debian 11",      "version": "1.32.2",      "size": "b-2-4-100",      "node_count": 3,      "status": "running",      "autoscale": false,      "min_nodes": 1,      "max_nodes": 6,      "tags": [],      "created_at": "2025-01-15T13:24:27Z",      "updated_at": "2025-01-15T13:24:27Z"    }  ]}
{  "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"    }  ]}