Download OpenAPI specification:Download
IONOS CLOUD DBaaS PostgreSQL v2 lets you provision and manage PostgreSQL clusters through a REST API. For product information, see IONOS CLOUD DBaaS PostgreSQL Guide.
The IONOS CLOUD DBaaS PostgreSQL v2 API provides managed PostgreSQL clusters on region-specific endpoints. It introduces an idempotent Ensure pattern for cluster updates, dedicated backup location management, token-only authentication, granular cluster lifecycle states, a declarative restore model, and direct integration with IONOS CLOUD Logging and Monitoring Services compared to the v1 API. If you are new to the PostgreSQL v2 API, see What Can You Do with the PostgreSQL v2 API?. If you are migrating from v1, see DBaaS PostgreSQL API Versions.
The IONOS CLOUD DBaaS PostgreSQL v2 API provides a consistent interface to manage the complete lifecycle of your highly available PostgreSQL clusters. Using the v2 API, you can:
/backups top-level endpoint, making it easier to locate specific restore points.filter.clusterId), alongside standardized pagination across listing endpoints.The PostgreSQL v2 APIs are available with the following API endpoints.
| Location | Region | Endpoint |
|---|---|---|
| Berlin, Germany | de-txl |
https://postgresql.de-txl.ionos.com/v2 |
| Frankfurt, Germany | de-fra |
https://postgresql.de-fra.ionos.com/v2 |
| Paris, France | fr-par |
https://postgresql.fr-par.ionos.com/v2 |
| Logroño, Spain | es-vit |
https://postgresql.es-vit.ionos.com/v2 |
| London, United Kingdom | gb-lhr |
https://postgresql.gb-lhr.ionos.com/v2 |
| Worcester, United Kingdom | gb-bhx |
https://postgresql.gb-bhx.ionos.com/v2 |
| Las Vegas, United States | us-las |
https://postgresql.us-las.ionos.com/v2 |
| Lenexa, United States | us-mci |
https://postgresql.us-mci.ionos.com/v2 |
| Newark, United States | us-ewr |
https://postgresql.us-ewr.ionos.com/v2 |
Note: For all Frankfurt locations, use the
https://postgresql.de-fra.ionos.com/v2endpoint.
To authenticate with the API, see Authentication. To make your first API call, see Quick Start.
ASYNCHRONOUS and STRICTLY_SYNCHRONOUS replication across cluster instances. STRICTLY_SYNCHRONOUS requires at least three instances and guarantees strong consistency at the cost of potential performance impact in high-latency environments.PUT endpoints. Provide the full resource object on every call. Fields not included in the payload reset to their defaults rather than retaining their previous values.DBaaS for PostgreSQL is a fully managed service. IONOS CLOUD grants your database user the widest set of privileges possible without allowing the user to interfere with the automation that keeps the cluster healthy, backed up, and highly available. In practice, your user is not a PostgreSQL superuser, but it can perform most day-to-day database administration tasks.
Note: IONOS CLOUD does not grant
SUPERUSERaccess. The platform handles operations that require a superuser. For the list, see Operations Handled by the Platform.
When you create a cluster, you provide credentials for one initial database user. The user owns the initial database and the following role attributes apply:
| Attribute | Granted | Purpose |
|---|---|---|
LOGIN |
Yes | Connect to the cluster. |
CREATEDB |
Yes | Create and drop your own databases. |
CREATEROLE |
Yes | Create and manage your own roles and users. |
IONOS CLOUD reserves the SUPERUSER, REPLICATION, and BYPASSRLS attributes for the platform and does not grant them to your user.
On PostgreSQL 16 and later, the initial user is also a member, with administrator privilege, of the predefined monitoring roles pg_monitor, pg_read_all_stats, and pg_stat_scan_tables. You can read all statistics and monitoring views, and grant the same access to your own roles.
Submitting the cluster's credentials object on a cluster update is additive, not a full replacement:
username creates an additional user with access to the specified database. The previously existing user is preserved.database creates that database and grants the specified user access to it, in addition to any databases the user could already access.username updates that user's password. It does not create a duplicate user.credentials entirely from the request leaves all existing users and databases unchanged. This is an exception to the Ensure pattern's usual full-replacement behavior described under Features.-- Create a login role (a user) and a database
CREATE ROLE app_user LOGIN PASSWORD 'a-strong-password';
CREATE DATABASE app;
-- Grant database-level privileges
GRANT CONNECT, TEMPORARY ON DATABASE app TO app_user;
-- Grant object privileges inside a database
GRANT SELECT, INSERT, UPDATE, DELETE ON ALL TABLES IN SCHEMA public TO app_user;
For the complete privilege syntax, see the PostgreSQL Documentation.Note: The v1 API also offers dedicated endpoints to manage users and databases.
You can enable any extension from the curated allowlist with CREATE EXTENSION. This includes widely used extensions such as pg_trgm, citext, pgcrypto, hstore, uuid-ossp, postgis, vector, and timescaledb. Scheduled jobs are available through pg_cron, which you manage with the cron_admin role and which requires no superuser. For the full list and setup instructions, see Activate Extensions.
The allowlist excludes extensions that require a superuser, such as file_fdw, and untrusted procedural languages like plpython3u.
The following operations require a PostgreSQL superuser. IONOS CLOUD handles them so that a database user cannot disrupt the managed service:
ALTER SYSTEM or by editing postgresql.conf. The cluster API and the Data Center Designer expose tunable parameters instead.SUPERUSER, REPLICATION, or BYPASSRLS attributes, and creating roles that hold them.COPY ... TO/FROM PROGRAM, the pg_read_file function family, and CREATE TABLESPACE.postgres, any name that starts with pg_, replication, admin, root, and sys. Reserved database names include postgres, template0, template1, and information_schema. Any other name is available.The PostgreSQL v2 API enforces rate limits. If a request exceeds the limit, the API returns HTTP 429 Too Many Requests. Check the Retry-After response header for the number of seconds to wait before retrying.
All list endpoints support offset-based pagination through two query parameters. The endpoints are: Retrieve all Clusters, Retrieve all Backups, Retrieve all BackupLocations, and Retrieve all Versions.
| Parameter | Type | Default | Range | Description |
|---|---|---|---|---|
offset |
integer | 0 |
≥ 0 | The index of the first element to return. |
limit |
integer | 100 |
from 1 to 1,000 | The maximum number of elements to return per page. |
To retrieve the next page, increment offset by the value of limit. Example: offset=100&limit=100 returns elements from 101 to 200.
IONOS CLOUD DBaaS PostgreSQL offers PostgreSQL v2 and PostgreSQL v1 API versions. PostgreSQL v2 is the recommended version. It supports multi-region deployments, idempotent cluster management through the Ensure pattern, dedicated backup location management, and improved privilege separation compared to v1.
Important: The PostgreSQL v1 API will be deprecated in an upcoming release. All existing clusters operating on the v1 version are automatically migrated to the v2 version as part of this process. No action is required from you. For more information, see What Changed in v2.
IONOS CLOUD supports PostgreSQL versions 14, 15, 16, 17, and 18, for example 16.4 and 17.2. PostgreSQL follows a yearly major release schedule, and each major version receives 5 years of support after its initial release. IONOS CLOUD DBaaS handles minor version upgrades automatically during maintenance windows. For example, a cluster running 16.4.1 is automatically upgraded to 16.4.2 when the next patch release becomes available. For more information, see Upgrade and Maintenance.
The following tables highlight the key differences between PostgreSQL v1 and v2 APIs, including the changes and their advantages.
| Feature | PostgreSQL v1 (1.0.0) | PostgreSQL v2 (2.0.0) | PostgreSQL v2 Advantage |
|---|---|---|---|
| Server model | Single global base URL https://api.ionos.com/databases/postgresql |
Region-specific endpoints for Berlin, Frankfurt, Paris, Logroño, London, Worcester, Las Vegas, Lenexa, and Newark. | Reduces network latency for management operations and improves potential performance. |
| Versions tag | Metadata tag lists supported PostgreSQL versions. |
Renamed to Versions. |
Clearer separation between API version metadata and supported PostgreSQL software versions. |
| BackupLocations tag | No dedicated backup location resource. | New BackupLocations tag with dedicated endpoints. |
Explicit control over where backups are stored for geographic data safety. |
| Restore | Dedicated Restores tag with restore endpoints. |
No dedicated restore tag. Restore is declared through restoreFromBackup on the cluster object. |
Declarative restore model: restore intent is part of cluster configuration rather than a separate operation. |
| Logs tag | Dedicated Logs tag with a /logs endpoint. |
No Logs tag. Log and metrics forwarding is configured through logsEnabled and metricsEnabled on the cluster object. |
Logs and metrics route to the IONOS CLOUD Logging and Monitoring Services rather than through the database API. |
| Removed tags | Users and Databases tags manage database users and databases separately. |
No Users or Databases tags. The primary user and initial database are created as part of the cluster credentials object. |
Database and user creation is folded into cluster provisioning, removing the need for separate post-provisioning steps. |
| Feature | PostgreSQL v1 (1.0.0) | PostgreSQL v2 (2.0.0) | PostgreSQL v2 Advantage |
|---|---|---|---|
| Cluster object | Supports basic lifecycle states, such as BUSY, AVAILABLE, and DESTROYING. |
Supports granular lifecycle states such as PROVISIONING, AVAILABLE, UPDATING, DESTROYING, and FAILED. |
More granular operational and infrastructure metadata. |
| Compute and Storage | PostgreSQL v1 defines instance and storage specifications as top-level properties: instances, cores, ram, storageSize, and storageType. HDD, SSD Standard, and SSD Premium storageType are supported. |
Groups these details into a single instance object containing count, ram, cores, and storageSize. Only SSD Premium storageType is supported. |
Reduces clutter at the top level of the cluster properties. SSD Premium is offered for optimal IOPS performance. |
| Network connection | Uses a connections array, allowing many connection objects containing datacenterId, lanId, and cidr. |
Uses a single connection object containing datacenterId, lanId, and replaces cidr with primaryInstanceAddress. |
Enforces a predictable network model. |
| Supported PostgreSQL versions | Versions 14, 15, and 16. | Versions 14, 15, 16, 17, and 18. | v2 adds support for PostgreSQL 17 and 18, enabling access to the latest features and long-term support releases. |
| Feature | PostgreSQL v1 (1.0.0) | PostgreSQL v2 (2.0.0) | PostgreSQL v2 Advantage |
|---|---|---|---|
| Replication | Uses synchronizationMode. ASYNCHRONOUS and STRICTLY_SYNCHRONOUS are supported. SYNCHRONOUS mode is deprecated. |
Renamed to replicationMode. ASYNCHRONOUS and STRICTLY_SYNCHRONOUS are supported. |
Clarified terminology in alignment with native database terminology. |
| Connection Pooler | Modeled as an object: {"enabled": true, "poolMode": "transaction"}. |
Modeled as a direct string value: "TRANSACTION". |
Reduces clutter in the cluster configuration payload. |
| Feature | PostgreSQL v1 (1.0.0) | PostgreSQL v2 (2.0.0) | PostgreSQL v2 Advantage |
|---|---|---|---|
| Credentials | Accepts username and password. Databases are created separately using a dedicated /databases endpoint. |
Accepts username, password, and explicitly adds the database name. |
Database creation is folded directly into the cluster's main configuration, removing the need for separate database creation endpoints. |
| Authorization | basicAuth and tokenAuth are supported. |
Supports only tokenAuth. |
Contributes to a streamlined, stronger security model. |
| Feature | PostgreSQL v1 (1.0.0) | PostgreSQL v2 (2.0.0) | PostgreSQL v2 Advantage |
|---|---|---|---|
| Backups | Uses the fromBackup object, which contains backupId and recoveryTargetTime. |
Renamed to restoreFromBackup containing sourceBackupId and recoveryTargetDatetime. |
Explicitly identifies that the specified backup is the source for the cluster's data. |
| Feature | PostgreSQL v1 (1.0.0) | PostgreSQL v2 (2.0.0) | PostgreSQL v2 Advantage |
|---|---|---|---|
| Logs | Handles observability through an explicit /logs endpoint. |
Removes the explicit logs endpoint and adds logsEnabled (Boolean) and metricsEnabled (Boolean) directly to the cluster object properties. |
Logs and metrics are forwarded to the IONOS CLOUD Logging and Monitoring Services rather than being streamed through the database API. |
All requests to the PostgreSQL v2 API require a Bearer token in the Authorization header:
Authorization: Bearer <your-token>
To generate a token, use IONOS CLOUD Authentication API. The PostgreSQL v2 API supports only token-based authentication (tokenAuth). Basic authentication is not supported.
List supported PostgreSQL versions to confirm your access token works. The following
example uses the Berlin (de-txl) endpoint:
curl -X GET "https://postgresql.de-txl.ionos.com/v2/versions" \
-H "Authorization: Bearer $IONOS_TOKEN" \
-H "Content-Type: application/json"
A successful response returns HTTP 200 with a list of supported PostgreSQL versions and available upgrade paths. The items array is empty only if no versions are now supported for the endpoint. To connect to a specific region, replace the endpoint host with the corresponding regional host from the Endpoints. Existing integrations that still call the root path remain supported for backward compatibility, and both / and /v2 are routed to the same PostgreSQL v2 backend.
To provision your first cluster, see Deploy a PostgreSQL Cluster.
Use these end-to-end workflows to deploy, connect, operate, and restore resources using the IONOS CLOUD DBaaS PostgreSQL v2 API.
AVAILABLE state.Note: If an operation returns an error, refer to the response details of each operation for API-specific error codes. For generic HTTP status codes used across IONOS CLOUD APIs, see HTTP Status Codes.
Use this workflow to plan and provision a new PostgreSQL cluster.
datacenterId) that resides in the same region as your target PostgreSQL endpoint. To create a VDC, use IONOS CLOUD API.lanId) within that VDC. The cluster connects to this LAN during provisioning. To create a LAN, use IONOS CLOUD API.primaryInstanceAddress) in Classless Inter-Domain Routing (CIDR) notation that you assign to the primary node. Example: 192.168.2.101/24. The range 10.208.0.0/12 is unavailable.200 with a list of backup locations. Each entry includes an id (UUID) and a location value. Example: eu-central-3. Note the location value to use in properties.backup.location when provisioning the cluster. If _links.next is present, repeat the call with an incremented offset to retrieve the next page.Note: For geographic data safety, choose a backup location in a different region from your cluster endpoint. Once set, confirm the location by retrieving the cluster and checking
properties.backup.location. The backup location cannot be changed after the cluster is created.
200 with a list of supported PostgreSQL versions. Each entry includes the version identifier, its lifecycle status (SUPPORTED, RECOMMENDED, or DEPRECATED), and a canUpgradeTo array listing available upgrade paths. Note the version identifier to use for properties.version when provisioning the cluster. If _links.next is present, repeat the call with an incremented offset to retrieve the next page.ASYNCHRONOUS: The primary instance acknowledges writes before replicas confirm. Use for performance-sensitive workloads where brief data loss on primary failure is acceptable.STRICTLY_SYNCHRONOUS: All instances must confirm writes before the primary acknowledges. Requires a minimum of three instances. Use when strong consistency and zero data loss are required.Note:
STRICTLY_SYNCHRONOUSmay reduce write throughput in high-latency network environments.- On primary failure, the cluster automatically promotes a replica. With
ASYNCHRONOUSreplication, writes not yet propagated to replicas may be lost. WithSTRICTLY_SYNCHRONOUSreplication, all confirmed writes are preserved because every instance acknowledged them before the primary committed.
name, version, instances
(containing count, ram, cores, and storageSize), connection
(containing datacenterId, lanId, and primaryInstanceAddress),
replicationMode, backup (containing location and retentionDays),
maintenanceWindow, and credentials (containing username, password,
and database).Note:
connection.datacenterIdandconnection.lanIdcannot be changed after the cluster is created. Confirm they are correct before submitting this request.- For geographic data safety, choose a backup location in a different region from your cluster endpoint.
backup.locationcannot be changed after the cluster is created.logsEnabledandmetricsEnabledare optional. Set either totrueto activate log or metrics forwarding.
logsEnabledrequires the IONOS CLOUD Logging Service to be activated on your contract.metricsEnabledrequires the IONOS CLOUD Monitoring Service to be activated on your contract. Activating either service incurs additional costs.
Example request body:
{
"properties": {
"name": "cms-prod",
"version": "16",
"instances": {
"count": 3,
"ram": 8,
"cores": 4,
"storageSize": 100
},
"connection": {
"datacenterId": "5a029f4a-72e5-11ec-90d6-0242ac120003",
"lanId": "2",
"primaryInstanceAddress": "192.168.2.101/24"
},
"replicationMode": "ASYNCHRONOUS",
"backup": {
"location": "eu-central-3",
"retentionDays": 7
},
"maintenanceWindow": {
"dayOfTheWeek": "Sunday",
"time": "02:00:00"
},
"credentials": {
"username": "my_dbuser",
"password": "S3cure!Pass",
"database": "mydb"
}
}
}
201. Note the id: you need it in every subsequent cluster operation. metadata.state starts as PROVISIONING.Note:
- Cluster provisioning is asynchronous. Poll Retrieve Cluster until
metadata.stateisAVAILABLE. Once available,metadata.dnsNamecontains the stable hostname for connecting.- If
metadata.statereturnsFAILED, the cluster failed to provision. Retrieve the cluster details using Retrieve Cluster and checkmetadata.statusMessagefor the failure reason. Common causes include an invaliddatacenterIdorlanId, or aprimaryInstanceAddressthat conflicts with an existing allocation. Correct the configuration and submit a new Create Cluster request. Failed clusters cannot be recovered in place.
Next steps: To connect to your cluster, see Connect to Your PostgreSQL Cluster.
Use this workflow to retrieve the PostgreSQL cluster connection endpoint and connect using your credentials.
AVAILABLE state.id (UUID) of the cluster. You receive this when you complete the Deploy a PostgreSQL Cluster workflow.credentials.username, credentials.password, and credentials.database set during provisioning.clusterId: The UUID of your cluster.200 with the full cluster object. Note metadata.dnsName (the stable hostname), properties.credentials.username, and properties.credentials.database: you need all three in Step 2.| Property | Value |
|---|---|
| Host | metadata.dnsName value from Step 1 |
| Port | 5432 (standard PostgreSQL port) |
| Database | The database name from credentials.database |
| User | The username from credentials.username |
| Secure Sockets Layer (SSL) mode | require |
| Example connection string: |
postgresql://<username>:<password>@<dnsName>:5432/<database>?sslmode=require
Note:
sslmode=requireis mandatory. IONOS CLOUD DBaaS PostgreSQL clusters reject unencrypted connections to protect data in transit. If your client omitssslmode=require, the connection attempt fails.
If connectionPooler is set to TRANSACTION or SESSION on the cluster, the pooler is accessible on the same dnsName. Use your PostgreSQL client's pooler port configuration to connect. Refer to your cluster's connectionPooler property for the configured mode.
TRANSACTION: Each server connection is released back to the pool after each transaction. Avoid session-level features such as prepared statements and advisory locks in transaction pool mode.Note: Connection pooling is most effective for applications that open many short-lived connections. For long-running analytical queries, use a direct connection instead.
Next steps: For day-2 tasks on a running cluster, see Operate a PostgreSQL Cluster.
Use this workflow to perform day-2 tasks on a running cluster.
Note: All configuration changes use Ensure Cluster. Before submitting any update, retrieve the full cluster configuration using Retrieve Cluster and include all required fields in the payload. Any field omitted resets to its default value. After submitting, poll
metadata.stateuntil it returns toAVAILABLE.
AVAILABLE state.id (UUID) of the cluster. You receive this when you complete the Deploy a PostgreSQL Cluster workflow.filter.clusterId to scope results to your cluster.200 with a paginated list of backups. Each entry includes isActive (whether the backup is usable as a restore point) and the earliestRecoveryTargetTime to latestRecoveryTargetTime window defining the available restore range. To inspect a specific backup in detail, call Retrieve Backup with the backup id. An empty items array means no backups exist yet. If _links.next is present, repeat the call with an incremented offset to retrieve the next page.Note: To recover data from a backup, see Restore from a Backup.
Adjust instance count, CPU, memory, or storage.
clusterId: The UUID of the cluster.instances values (count, ram, cores, storageSize).200, confirming the cluster transitions to UPDATING, then back to AVAILABLE. Poll Retrieve Cluster on metadata.state to confirm. If metadata.state returns FAILED, check metadata.statusMessage for the failure reason. Correct the configuration and resubmit the full cluster object.status of the PostgreSQL version your cluster runs on to detect when an upgrade is required.properties.version and read its status field.200 with a list of supported PostgreSQL versions. Each entry includes the version identifier and its lifecycle status. Find the entry for your cluster's current version and check status:SUPPORTED or RECOMMENDED: no action needed.DEPRECATED: the version is no longer actively supported. Upgrade to a SUPPORTED or RECOMMENDED version. See Upgrade the PostgreSQL Version in PostgreSQL v2 API Workflows.
If _links.next is present, repeat the call with an incremented offset to retrieve the next page.properties.version and check its canUpgradeTo array. Proceed only if the target version is listed. Review backups using Retrieve all Backups to confirm an active restore point exists before upgrading.clusterId: The UUID of the cluster.properties.version updated to the target version from canUpgradeTo.200, confirming the cluster transitions to UPDATING, then back to AVAILABLE. Version upgrades typically take longer than scale operations. Once available, properties.version reflects the upgraded version. If metadata.state returns FAILED, check metadata.statusMessage for the failure reason. Confirm the target version is listed in canUpgradeTo for the cluster's current version and resubmit the full cluster object with the corrected properties.version. Downgrades are not supported.Change the day or time of the weekly 4-hour maintenance window.
clusterId: The UUID of the cluster.maintenanceWindow values (time in HH:MM:SS format and dayOfTheWeek). Example: time: 02:00:00, dayOfTheWeek: Wednesday.200. The new window takes effect from the next scheduled maintenance cycle.Warning: Deleting a cluster is irreversible. The cluster and all associated resources are permanently removed. Ensure you have a recent backup before deleting if you may need the data later. Deprovision the cluster when it is no longer needed to release resources.
clusterId: The UUID of the cluster to delete.202, confirming the delete request is accepted. Deletion is asynchronous. The cluster and all associated resources are permanently removed and cannot be recovered.Note: If the cluster remains in
DESTROYINGlonger than expected, retrieve the cluster using Retrieve Cluster and checkmetadata.statusMessagefor the failure reason. If the message is absent or unclear, contact IONOS CLOUD Support and provide the clusterid. Next steps: To recover cluster data from a backup, see Restore from a Backup.
Use this workflow to create a new PostgreSQL cluster from a backup or to restore an existing cluster to a previous state.
AVAILABLE state.id (UUID) of the cluster. You receive this when you complete the Deploy a PostgreSQL Cluster workflow.isActive: true). You must have the id (UUID) of the backup. You receive this in Step 1 of this workflow after listing backups for your cluster. Note the backup id (sourceBackupId) and an ISO 8601 timestamp within the backup's earliestRecoveryTargetTime to latestRecoveryTargetTime window. Omit the timestamp to restore the full backup.filter.clusterId to scope results to your cluster.200 with a paginated list of backups. Each entry includes isActive (whether the backup is usable), the earliestRecoveryTargetTime to latestRecoveryTargetTime window defining the available restore range, and the backup id. Note the id and confirm the target timestamp falls within the recovery window before proceeding. If _links.next is present, repeat the call with an incremented offset to retrieve the next page.
Choose one of the following restore paths based on your recovery scenario.restoreFromBackup object in properties with sourceBackupId and optional recoveryTargetDatetime.
Example response (HTTP 201):{
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"type": "cluster",
"metadata": {
"state": "PROVISIONING"
},
"properties": {
"name": "my-restored-cluster"
}
}
201. Note the id: you need it to monitor provisioning. metadata.state starts as PROVISIONING.Note: Cluster creation is asynchronous. Poll Retrieve Cluster until
metadata.stateisAVAILABLE. Ifmetadata.statereturnsFAILED, checkmetadata.statusMessagefor the failure reason. Confirm thesourceBackupIdis valid and that therecoveryTargetDatetimefalls within the backup'searliestRecoveryTargetTimetolatestRecoveryTargetTimewindow. Correct the configuration and submit a new Create Cluster request.
Use this path when you must recover the current cluster to an earlier state. This path is destructive and cannot be undone.
clusterId: The UUID of the cluster to restore.restoreFromBackup.recoveryTargetDatetime (required ISO 8601 timestamp for the target recovery point).200, confirming the cluster transitions to UPDATING, then back to AVAILABLE.Warning: In-place restore overwrites all current cluster data. This action cannot be undone. If
metadata.statereturnsFAILED, checkmetadata.statusMessagefor the failure reason. Because in-place restore overwrites existing data before the restore completes, the cluster's data state may be indeterminate on failure. Do not retry the restore without first confirmingmetadata.statusMessage. If the message is absent or unclear, contact IONOS CLOUD Support and provide the clusteridand the timestamp of the failed restore. Next steps: To verify where your cluster's backups are stored, see Verify Backup Data Residency.
Use this workflow to confirm that your cluster's backups are stored in the expected Object Storage region to meet data residency or disaster recovery requirements.
AVAILABLE state and its id (UUID). Use Retrieve all Clusters to list clusters if needed.clusterId: The UUID of the cluster to inspect.200 with the full cluster object. Note the properties.backup.location value (example: eu-central-3) and the properties.backup.retentionDays value. You need the location to look up the backup location in Step 2.backupLocationId: Use Retrieve all BackupLocations to find the id that matches the location from Step 1.200 with the backup location object. Confirm the location value meets your GDPR, contractual data residency, or disaster recovery requirements.Note: For geographic data safety, ensure the backup location differs from the cluster's own region.
A PostgreSQL (PG) cluster is a unified group of one or more interconnected database instances.
It consists of a single primary instance that handles all write operations,
along with optional standby replicas that provide high availability.
This entity represents the entire logical unit, allowing for the unified management of all its nodes and configurations.
Credentials are managed through the cluster resource and are used to provision and manage
the cluster's database users. Customers can connect directly to the cluster using standard
PostgreSQL tools to create additional users, databases, and access grants.
When credentials are supplied, the behavior is additive:
a new username creates a new user with cluster-wide access granted to the
specified database — the previous user is preserved;
a new database creates a new database and grants the specified user access
to both the new and any previously accessible databases;
an existing username updates the user's password.
Unlike other cluster fields, omitting the credentials field leaves all
existing users and databases unchanged rather than clearing them.
This tag groups all operations for clusters.
This endpoint enables retrieving all Clusters using pagination and optional filters.
| offset | integer <int32> >= 0 Default: 0 The first element (of the total list of elements) to include in the response. Use this parameter together with the limit for pagination. |
| limit | integer <int32> [ 1 .. 1000 ] Default: 100 Example: limit=100 The maximum number of elements to return. Use this parameter together with the offset for pagination. |
| filter.name | string (PostgresClusterName) [ 2 .. 63 ] characters ^[A-Za-z0-9][-A-Za-z0-9_.]*[A-Za-z0-9]$ Example: filter.name=cms-prod Filters resources by name. It matches cluster names that contain the provided string. If omitted, returns all clusters. |
| filter.state | string (PostgresClusterStates) Enum: "PROVISIONING" "AVAILABLE" "UPDATING" "DESTROYING" "FAILED" Example: filter.state=AVAILABLE Filters resources by state. Example: |
{- "id": "ed17eb1f-ac43-5670-9e63-8be33c475449",
- "type": "collection",
- "href": "/clusters",
- "items": [
- {
- "id": "e69b22a5-8fee-56b1-b6fb-4a07e4205ead",
- "type": "cluster",
- "href": "/clusters/e69b22a5-8fee-56b1-b6fb-4a07e4205ead",
- "metadata": {
- "createdDate": "2020-12-10T13:37:50+01:00",
- "createdBy": "ionos:identity:::users/87f9a82e-b28d-49ed-9d04-fba2c0459cd3",
- "createdByUserId": "87f9a82e-b28d-49ed-9d04-fba2c0459cd3",
- "lastModifiedDate": "2020-12-11T13:37:50+01:00",
- "lastModifiedBy": "ionos:identity:::users/87f9a82e-b28d-49ed-9d04-fba2c0459cd3",
- "lastModifiedByUserId": "87f9a82e-b28d-49ed-9d04-fba2c0459cd3",
- "resourceURN": "ionos:<product>:<location>:<contract>:<resource-path>",
- "state": "AVAILABLE",
- "statusMessage": "Update failed: insufficient storage quota.",
- "dnsName": "pg-010203.postgresql.de-fra.ionoscloud.com"
}, - "properties": {
- "name": "cms-prod",
- "description": "A cluster for the production CMS.",
- "version": "16",
- "instances": {
- "count": 1,
- "ram": 4,
- "cores": 4,
- "storageSize": 10
}, - "connection": {
- "datacenterId": "5a029f4a-72e5-11ec-90d6-0242ac120003",
- "lanId": "2",
- "primaryInstanceAddress": "192.168.2.101/24"
}, - "maintenanceWindow": {
- "time": "16:30:59",
- "dayOfTheWeek": "Monday"
}, - "replicationMode": "ASYNCHRONOUS",
- "credentials": {
- "username": "my_dbuser",
- "database": "my_database"
}, - "connectionPooler": "TRANSACTION",
- "logsEnabled": false,
- "metricsEnabled": false,
- "backup": {
- "location": "eu-central-3",
- "retentionDays": 90
}
}
}
], - "offset": 0,
- "limit": 42,
- "_links": {
}
}Creates a new Cluster. The full Cluster needs to be provided to create the object. Optional data will be filled with defaults or left empty.
Cluster to create.
object Metadata | |
required | object (Cluster) A PostgreSQL (PG) cluster is a unified group of one or more interconnected database instances. It consists of a single primary instance that handles all write operations, along with optional standby replicas that provide high availability. This entity represents the entire logical unit, allowing for the unified management of all its nodes and configurations. |
{- "metadata": { },
- "properties": {
- "name": "cms-prod",
- "description": "A cluster for the production CMS.",
- "version": "16",
- "instances": {
- "count": 1,
- "ram": 4,
- "cores": 4,
- "storageSize": 10
}, - "connection": {
- "datacenterId": "5a029f4a-72e5-11ec-90d6-0242ac120003",
- "lanId": "2",
- "primaryInstanceAddress": "192.168.2.101/24"
}, - "maintenanceWindow": {
- "time": "16:30:59",
- "dayOfTheWeek": "Monday"
}, - "replicationMode": "ASYNCHRONOUS",
- "credentials": {
- "username": "my_dbuser",
- "password": "yourP@ssw0rd1!",
- "database": "my_database"
}, - "connectionPooler": "TRANSACTION",
- "restoreFromBackup": {
- "sourceBackupId": "dcd31531-3ac8-11eb-9feb-046c59cc737e",
- "recoveryTargetDatetime": "2020-12-10T13:37:50+01:00"
}, - "logsEnabled": false,
- "metricsEnabled": false,
- "backup": {
- "location": "eu-central-3",
- "retentionDays": 90
}
}
}{- "id": "e69b22a5-8fee-56b1-b6fb-4a07e4205ead",
- "type": "cluster",
- "href": "/clusters/e69b22a5-8fee-56b1-b6fb-4a07e4205ead",
- "metadata": {
- "createdDate": "2020-12-10T13:37:50+01:00",
- "createdBy": "ionos:identity:::users/87f9a82e-b28d-49ed-9d04-fba2c0459cd3",
- "createdByUserId": "87f9a82e-b28d-49ed-9d04-fba2c0459cd3",
- "lastModifiedDate": "2020-12-11T13:37:50+01:00",
- "lastModifiedBy": "ionos:identity:::users/87f9a82e-b28d-49ed-9d04-fba2c0459cd3",
- "lastModifiedByUserId": "87f9a82e-b28d-49ed-9d04-fba2c0459cd3",
- "resourceURN": "ionos:<product>:<location>:<contract>:<resource-path>",
- "state": "AVAILABLE",
- "statusMessage": "Update failed: insufficient storage quota.",
- "dnsName": "pg-010203.postgresql.de-fra.ionoscloud.com"
}, - "properties": {
- "name": "cms-prod",
- "description": "A cluster for the production CMS.",
- "version": "16",
- "instances": {
- "count": 1,
- "ram": 4,
- "cores": 4,
- "storageSize": 10
}, - "connection": {
- "datacenterId": "5a029f4a-72e5-11ec-90d6-0242ac120003",
- "lanId": "2",
- "primaryInstanceAddress": "192.168.2.101/24"
}, - "maintenanceWindow": {
- "time": "16:30:59",
- "dayOfTheWeek": "Monday"
}, - "replicationMode": "ASYNCHRONOUS",
- "credentials": {
- "username": "my_dbuser",
- "database": "my_database"
}, - "connectionPooler": "TRANSACTION",
- "logsEnabled": false,
- "metricsEnabled": false,
- "backup": {
- "location": "eu-central-3",
- "retentionDays": 90
}
}
}Returns the Cluster by ID.
| clusterId required | string <uuid> Example: e69b22a5-8fee-56b1-b6fb-4a07e4205ead The ID (UUID) of the Cluster. |
{- "id": "e69b22a5-8fee-56b1-b6fb-4a07e4205ead",
- "type": "cluster",
- "href": "/clusters/e69b22a5-8fee-56b1-b6fb-4a07e4205ead",
- "metadata": {
- "createdDate": "2020-12-10T13:37:50+01:00",
- "createdBy": "ionos:identity:::users/87f9a82e-b28d-49ed-9d04-fba2c0459cd3",
- "createdByUserId": "87f9a82e-b28d-49ed-9d04-fba2c0459cd3",
- "lastModifiedDate": "2020-12-11T13:37:50+01:00",
- "lastModifiedBy": "ionos:identity:::users/87f9a82e-b28d-49ed-9d04-fba2c0459cd3",
- "lastModifiedByUserId": "87f9a82e-b28d-49ed-9d04-fba2c0459cd3",
- "resourceURN": "ionos:<product>:<location>:<contract>:<resource-path>",
- "state": "AVAILABLE",
- "statusMessage": "Update failed: insufficient storage quota.",
- "dnsName": "pg-010203.postgresql.de-fra.ionoscloud.com"
}, - "properties": {
- "name": "cms-prod",
- "description": "A cluster for the production CMS.",
- "version": "16",
- "instances": {
- "count": 1,
- "ram": 4,
- "cores": 4,
- "storageSize": 10
}, - "connection": {
- "datacenterId": "5a029f4a-72e5-11ec-90d6-0242ac120003",
- "lanId": "2",
- "primaryInstanceAddress": "192.168.2.101/24"
}, - "maintenanceWindow": {
- "time": "16:30:59",
- "dayOfTheWeek": "Monday"
}, - "replicationMode": "ASYNCHRONOUS",
- "credentials": {
- "username": "my_dbuser",
- "database": "my_database"
}, - "connectionPooler": "TRANSACTION",
- "logsEnabled": false,
- "metricsEnabled": false,
- "backup": {
- "location": "eu-central-3",
- "retentionDays": 90
}
}
}Ensures that the Cluster with the provided ID is created or modified. The full Cluster needs to be provided to ensure (either update or create) the Cluster. Non present data will only be filled with defaults or left empty, but not take previous values into consideration.
| clusterId required | string <uuid> Example: e69b22a5-8fee-56b1-b6fb-4a07e4205ead The ID (UUID) of the Cluster. |
update Cluster
| id required | string <uuid> The ID (UUID) of the Cluster. |
object Metadata | |
required | object (Cluster) A PostgreSQL (PG) cluster is a unified group of one or more interconnected database instances. It consists of a single primary instance that handles all write operations, along with optional standby replicas that provide high availability. This entity represents the entire logical unit, allowing for the unified management of all its nodes and configurations. |
{- "id": "e69b22a5-8fee-56b1-b6fb-4a07e4205ead",
- "metadata": { },
- "properties": {
- "name": "cms-prod",
- "description": "A cluster for the production CMS.",
- "version": "16",
- "instances": {
- "count": 1,
- "ram": 4,
- "cores": 4,
- "storageSize": 10
}, - "connection": {
- "datacenterId": "5a029f4a-72e5-11ec-90d6-0242ac120003",
- "lanId": "2",
- "primaryInstanceAddress": "192.168.2.101/24"
}, - "maintenanceWindow": {
- "time": "16:30:59",
- "dayOfTheWeek": "Monday"
}, - "replicationMode": "ASYNCHRONOUS",
- "credentials": {
- "username": "my_dbuser",
- "password": "yourP@ssw0rd1!",
- "database": "my_database"
}, - "connectionPooler": "TRANSACTION",
- "restoreFromBackup": {
- "sourceBackupId": "dcd31531-3ac8-11eb-9feb-046c59cc737e",
- "recoveryTargetDatetime": "2020-12-10T13:37:50+01:00"
}, - "logsEnabled": false,
- "metricsEnabled": false,
- "backup": {
- "location": "eu-central-3",
- "retentionDays": 90
}
}
}{- "id": "e69b22a5-8fee-56b1-b6fb-4a07e4205ead",
- "type": "cluster",
- "href": "/clusters/e69b22a5-8fee-56b1-b6fb-4a07e4205ead",
- "metadata": {
- "createdDate": "2020-12-10T13:37:50+01:00",
- "createdBy": "ionos:identity:::users/87f9a82e-b28d-49ed-9d04-fba2c0459cd3",
- "createdByUserId": "87f9a82e-b28d-49ed-9d04-fba2c0459cd3",
- "lastModifiedDate": "2020-12-11T13:37:50+01:00",
- "lastModifiedBy": "ionos:identity:::users/87f9a82e-b28d-49ed-9d04-fba2c0459cd3",
- "lastModifiedByUserId": "87f9a82e-b28d-49ed-9d04-fba2c0459cd3",
- "resourceURN": "ionos:<product>:<location>:<contract>:<resource-path>",
- "state": "AVAILABLE",
- "statusMessage": "Update failed: insufficient storage quota.",
- "dnsName": "pg-010203.postgresql.de-fra.ionoscloud.com"
}, - "properties": {
- "name": "cms-prod",
- "description": "A cluster for the production CMS.",
- "version": "16",
- "instances": {
- "count": 1,
- "ram": 4,
- "cores": 4,
- "storageSize": 10
}, - "connection": {
- "datacenterId": "5a029f4a-72e5-11ec-90d6-0242ac120003",
- "lanId": "2",
- "primaryInstanceAddress": "192.168.2.101/24"
}, - "maintenanceWindow": {
- "time": "16:30:59",
- "dayOfTheWeek": "Monday"
}, - "replicationMode": "ASYNCHRONOUS",
- "credentials": {
- "username": "my_dbuser",
- "database": "my_database"
}, - "connectionPooler": "TRANSACTION",
- "logsEnabled": false,
- "metricsEnabled": false,
- "backup": {
- "location": "eu-central-3",
- "retentionDays": 90
}
}
}Deletes the specified Cluster.
| clusterId required | string <uuid> Example: e69b22a5-8fee-56b1-b6fb-4a07e4205ead The ID (UUID) of the Cluster. |
{- "httpStatus": 400,
- "messages": [
- {
- "errorCode": "err-1234",
- "message": "Error message example"
}
]
}Access and manage PITR backups for your PostgreSQL clusters through the IONOS CLOUD API.
PITR allows the cluster to be restored to any specific moment within the backup window. Use earliestRecoveryTargetTime to identify the earliest available restore point and latestRecoveryTargetTime to identify the latest.
This tag groups all operations for backups.
This endpoint enables retrieving all Backups using pagination and optional filters.
| offset | integer <int32> >= 0 Default: 0 The first element (of the total list of elements) to include in the response. Use this parameter together with the limit for pagination. |
| limit | integer <int32> [ 1 .. 1000 ] Default: 100 Example: limit=100 The maximum number of elements to return. Use this parameter together with the offset for pagination. |
| filter.clusterId | string <uuid> Filters backups by cluster ID. If omitted, returns backups for all clusters. |
{- "id": "9dfaa2e1-eabb-530a-af48-a2b61d99d734",
- "type": "collection",
- "href": "/backups",
- "items": [
- {
- "id": "45ca67fb-8b07-5783-9c97-2d35acceb084",
- "type": "backup",
- "href": "/backups/45ca67fb-8b07-5783-9c97-2d35acceb084",
- "metadata": { },
- "properties": {
- "clusterId": "dcd31531-3ac8-11eb-9feb-046c59cc737e",
- "clusterName": "my-postgres-cluster",
- "postgresClusterVersion": "16",
- "isActive": true,
- "earliestRecoveryTargetTime": "2023-10-05T14:48:00.000Z",
- "latestRecoveryTargetTime": "2023-10-10T14:48:00.000Z",
- "location": "eu-central-3"
}
}
], - "offset": 0,
- "limit": 42,
- "_links": {
}
}Returns the Backup by ID.
| backupId required | string <uuid> Example: 45ca67fb-8b07-5783-9c97-2d35acceb084 The ID (UUID) of the Backup. |
{- "id": "45ca67fb-8b07-5783-9c97-2d35acceb084",
- "type": "backup",
- "href": "/backups/45ca67fb-8b07-5783-9c97-2d35acceb084",
- "metadata": { },
- "properties": {
- "clusterId": "dcd31531-3ac8-11eb-9feb-046c59cc737e",
- "clusterName": "my-postgres-cluster",
- "postgresClusterVersion": "16",
- "isActive": true,
- "earliestRecoveryTargetTime": "2023-10-05T14:48:00.000Z",
- "latestRecoveryTargetTime": "2023-10-10T14:48:00.000Z",
- "location": "eu-central-3"
}
}Query available Object Storage regions for backup storage through the IONOS CLOUD API.
For geographic data safety, choose a backup location in a different region from your cluster. Use the location value from the backup locations response when configuring backup.location on your cluster.
This tag groups all operations for backuplocations.
This endpoint enables retrieving all BackupLocations using pagination and optional filters.
| offset | integer <int32> >= 0 Default: 0 The first element (of the total list of elements) to include in the response. Use this parameter together with the limit for pagination. |
| limit | integer <int32> [ 1 .. 1000 ] Default: 100 Example: limit=100 The maximum number of elements to return. Use this parameter together with the offset for pagination. |
{- "id": "a39a1ba4-3c1c-5a52-b90d-14fefce3d5a3",
- "type": "collection",
- "href": "/backup-locations",
- "items": [
- {
- "id": "7fa1dd11-59dd-53a5-ab67-50f649c8e3eb",
- "type": "backuplocation",
- "href": "/backup-locations/7fa1dd11-59dd-53a5-ab67-50f649c8e3eb",
- "metadata": { },
- "properties": {
- "location": "eu-central-3"
}
}
], - "offset": 0,
- "limit": 42,
- "_links": {
}
}Returns the BackupLocation by ID.
| backupLocationId required | string <uuid> Example: 7fa1dd11-59dd-53a5-ab67-50f649c8e3eb The ID (UUID) of the BackupLocation. |
{- "id": "7fa1dd11-59dd-53a5-ab67-50f649c8e3eb",
- "type": "backuplocation",
- "href": "/backup-locations/7fa1dd11-59dd-53a5-ab67-50f649c8e3eb",
- "metadata": { },
- "properties": {
- "location": "eu-central-3"
}
}Query supported PostgreSQL versions and upgrade paths through the IONOS CLOUD API.
Use canUpgradeTo to identify which versions a cluster can be upgraded to and status to filter for SUPPORTED or RECOMMENDED versions for production deployments.
This tag groups all operations for versions.
This endpoint enables retrieving all Versions using pagination and optional filters.
| offset | integer <int32> >= 0 Default: 0 The first element (of the total list of elements) to include in the response. Use this parameter together with the limit for pagination. |
| limit | integer <int32> [ 1 .. 1000 ] Default: 100 Example: limit=100 The maximum number of elements to return. Use this parameter together with the offset for pagination. |
{- "id": "c5c4caea-ddac-5376-bc1e-400b9f93c7a4",
- "type": "collection",
- "href": "/versions",
- "items": [
- {
- "id": "2edb9507-fb0e-5f58-a65b-952b43ff3549",
- "type": "postgresversion",
- "href": "/versions/2edb9507-fb0e-5f58-a65b-952b43ff3549",
- "metadata": { },
- "properties": {
- "version": "16",
- "status": "SUPPORTED",
- "comment": "string",
- "canUpgradeTo": [
- "17",
- "18"
]
}
}
], - "offset": 0,
- "limit": 42,
- "_links": {
}
}Returns the PostgresVersion by ID.
| versionId required | string <uuid> Example: 2edb9507-fb0e-5f58-a65b-952b43ff3549 The ID (UUID) of the PostgresVersion. |
{- "id": "2edb9507-fb0e-5f58-a65b-952b43ff3549",
- "type": "postgresversion",
- "href": "/versions/2edb9507-fb0e-5f58-a65b-952b43ff3549",
- "metadata": { },
- "properties": {
- "version": "16",
- "status": "SUPPORTED",
- "comment": "string",
- "canUpgradeTo": [
- "17",
- "18"
]
}
}