> ## Documentation Index
> Fetch the complete documentation index at: https://docs.akua.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Get a Cluster

`GET https://api.akua.dev/v1/clusters/{id}`

## Authorizations

- `Authorization: Bearer <token>` (BearerAuth): Bearer token for the authenticated caller.

## Headers

- `akua-context` (string): Optional workspace/scope context for the request. Carries a single workspace wire id (`ws_…`) today. Only needed for broad tokens - a workspace-owned token implies its workspace. Required string length: `1 - 53`. Example: `"ws_j572abc123def4"`.

## Path Parameters

- `id` (string, required): Cluster ID. Required string length: `3 - 54`.

## Response

### 200: The Cluster

`application/json`: `Cluster`

- `id` (string, required): Required string length: `3 - 54`.
- `html_url` (string<uri>, required): Maximum string length: `2048`.
- `workspace_id` (string, required): Required string length: `2 - 53`.
- `name` (string, required): A DNS label, unique in the Workspace. Required string length: `1 - 63`. Pattern: `^[a-z0-9](?:[-a-z0-9]*[a-z0-9])?$`. Example: `"shop"`.
- `kind` (enum<string>, required): Available options: `"hosted"`, `"attached"`.
- `region_id` (string | null, required): The Region of a hosted Cluster; null for an attached one. Required string length: `3 - 54`.
- `state` (enum<string>, required): `provisioning`: the hosted control plane starts. `awaiting_node`: join a server with a join token. `awaiting_agent`: install the agent (attached) or wait for it. `configuring`: the baseline is placed. `disconnected`: the agent stopped calling; workloads keep running. Available options: `"provisioning"`, `"awaiting_node"`, `"awaiting_agent"`, `"configuring"`, `"ready"`, `"degraded"`, `"disconnected"`, `"failed"`, `"deleting"`, `"deleted"`.
- `capabilities` (enum<string>[], required)
- `storage_classes` (object[]): The StorageClasses Akua runs here and an Install can use, from its healthy storage capabilities. OUTPUT_ONLY. No class is the cluster default: an Install names one on every volume, the one asked for or the one Akua picks.
  - `name` (string, required): A Kubernetes StorageClass name. Required string length: `1 - 253`. Pattern: `^[a-z0-9](?:[-a-z0-9]*[a-z0-9])?(?:\.[a-z0-9](?:[-a-z0-9]*[a-z0-9])?)*$`. Example: `"local-path"`.
  - `attachment` (enum<string>, required): `node_local`: the volume lives on the disk of the node its first Pod ran on, fastest and fixed to that node. `network`: the volume attaches over the network and follows its Pod to another node. Available options: `"node_local"`, `"network"`.
