> For the complete documentation index, see [llms.txt](https://docs.ionos.com/cloud/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ionos.com/cloud/api-reference/databases/postgresql/clusters-1/fetch-a-cluster.md).

# Fetch a cluster

You can retrieve a PostgreSQL cluster by using its ID. This value can be found in the response body when a PostgreSQL cluster is created or when you GET a list of PostgreSQL clusters.

```json
{"openapi":"3.0.3","info":{"title":"IONOS DBaaS PostgreSQL REST API","version":"1.0.0"},"tags":[{"name":"Clusters","description":"Everything about PostgreSQL clusters."}],"servers":[{"url":"https://api.ionos.com/databases/postgresql","description":"Production"}],"security":[{"basicAuth":[]},{"tokenAuth":[]}],"components":{"securitySchemes":{"basicAuth":{"type":"http","scheme":"basic","description":"You will need to base64 encode the string containing your credentials.\nSeparate your username and password with a colon, i.e.,\nusername:password and send it as 'Authorization' request header. More\ndetails: https://en.wikipedia.org/wiki/Basic_access_authentication.\n"},"tokenAuth":{"type":"apiKey","in":"header","name":"Authorization","description":"Please provide header value as 'Bearer <token>' and don't forget to add\n'Bearer' HTTP Authorization Scheme before the token.\n"}},"parameters":{"ClusterIdPath":{"name":"clusterId","in":"path","description":"The unique ID of the cluster.","required":true,"schema":{"type":"string"}}},"schemas":{"ClusterResponse":{"description":"A database cluster.","properties":{"type":{"allOf":[{"$ref":"#/components/schemas/ResourceType"}]},"id":{"$ref":"#/components/schemas/ResourceId"},"metadata":{"$ref":"#/components/schemas/ClusterMetadata"},"properties":{"$ref":"#/components/schemas/ClusterProperties"}},"type":"object"},"ResourceType":{"description":"The type of the resource.","type":"string","enum":["collection","cluster","backup","user","database"]},"ResourceId":{"type":"string","description":"The unique ID of the resource."},"ClusterMetadata":{"description":"Metadata of the resource.","properties":{"createdDate":{"type":"string","format":"date-time","description":"The ISO 8601 creation timestamp."},"createdBy":{"type":"string"},"createdByUserId":{"type":"string"},"lastModifiedDate":{"type":"string","format":"date-time","description":"The ISO 8601 modified timestamp."},"lastModifiedBy":{"type":"string"},"lastModifiedByUserId":{"type":"string"},"state":{"$ref":"#/components/schemas/State"}}},"State":{"description":"The current status reported back by the cluster.","type":"string","enum":["AVAILABLE","BUSY","DESTROYING","DEGRADED","FAILED","UNKNOWN"]},"ClusterProperties":{"description":"Properties of a database cluster.","properties":{"displayName":{"$ref":"#/components/schemas/DisplayName"},"postgresVersion":{"$ref":"#/components/schemas/PostgresVersion"},"location":{"$ref":"#/components/schemas/Location"},"dnsName":{"$ref":"#/components/schemas/DNSName"},"backupLocation":{"$ref":"#/components/schemas/BackupLocation"},"instances":{"$ref":"#/components/schemas/Instances"},"ram":{"$ref":"#/components/schemas/Ram"},"cores":{"$ref":"#/components/schemas/Cores"},"storageSize":{"$ref":"#/components/schemas/StorageSize"},"storageType":{"$ref":"#/components/schemas/StorageType"},"connections":{"type":"array","minItems":1,"maxItems":1,"items":{"$ref":"#/components/schemas/Connection"}},"maintenanceWindow":{"$ref":"#/components/schemas/MaintenanceWindow"},"synchronizationMode":{"$ref":"#/components/schemas/SynchronizationMode"},"connectionPooler":{"$ref":"#/components/schemas/ConnectionPooler"}},"type":"object"},"DisplayName":{"type":"string","description":"The friendly name of your cluster."},"PostgresVersion":{"type":"string","description":"The PostgreSQL version of your cluster."},"Location":{"type":"string","description":"The physical location where the cluster will be created. This will be\nwhere all of your instances live. Property cannot be modified after\ndatacenter creation.\n"},"DNSName":{"type":"string","description":"The DNS name pointing to your cluster."},"BackupLocation":{"type":"string","description":"The S3 location where the backups will be stored."},"Instances":{"type":"integer","description":"The total number of instances in the cluster (one master and n-1\nstandbys).\n","minimum":1,"maximum":5},"Ram":{"type":"integer","description":"The amount of memory per instance in megabytes. Has to be a multiple of 1024.","multipleOf":1024,"minimum":4096},"Cores":{"type":"integer","description":"The number of CPU cores per instance.","minimum":1},"StorageSize":{"type":"integer","description":"The amount of storage per instance in megabytes.","minimum":10240,"maximum":2097152},"StorageType":{"description":"The storage type used in your cluster. (Value \"SSD\" is deprecated. Use the equivalent \"SSD Premium\" instead)","type":"string","enum":["HDD","SSD","SSD Standard","SSD Premium"]},"Connection":{"description":"Details about the network connection for your cluster.","properties":{"datacenterId":{"description":"The datacenter to connect your cluster to.","type":"string"},"lanId":{"description":"The numeric LAN ID to connect your cluster to.","type":"string"},"cidr":{"type":"string","description":"The IP and subnet for your cluster.\nNote the following unavailable IP ranges:\n10.233.64.0/18\n10.233.0.0/18\n10.233.114.0/24\n"}},"required":["datacenterId","lanId","cidr"],"type":"object"},"MaintenanceWindow":{"description":"A weekly 4 hour-long window, during which maintenance might occur.\n","properties":{"time":{"type":"string","description":"Start of the maintenance window in UTC time."},"dayOfTheWeek":{"$ref":"#/components/schemas/DayOfTheWeek"}},"required":["time","dayOfTheWeek"],"type":"object"},"DayOfTheWeek":{"description":"The name of the week day.","type":"string","enum":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},"SynchronizationMode":{"description":"Represents different modes of replication.\nBe aware that the SYNCHRONOUS mode is deprecated and will be removed in future versions.\nExisting clusters will eventually be migrated to one of the supported modes.\n","type":"string","enum":["ASYNCHRONOUS","SYNCHRONOUS","STRICTLY_SYNCHRONOUS"]},"ConnectionPooler":{"description":"Configuration options for the connection pooler","properties":{"enabled":{"type":"boolean"},"poolMode":{"$ref":"#/components/schemas/PoolMode"}}},"PoolMode":{"description":"Represents different modes of connection pooling for the connection pooler.\n","type":"string","enum":["transaction","session"]},"ErrorResponse":{"properties":{"httpStatus":{"type":"integer","description":"The HTTP status code of the operation."},"messages":{"type":"array","items":{"$ref":"#/components/schemas/ErrorMessage"}}},"type":"object"},"ErrorMessage":{"properties":{"errorCode":{"type":"string","description":"Application internal error code\n"},"message":{"type":"string","description":"A human readable explanation specific to this occurrence of the\nproblem.\n"}},"type":"object"}},"responses":{"ApiError":{"description":"Any erroneous status code: 400 (parse error), 401 (auth error),\n402 (trial access), 403 (insufficient permissions), 404 (not found),\n405 (unsupported HTTP method), 415 (unsupported content type,\n422 (validation error), 429 (request rate limit exceeded),\n500 (server error), 503 (maintenance)\n","headers":{"Content-Type":{"description":"application/problem+json","schema":{"type":"string","default":"application/problem+json"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"paths":{"/clusters/{clusterId}":{"get":{"operationId":"clustersFindById","summary":"Fetch a cluster","description":"You can retrieve a PostgreSQL cluster by using its ID. This value can be\nfound in the response body when a PostgreSQL cluster is created or when\nyou GET a list of PostgreSQL clusters.\n","tags":["Clusters"],"parameters":[{"$ref":"#/components/parameters/ClusterIdPath"}],"responses":{"200":{"description":"Successful operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClusterResponse"}}}},"default":{"$ref":"#/components/responses/ApiError"}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.ionos.com/cloud/api-reference/databases/postgresql/clusters-1/fetch-a-cluster.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
