> ## 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.

# List connections

No credentials.

`GET https://api.akua.dev/v1/vaults/{vault}/connections`

## 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

- `vault` (string, required): A vault id chosen by its creator, unique in the Workspace. `default` is the Workspace vault. Pattern: `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`. Example: `"default"`.

## Query Parameters

- `cursor` (string): Maximum string length: `512`.
- `limit` (integer): Required range: `1 <= x <= 100`.

## Response

### 200: VaultConnectionList

`application/json`: `VaultConnectionList`

- `data` (object[], required): Maximum array length: `100 elements`.
  - `name` (string, required): Resource name `vaults/{vault}/connections/{connection}`.
  - `id` (string, required): A connection id. Pattern: `^conn_[^\s/]{1,64}$`. Example: `"conn_j572abc123def456"`.
  - `connector` (string, required): A connector's stable slug. Pattern: `^[a-z0-9][a-z0-9_-]{0,63}$`. Example: `"akua"`.
  - `display_name` (string, required): Required string length: `1 - 100`.
  - `owner` (object, required): Who owns the connection: the Workspace (a shared account), one user (their own account) or an end customer user in a reseller vault.
    - Any of:
      - `workspace`
        - `type` (enum<string>, required): Available options: `"workspace"`.
      - `user`
        - `type` (enum<string>, required): Available options: `"user"`.
        - `user_id` (string, required)
      - `external_user`
        - `type` (enum<string>, required): Available options: `"external_user"`.
        - `external_user_id` (string, required)
  - `state` (enum<string>, required): Available options: `"PENDING_CONSENT"`, `"CONNECTED"`, `"REAUTH_REQUIRED"`, `"REVOKING"`, `"REVOKED"`, `"ERROR"`.
  - `created_at` (integer, required): Unix timestamp (seconds). Required range: `x >= 0`.
  - `etag` (string, required): Pass as `If-Match` on writes. OUTPUT_ONLY. Maximum string length: `64`.
- `has_more` (boolean, required)
- `next_cursor` (string | null, required): Maximum string length: `512`.

### 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)

### 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)

## Example request

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

## Example response

`200` `application/json`

```json
{
  "data": [
    {
      "name": "<string>",
      "id": "conn_j572abc123def456",
      "connector": "akua",
      "display_name": "<string>",
      "owner": {
        "type": "workspace"
      },
      "state": "PENDING_CONSENT",
      "created_at": 123,
      "etag": "<string>"
    }
  ],
  "has_more": true,
  "next_cursor": "<string>"
}
```