- `ready_nodes` (integer, required): Required range: `x >= 0`.
- `conditions` (object[], required): Maximum array length: `32 elements`. What needs attention now; empty when nothing does. Reasons:
  - `agent-enrollment-conflict` (error): the Kubernetes UID is already bound to another Cluster. Delete the previous Cluster in its owning instance, wait for completed deletion, then run this Cluster’s install command again. Deleting the local identity Secret alone does not release that binding.
  - `node-bootstrap-unconfirmed` (info): the first node and in-cluster agent are not confirmed. Names each Machine latest guest-reported stage when available; otherwise no report has arrived. A RUNNING Machine does not establish guest bootstrap success.
  - `bootstrap-failed` (error): a Machine guest reported bootstrap failure, with its safe step and exit code.
  - `agent-offline` (warning): the agent is not connected; workloads keep running and nothing new rolls out until it reconnects.
  - `updater-behind` (warning): the updater has run another release than the agent for 30 minutes, so no agent release is offered. Remedy `run-agent-install` on an attached Cluster; none on a hosted one, whose agent and updater Akua re-applies.
  - `needs-customer-upgrade` (warning): the offered agent release changes objects outside the access you granted, so it was not applied. Remedy `customer-upgrade` names the missing permissions and the `helm upgrade` command.
  - `bundle-too-large` (warning): the offered agent release is too large to deliver or to keep as a rollback copy, so it was not applied.
  - `update-rolled-back`, `baseline-degraded` (warning): a capability release failed its health gate and was rolled back, or a capability is not healthy; see the Cluster’s capabilities. A list shows `baseline-degraded` from the Cluster state only; `update-rolled-back` appears when the Cluster is read on its own.
  - When `state` is `failed`, one error whose reason says why: `control-plane-unready`, `enrollment-expired`, `agent-unsupported`, `baseline-failed`, `baseline-rollback-failed`, `cleanup-unconfirmed`, `node-removal-failed` or `agent-bundle-failed`.
  - `reason` (string, required): Kebab-case reason; the resource documents the reasons it reports. Maximum string length: `64`. Pattern: `^[a-z0-9]+(?:-[a-z0-9]+)*$`. Example: `"agent-offline"`.
  - `severity` (enum<string>, required): `error`: the resource failed; the condition says why. `warning`: it is limited or held until the person acts or it recovers. `info`: worth knowing, nothing to do. Available options: `"error"`, `"warning"`, `"info"`.
  - `message` (string, required): Safe to show the person as is. Maximum string length: `512`.
  - `remedy` (object | null, required): What the person can do; null when nothing they do helps.
    - Any of:
      - `free-capacity`
        - `kind` (enum<string>, required): Available options: `"free-capacity"`.
        - `metric` (enum<string>, required): Available options: `"kaas/clusters"`, `"compute/machines"`, `"compute/cpu"`, `"compute/memory"`, `"compute/machines_concurrency"`, `"compute/managed_vm_trial"`, `"agents/turns_concurrency"`, `"agents/sandboxes"`, `"agents/sandboxes_running"`, `"agents/retained_filesystem_lifetime"`, `"codemode/executions"`, `"api/secrets_access"`, `"api/secrets_write"`, `"domain_routing/preview_hostnames"`, `"domain_routing/custom_domains"`, `"source_control/repositories"`.
        - `limit` (integer, required)
        - `usage` (integer, required)
        - `hint` (string, required): Maximum string length: `256`.
      - `upgrade-plan`
        - `kind` (enum<string>, required): Available options: `"upgrade-plan"`.
        - `metric` (enum<string>, required): Available options: `"kaas/clusters"`, `"compute/machines"`, `"compute/cpu"`, `"compute/memory"`, `"compute/machines_concurrency"`, `"compute/managed_vm_trial"`, `"agents/turns_concurrency"`, `"agents/sandboxes"`, `"agents/sandboxes_running"`, `"agents/retained_filesystem_lifetime"`, `"codemode/executions"`, `"api/secrets_access"`, `"api/secrets_write"`, `"domain_routing/preview_hostnames"`, `"domain_routing/custom_domains"`, `"source_control/repositories"`.
      - `grant-access`
        - `kind` (enum<string>, required): Available options: `"grant-access"`.
        - `namespace` (string | null, required): Maximum string length: `63`.
        - `permissions` (string[], required): Required array length: `1 - 64 elements`.
      - `reconnect`
        - `kind` (enum<string>, required): Available options: `"reconnect"`.
        - `what` (enum<string>, required): Available options: `"cluster-agent"`, `"connection"`.
      - `add-machine`
        - `kind` (enum<string>, required): Available options: `"add-machine"`.
      - `add-billing`
        - `kind` (enum<string>, required): Available options: `"add-billing"`.
      - `change-input`
        - `kind` (enum<string>, required): Available options: `"change-input"`.
        - `path` (string[], required): Maximum array length: `32 elements`.
      - `retry`
        - `kind` (enum<string>, required): Available options: `"retry"`.
        - `after_seconds` (integer | null, required)
      - `run-agent-install`
        - `kind` (enum<string>, required): Run the command from `POST /v1/clusters/{id}/connector_install` again; it re-applies the ClusterConnector and its updater at one release. Available options: `"run-agent-install"`.
      - `customer-upgrade`
        - `kind` (enum<string>, required): The change needs rights the agent was not granted. Run `command` (a `helm upgrade`, no secret) with an identity that holds `permissions`, or grant them to the agent. Available options: `"customer-upgrade"`.
        - `permissions` (string[], required): Required array length: `1 - 64 elements`.
        - `command` (string, required): Required string length: `1 - 8192`.
  - `last_transition_at` (integer, required): Unix timestamp (seconds) when this condition last changed. Required range: `x >= 0`.
- `operation_id` (string, required): The latest Operation: the create, or the deletion once requested. Required string length: `2 - 192`.
- `connector` (object, required)
  - `status` (enum<string>, required): `pending`: installed or enrolled, no contact yet. Available options: `"pending"`, `"connected"`, `"offline"`, `"revoked"`.
  - `version` (string): The release it runs.
  - `last_seen_at` (integer): Unix timestamp (seconds). Required range: `x >= 0`.
- `created_at` (integer, required): Unix timestamp (seconds). Required range: `x >= 0`.
- `etag` (string, required)

### 400: The request is malformed.

`application/json`: `ApiBadRequest`

- `_tag` (enum<string>, required): Available options: `"Validation"`.
- `success` (enum<boolean>, required): Available options: `false`.
- `errors` (object[], required): Minimum array length: `1 element`.
  - `code` (integer, required): Machine-readable error code. Required range: `-9007199254740991 <= x <= 9007199254740991`. Example: `7002`.
  - `message` (string, required): Human-readable error message. Example: `"Resource not found"`.
  - `path` (string[]): Field path that caused the error, when applicable. Example: `["body","name"]`.
  - `metadata` (record<string, string>)
- `result` (object, required)

