# Clusters

Cluster management

## List clusters

> Lists all clusters

```json
{"openapi":"3.0.3","info":{"title":"OpenStack Block Storage API (Cinder)","version":"3.71"},"tags":[{"name":"clusters","description":"Cluster management"}],"servers":[{"url":"https://{host}/cinder","description":"PCD Block Storage API v3","variables":{"host":{"default":"example.platform9.com","description":"The PCD controlplane hostname"}}}],"security":[{"pcdAuth":[]}],"components":{"securitySchemes":{"pcdAuth":{"name":"X-Auth-Token","type":"apiKey","in":"header","description":"PCD Identity Service token authentication"}},"parameters":{"LimitQuery":{"name":"limit","description":"Requests a page size of items","schema":{"minimum":1,"type":"integer"},"in":"query"},"MarkerQuery":{"name":"marker","description":"The ID of the last-seen item","schema":{"type":"string"},"in":"query"},"SortQuery":{"name":"sort","description":"Comma-separated list of sort keys and optional sort directions","schema":{"type":"string"},"in":"query"},"SortKeyQuery":{"name":"sort_key","description":"Sorts by an attribute","schema":{"type":"string"},"in":"query"},"SortDirQuery":{"name":"sort_dir","description":"Sorts by direction (asc or desc)","schema":{"enum":["asc","desc"],"type":"string"},"in":"query"}},"schemas":{"Clusters":{"type":"object","properties":{"clusters":{"type":"array","items":{"$ref":"#/components/schemas/ClusterSimple"}}}},"ClusterSimple":{"type":"object","properties":{"name":{"description":"The cluster name","type":"string"},"binary":{"description":"The binary name","type":"string"},"state":{"description":"The cluster state","type":"string"},"status":{"description":"The cluster status","type":"string"}}}}},"paths":{"/v3/clusters":{"get":{"tags":["clusters"],"parameters":[{"name":"name","description":"Filter by cluster name","schema":{"type":"string"},"in":"query"},{"name":"binary","description":"Filter by binary","schema":{"type":"string"},"in":"query"},{"name":"disabled","description":"Filter by disabled status","schema":{"type":"boolean"},"in":"query"},{"name":"num_hosts","description":"Filter by number of hosts","schema":{"type":"integer"},"in":"query"},{"name":"num_down_hosts","description":"Filter by number of down hosts","schema":{"type":"integer"},"in":"query"},{"name":"is_up","description":"Filter by up status","schema":{"type":"boolean"},"in":"query"},{"$ref":"#/components/parameters/LimitQuery"},{"$ref":"#/components/parameters/MarkerQuery"},{"$ref":"#/components/parameters/SortQuery"},{"$ref":"#/components/parameters/SortKeyQuery"},{"$ref":"#/components/parameters/SortDirQuery"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Clusters"}}},"description":"OK"}},"summary":"List clusters","description":"Lists all clusters"}}}}
```

## Update cluster

> Updates a cluster

```json
{"openapi":"3.0.3","info":{"title":"OpenStack Block Storage API (Cinder)","version":"3.71"},"tags":[{"name":"clusters","description":"Cluster management"}],"servers":[{"url":"https://{host}/cinder","description":"PCD Block Storage API v3","variables":{"host":{"default":"example.platform9.com","description":"The PCD controlplane hostname"}}}],"security":[{"pcdAuth":[]}],"components":{"securitySchemes":{"pcdAuth":{"name":"X-Auth-Token","type":"apiKey","in":"header","description":"PCD Identity Service token authentication"}},"schemas":{"ClusterUpdateRequest":{"type":"object","properties":{"cluster":{"type":"object","properties":{"disabled":{"description":"Whether to disable the cluster","type":"boolean"},"disabled_reason":{"description":"Reason for disabling","type":"string"}}}}},"ClusterResponse":{"type":"object","properties":{"cluster":{"$ref":"#/components/schemas/Cluster"}}},"Cluster":{"type":"object","properties":{"name":{"description":"The cluster name","type":"string"},"binary":{"description":"The binary name","type":"string"},"state":{"description":"The cluster state","type":"string"},"status":{"description":"The cluster status","type":"string"},"num_hosts":{"description":"Number of hosts in the cluster","type":"integer"},"num_down_hosts":{"description":"Number of down hosts in the cluster","type":"integer"},"last_heartbeat":{"nullable":true,"format":"date-time","description":"Last heartbeat timestamp","type":"string"},"disabled_reason":{"nullable":true,"description":"Reason for disabling cluster","type":"string"},"created_at":{"format":"date-time","description":"The date and time when the resource was created","type":"string"},"updated_at":{"nullable":true,"format":"date-time","description":"The date and time when the resource was updated","type":"string"}}}}},"paths":{"/v3/clusters":{"put":{"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClusterUpdateRequest"}}},"required":true},"tags":["clusters"],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClusterResponse"}}},"description":"OK"}},"summary":"Update cluster","description":"Updates a cluster"}}}}
```

## List clusters with details

> Lists all clusters with details

