Logo

Command Palette

Search for a command to run...

GET/clusters/:id

Optional Parameters

id
Cluster UID
show_log
Whether to show log in the response

Returns comprehensive details about the specified Kubernetes cluster.

Includes all associated metadata, node information, and related resources based on user permissions. Optionally includes cluster logs when requested.

Related Models:ClusterNode
Response Status Codes
Status CodeDescription
200Success - Returns cluster details
401Unauthorized - Authentication failed or missing OAuth token
403Forbidden - OAuth token lacks required `public` scope
404Not Found - Cluster not found

Request

GET
/clusters/:id
curl -X GET \
  "https://app.cloud66.com/api/3/clusters/:id" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json"

Response

{
  "response": {
    "id": 123,
    "uid": "5999b763474b0eafa5fafb64bff0ba80",
    "name": "Production Cluster",
    "environment": "production",
    "cloud": "AWS",
    "region": "us-east-1",
    "status": 1,
    "health": 3,
    "kubernetes_version": "1.28.2",
    "node_count": 5,
    "nodes": [
      {
        "name": "node-1",
        "status": "Ready",
        "instance_type": "m5.large",
        "capacity": {
          "cpu": "2",
          "memory": "8Gi",
          "pods": "29"
        }
      }
    ],
    "created_at": "2023-01-15T10:30:00Z",
    "updated_at": "2023-01-15T11:00:00Z",
    "created_at_iso": "2023-01-15T10:30:00Z",
    "updated_at_iso": "2023-01-15T11:00:00Z"
  }
}
GET/clusters

Optional Parameters

page
Page number for pagination (defaults to 1, minimum 1)

Retrieves a paginated list of all Kubernetes clusters the user can access.

Returns a paginated collection of cluster resources that the authenticated user has access to. Clusters represent managed Kubernetes environments for container orchestration.

Related Models:ClusterPagination
Response Status Codes
Status CodeDescription
200Success - Returns paginated list of clusters
401Unauthorized - Authentication failed or missing OAuth token
403Forbidden - OAuth token lacks required `public` scope

Request

GET
/clusters
curl -X GET \
  "https://app.cloud66.com/api/3/clusters" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json"

Response

{
  "response": [
    {
      "id": 123,
      "uid": "5999b763474b0eafa5fafb64bff0ba80",
      "name": "Production Cluster",
      "environment": "production",
      "cloud": "AWS",
      "status": 1,
      "health": 3,
      "kubernetes_version": "1.28.2",
      "node_count": 5,
      "created_at": "2023-01-15T10:30:00Z",
      "updated_at": "2023-01-15T11:00:00Z",
      "created_at_iso": "2023-01-15T10:30:00Z",
      "updated_at_iso": "2023-01-15T11:00:00Z"
    },
    {
      "id": 124,
      "uid": "6000c874585c1fbfb6gbc75cgg1cb91",
      "name": "Staging Cluster",
      "environment": "staging",
      "cloud": "DigitalOcean",
      "status": 1,
      "health": 3,
      "kubernetes_version": "1.28.1",
      "node_count": 3,
      "created_at": "2023-01-10T14:20:00Z",
      "updated_at": "2023-01-10T15:00:00Z",
      "created_at_iso": "2023-01-10T14:20:00Z",
      "updated_at_iso": "2023-01-10T15:00:00Z"
    }
  ],
  "count": 2,
  "pagination": {
    "previous": null,
    "next": null,
    "current": 1,
    "per_page": 100,
    "count": 2,
    "pages": 1
  }
}
POST/clusters

Creates a new Kubernetes cluster with the provided parameters.

Related Models:Cluster
Response Status Codes
Status CodeDescription
501Not Implemented - Cluster creation not yet available
401Unauthorized - Authentication failed or missing OAuth token
403Forbidden - OAuth token lacks required `redeploy` scope

Request

POST
/clusters
curl -X POST \
  "https://app.cloud66.com/api/3/clusters" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json"

Response

{
  "response": {
    "message": "Not implemented yet",
    "status": "not_implemented"
  }
}
POST/clusters/:id/reboot_servers

Optional Parameters

id
Cluster UID
strategy
Reboot strategy (optional)
group
Server group to reboot (optional)

Executes reboot operations on servers within the specified Kubernetes cluster.

This operation is performed asynchronously and returns an async action object to track progress. Requires admin permissions on the cluster resource.

The async action can be monitored using the Get Stack Action endpoint to track the reboot progress.

Response Status Codes
Status CodeDescription
200Success - Returns async action to track server reboot
401Unauthorized - Authentication failed or missing OAuth token
403Forbidden - OAuth token lacks required `admin` scope or insufficient permissions
404Not Found - Cluster not found

Request

POST
/clusters/:id/reboot_servers
curl -X POST \
  "https://app.cloud66.com/api/3/clusters/:id/reboot_servers" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json"

Response

{
  "response": {
    "id": 789,
    "status": "queued",
    "action_type": "stack_reboot",
    "resource_type": "stack",
    "resource_id": 123,
    "started_via": "api",
    "started_at": null,
    "finished_at": null,
    "finished_success": null,
    "finished_message": null,
    "created_at": "2023-01-15T10:30:00Z",
    "updated_at": "2023-01-15T10:30:00Z"
  }
}