### 401: Missing, invalid or expired credential.

`application/json`: `ApiUnauthorized`

- `_tag` (enum<string>, required): Available options: `"Unauthorized"`.
- `success` (enum<boolean>, required): Available options: `false`.
- `errors` (object[], required): Minimum array length: `1 element`.
  - `code` (integer, required): Machine-readable error code. Required range: `-9007199254740991 <= x <= 9007199254740991`. Example: `7002`.
  - `message` (string, required): Human-readable error message. Example: `"Resource not found"`.
  - `path` (string[]): Field path that caused the error, when applicable. Example: `["body","name"]`.
  - `metadata` (record<string, string>)
- `result` (object, required)

### 403: The credential may not act in this workspace.

`application/json`: `ApiForbidden`

- `_tag` (enum<string>, required): Available options: `"Forbidden"`.
- `success` (enum<boolean>, required): Available options: `false`.
- `errors` (object[], required): Minimum array length: `1 element`.
  - `code` (integer, required): Machine-readable error code. Required range: `-9007199254740991 <= x <= 9007199254740991`. Example: `7002`.
  - `message` (string, required): Human-readable error message. Example: `"Resource not found"`.
  - `path` (string[]): Field path that caused the error, when applicable. Example: `["body","name"]`.
  - `metadata` (record<string, string>)
- `result` (object, required)

### 404: The resource was not found in this workspace.

`application/json`: `ApiNotFound`

- `_tag` (enum<string>, required): Available options: `"NotFound"`.
- `success` (enum<boolean>, required): Available options: `false`.
- `errors` (object[], required): Minimum array length: `1 element`.
  - `code` (integer, required): Machine-readable error code. Required range: `-9007199254740991 <= x <= 9007199254740991`. Example: `7002`.
  - `message` (string, required): Human-readable error message. Example: `"Resource not found"`.
  - `path` (string[]): Field path that caused the error, when applicable. Example: `["body","name"]`.
  - `metadata` (record<string, string>)
- `result` (object, required)

### 409: The request conflicts with existing resource state or immutable intent. | The resource changed since the etag the client sent; the current etag is in the metadata. | The idempotency key was already used for a different request.

`application/json`: `object`

- Any of:
  - `Conflict`
    - `_tag` (enum<string>, required): Available options: `"Conflict"`.
    - `success` (enum<boolean>, required): Available options: `false`.
    - `errors` (object[], required): Minimum array length: `1 element`.
      - `code` (integer, required): Machine-readable error code. Required range: `-9007199254740991 <= x <= 9007199254740991`. Example: `7002`.
      - `message` (string, required): Human-readable error message. Example: `"Resource not found"`.
      - `path` (string[]): Field path that caused the error, when applicable. Example: `["body","name"]`.
      - `metadata` (record<string, string>)
    - `result` (object, required)
  - `PreconditionFailed`
    - `_tag` (enum<string>, required): Available options: `"PreconditionFailed"`.
    - `success` (enum<boolean>, required): Available options: `false`.
    - `errors` (object[], required): Required array length: `1 - 1 element`.
      - `code` (enum<number>, required): Available options: `7006`.
      - `message` (string, required)
      - `metadata` (object, required)
        - `current_etag` (string, required)
        - `{key}` (string)
    - `result` (object, required)
  - `IdempotencyConflict`
    - `_tag` (enum<string>, required): Available options: `"IdempotencyConflict"`.
    - `success` (enum<boolean>, required): Available options: `false`.
    - `errors` (object[], required): Minimum array length: `1 element`.
      - `code` (integer, required): Machine-readable error code. Required range: `-9007199254740991 <= x <= 9007199254740991`. Example: `7002`.
      - `message` (string, required): Human-readable error message. Example: `"Resource not found"`.
      - `path` (string[]): Field path that caused the error, when applicable. Example: `["body","name"]`.
      - `metadata` (record<string, string>)
    - `result` (object, required)

### 410: The resource is permanently unavailable.

`application/json`: `ApiGone`

- `_tag` (enum<string>, required): Available options: `"Gone"`.
- `success` (enum<boolean>, required): Available options: `false`.
- `errors` (object[], required): Minimum array length: `1 element`.
  - `code` (integer, required): Machine-readable error code. Required range: `-9007199254740991 <= x <= 9007199254740991`. Example: `7002`.
  - `message` (string, required): Human-readable error message. Example: `"Resource not found"`.
  - `path` (string[]): Field path that caused the error, when applicable. Example: `["body","name"]`.
  - `metadata` (record<string, string>)
- `result` (object, required)

### 422: The request is well-formed but cannot be processed.

`application/json`: `ApiUnprocessable`