```json
{"openapi":"3.0.3","info":{"title":"OpenStack Block Storage API (Cinder)","version":"3.71"},"tags":[{"name":"clusters","description":"Cluster management"}],"servers":[{"url":"https://{host}/cinder","description":"PCD Block Storage API v3","variables":{"host":{"default":"example.platform9.com","description":"The PCD controlplane hostname"}}}],"security":[{"pcdAuth":[]}],"components":{"securitySchemes":{"pcdAuth":{"name":"X-Auth-Token","type":"apiKey","in":"header","description":"PCD Identity Service token authentication"}},"parameters":{"LimitQuery":{"name":"limit","description":"Requests a page size of items","schema":{"minimum":1,"type":"integer"},"in":"query"},"MarkerQuery":{"name":"marker","description":"The ID of the last-seen item","schema":{"type":"string"},"in":"query"},"SortQuery":{"name":"sort","description":"Comma-separated list of sort keys and optional sort directions","schema":{"type":"string"},"in":"query"},"SortKeyQuery":{"name":"sort_key","description":"Sorts by an attribute","schema":{"type":"string"},"in":"query"},"SortDirQuery":{"name":"sort_dir","description":"Sorts by direction (asc or desc)","schema":{"enum":["asc","desc"],"type":"string"},"in":"query"}},"schemas":{"ClustersDetail":{"type":"object","properties":{"clusters":{"type":"array","items":{"$ref":"#/components/schemas/Cluster"}}}},"Cluster":{"type":"object","properties":{"name":{"description":"The cluster name","type":"string"},"binary":{"description":"The binary name","type":"string"},"state":{"description":"The cluster state","type":"string"},"status":{"description":"The cluster status","type":"string"},"num_hosts":{"description":"Number of hosts in the cluster","type":"integer"},"num_down_hosts":{"description":"Number of down hosts in the cluster","type":"integer"},"last_heartbeat":{"nullable":true,"format":"date-time","description":"Last heartbeat timestamp","type":"string"},"disabled_reason":{"nullable":true,"description":"Reason for disabling cluster","type":"string"},"created_at":{"format":"date-time","description":"The date and time when the resource was created","type":"string"},"updated_at":{"nullable":true,"format":"date-time","description":"The date and time when the resource was updated","type":"string"}}}}},"paths":{"/v3/clusters/detail":{"get":{"tags":["clusters"],"parameters":[{"name":"name","description":"Filter by cluster name","schema":{"type":"string"},"in":"query"},{"name":"binary","description":"Filter by binary","schema":{"type":"string"},"in":"query"},{"name":"disabled","description":"Filter by disabled status","schema":{"type":"boolean"},"in":"query"},{"name":"num_hosts","description":"Filter by number of hosts","schema":{"type":"integer"},"in":"query"},{"name":"num_down_hosts","description":"Filter by number of down hosts","schema":{"type":"integer"},"in":"query"},{"name":"is_up","description":"Filter by up status","schema":{"type":"boolean"},"in":"query"},{"$ref":"#/components/parameters/LimitQuery"},{"$ref":"#/components/parameters/MarkerQuery"},{"$ref":"#/components/parameters/SortQuery"},{"$ref":"#/components/parameters/SortKeyQuery"},{"$ref":"#/components/parameters/SortDirQuery"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClustersDetail"}}},"description":"OK"}},"summary":"List clusters with details","description":"Lists all clusters with details"}}}}
```

## Show cluster details

> Shows details for a cluster

```json
{"openapi":"3.0.3","info":{"title":"OpenStack Block Storage API (Cinder)","version":"3.71"},"tags":[{"name":"clusters","description":"Cluster management"}],"servers":[{"url":"https://{host}/cinder","description":"PCD Block Storage API v3","variables":{"host":{"default":"example.platform9.com","description":"The PCD controlplane hostname"}}}],"security":[{"pcdAuth":[]}],"components":{"securitySchemes":{"pcdAuth":{"name":"X-Auth-Token","type":"apiKey","in":"header","description":"PCD Identity Service token authentication"}},"schemas":{"ClusterResponse":{"type":"object","properties":{"cluster":{"$ref":"#/components/schemas/Cluster"}}},"Cluster":{"type":"object","properties":{"name":{"description":"The cluster name","type":"string"},"binary":{"description":"The binary name","type":"string"},"state":{"description":"The cluster state","type":"string"},"status":{"description":"The cluster status","type":"string"},"num_hosts":{"description":"Number of hosts in the cluster","type":"integer"},"num_down_hosts":{"description":"Number of down hosts in the cluster","type":"integer"},"last_heartbeat":{"nullable":true,"format":"date-time","description":"Last heartbeat timestamp","type":"string"},"disabled_reason":{"nullable":true,"description":"Reason for disabling cluster","type":"string"},"created_at":{"format":"date-time","description":"The date and time when the resource was created","type":"string"},"updated_at":{"nullable":true,"format":"date-time","description":"The date and time when the resource was updated","type":"string"}}}}},"paths":{"/v3/clusters/{cluster_id}":{"get":{"tags":["clusters"],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClusterResponse"}}},"description":"OK"}},"summary":"Show cluster details","description":"Shows details for a cluster"}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.platform9.com/api-docs/block-storage-service/clusters.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
