---
title: "List hosts"
method: GET
path: "/v1/hosts"
tags: ["Host"]
---

# List hosts

`GET /v1/hosts`

Lists all hosts within the cluster.

## Response `200`

OK response.

- ListHostsResponse
  - `hosts` Host[], required — List of hosts in the cluster
    - `client_addresses` string[], required — The addresses that this host advertises to client applications.
    - `cohort` HostCohort
      - `control_available` boolean, required — Indicates if the host is a control node in the cohort.
      - `member_id` string, required — The member ID of the host within the cohort.
      - `type` string, required — The type of cohort that the host belongs to.
    - `cpus` integer — The number of CPUs on this host.
    - `data_dir` string, required — The data directory for the host.
    - `default_pgedge_version` PgEdgeVersion
      - `postgres_version` string, required — The Postgres major and minor version.
      - `spock_version` string, required — The Spock major version.
    - `etcd_mode` 'server' | 'client' — The etcd mode for this host.
    - `id` string, required — Unique identifier for the host.
    - `memory` string — The amount of memory available on this host.
    - `orchestrator` string, required — The orchestrator used by this host.
    - `peer_addresses` string[], required — The addresses that this host advertises to other hosts.
    - `status` HostStatus, required
      - `components` object, required — The status of each component of the host.
      - `state` 'healthy' | 'unreachable' | 'degraded' | 'unknown', required
      - `updated_at` string, date-time, required — The last time the host status was updated.
    - `supported_pgedge_versions` PgEdgeVersion[] — The PgEdge versions supported by this host.
      - `postgres_version` string, required — The Postgres major and minor version.
      - `spock_version` string, required — The Spock major version.

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