- `_tag` (enum<string>, required): Available options: `"Unprocessable"`.
- `success` (enum<boolean>, required): Available options: `false`.
- `errors` (object[], required): Minimum array length: `1 element`.
  - `code` (integer, required): Machine-readable error code. Required range: `-9007199254740991 <= x <= 9007199254740991`. Example: `7002`.
  - `message` (string, required): Human-readable error message. Example: `"Resource not found"`.
  - `path` (string[]): Field path that caused the error, when applicable. Example: `["body","name"]`.
  - `metadata` (record<string, string>)
- `result` (object, required)

### 429: The caller is over a rate budget, or a resource it adds to is at its limit (resource exhausted).

`application/json`: `ApiTooManyRequests`

- `_tag` (enum<string>, required): Available options: `"TooManyRequests"`.
- `success` (enum<boolean>, required): Available options: `false`.
- `errors` (object[], required): Minimum array length: `1 element`.
  - `code` (integer, required): Machine-readable error code. Required range: `-9007199254740991 <= x <= 9007199254740991`. Example: `7002`.
  - `message` (string, required): Human-readable error message. Example: `"Resource not found"`.
  - `path` (string[]): Field path that caused the error, when applicable. Example: `["body","name"]`.
  - `metadata` (record<string, string>)
- `result` (object, required)

### 500: The server failed to handle the request.

`application/json`: `ApiInternalServerError`

- `_tag` (enum<string>, required): Available options: `"InternalServerError"`.
- `success` (enum<boolean>, required): Available options: `false`.
- `errors` (object[], required): Required array length: `1 - 1 element`.
  - `code` (enum<number>, required): Available options: `7009`.
  - `message` (enum<string>, required): Available options: `"Internal server error"`.
- `result` (object, required)

### 502: An upstream provider failed.

`application/json`: `ApiExternalServiceError`

- `_tag` (enum<string>, required): Available options: `"ExternalServiceError"`.
- `success` (enum<boolean>, required): Available options: `false`.
- `errors` (object[], required): Minimum array length: `1 element`.
  - `code` (integer, required): Machine-readable error code. Required range: `-9007199254740991 <= x <= 9007199254740991`. Example: `7002`.
  - `message` (string, required): Human-readable error message. Example: `"Resource not found"`.
  - `path` (string[]): Field path that caused the error, when applicable. Example: `["body","name"]`.
  - `metadata` (record<string, string>)
- `result` (object, required)

### 503: The service is temporarily unavailable.

`application/json`: `ApiServiceUnavailable`

- `_tag` (enum<string>, required): Available options: `"ServiceUnavailable"`.
- `success` (enum<boolean>, required): Available options: `false`.
- `errors` (object[], required): Minimum array length: `1 element`.
  - `code` (integer, required): Machine-readable error code. Required range: `-9007199254740991 <= x <= 9007199254740991`. Example: `7002`.
  - `message` (string, required): Human-readable error message. Example: `"Resource not found"`.
  - `path` (string[]): Field path that caused the error, when applicable. Example: `["body","name"]`.
  - `metadata` (record<string, string>)
- `result` (object, required)

### 504: An upstream provider did not answer in time.

`application/json`: `ApiGatewayTimeout`

- `_tag` (enum<string>, required): Available options: `"GatewayTimeout"`.
- `success` (enum<boolean>, required): Available options: `false`.
- `errors` (object[], required): Minimum array length: `1 element`.
  - `code` (integer, required): Machine-readable error code. Required range: `-9007199254740991 <= x <= 9007199254740991`. Example: `7002`.
  - `message` (string, required): Human-readable error message. Example: `"Resource not found"`.
  - `path` (string[]): Field path that caused the error, when applicable. Example: `["body","name"]`.
  - `metadata` (record<string, string>)
- `result` (object, required)

## Example request

```bash
curl --request GET \
  --url 'https://api.akua.dev/v1/clusters/clu_j572abc123def456' \
  --header 'Authorization: Bearer <token>'
```

## Example response

`200` `application/json`

```json
{
  "id": "clu_j572abc123def456",
  "html_url": "https://example.com",
  "workspace_id": "ws_j572abc123def456",
  "name": "shop",
  "kind": "hosted",
  "region_id": "reg_j572abc123def456",
  "state": "provisioning",
  "capabilities": [
    "https_ingress"
  ],
  "storage_classes": [
    {
      "name": "local-path",
      "attachment": "node_local"
    }
  ],
  "ready_nodes": 123,
  "conditions": [
    {
      "reason": "agent-offline",
      "severity": "error",
      "message": "<string>",
      "remedy": {
        "kind": "free-capacity",
        "metric": "kaas/clusters",
        "limit": 123,
        "usage": 123,
        "hint": "<string>"
      },
      "last_transition_at": 123
    }
  ],
  "operation_id": "op_j572abc123def456",
  "connector": {
    "status": "pending",
    "version": "<string>",
    "last_seen_at": 123
  },
  "created_at": 123,
  "etag": "<string>"
}
```
