---
title: "List databases"
method: GET
path: "/v1/databases"
tags: ["Database"]
---

# List databases

`GET /v1/databases`

Lists all databases in the cluster.

## Query parameters

- `include` string[]

## Response `200`

OK response.

- ListDatabasesResponse
  - `databases` DatabaseSummary[], required — The databases managed by this cluster.
    - `available_upgrades` AvailableUpgrade[] — Newer stable image versions available in the same Postgres major / Spock major bucket. Present only when ?include=available_upgrades is set.
      - `image` string, required — Full container image reference for the upgrade candidate.
      - `postgres_version` string, required — Postgres version of the upgrade candidate.
      - `spock_version` string, required — Spock major version of the upgrade candidate.
    - `created_at` string, date-time, required — The time that the database was created.
    - `id` string, required — Unique identifier for the database.
    - `instances` Instance[] — All of the instances in the database.
      - `connection_info` InstanceConnectionInfo — Connection information for a pgEdge instance.
        - `addresses` string[] — The addresses of the host that's running this instance.
        - `port` integer — The host port that Postgres is listening on for this instance.
      - `created_at` string, date-time, required — The time that the instance was created.
      - `error` string — An error message if the instance is in an error state.
      - `host_id` string, required — The ID of the host this instance is running on.
      - `id` string, required — Unique identifier for the instance.
      - `node_name` string, required — The Spock node name for this instance.
      - `postgres` InstancePostgresStatus — Postgres status information for a pgEdge instance.
        - `patroni_paused` boolean — True if Patroni is paused for this instance.
        - `patroni_state` string
        - `pending_restart` boolean — True if this instance has a pending restart from a configuration change.
        - `role` string
        - `version` string — The version of Postgres for this instance.
      - `spock` InstanceSpockStatus — Spock status information for a pgEdge instance.
        - `read_only` string — The current spock.readonly setting.
        - `subscriptions` InstanceSubscription[] — Status information for this instance's Spock subscriptions.
          - `name` string, required — The name of the subscription.
          - `provider_node` string, required — The Spock node name of the provider for this subscription.
          - `status` string, required — The current status of the subscription.
        - `version` string — The version of Spock for this instance.
      - `state` 'creating' | 'modifying' | 'deleting' | 'backing_up' | 'available' | 'degraded' | 'failed' | 'stopped' | 'unknown', required
      - `status_updated_at` string, date-time — The time that the instance status information was last updated.
      - `updated_at` string, date-time, required — The time that the instance was last modified.
    - `state` 'creating' | 'modifying' | 'available' | 'deleting' | 'degraded' | 'failed' | 'backing_up' | 'restoring' | 'unknown', required — Current state of the database.
    - `tenant_id` string — Unique identifier for the database's owner.
    - `updated_at` string, date-time, required — The time that the database was last updated.

## Other responses

- `409` — Conflict response.
- `500` — Internal Server Error response.
- `default` — Unexpected error response

---

[API](https://skmtc.net/pgedge/apis/pgedge-control-plane-v1-api.md) · [All operations](https://skmtc.net/pgedge/apis/pgedge-control-plane-v1-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/pgedge/pgedge-control-plane-v1-api/versions/29a68546f34c/schema)
