Clusters
Everything about PostgreSQL clusters.
Retrieves a list of PostgreSQL clusters.
The maximum number of elements to return. Use together with 'offset' for pagination.
100
Example: 100
The first element to return. Use together with 'limit' for pagination.
0
Example: 200
Response filter to list only the PostgreSQL clusters that contain the specified name. The value is case insensitive and matched on the 'displayName' field.
List of clusters.
GET /databases/postgresql/clusters HTTP/1.1
Host: api.ionos.com
Authorization: Basic username:password
Accept: */*
{
"type": "collection",
"id": "498ae72f-411f-11eb-9d07-046c59cc737e",
"items": [
{
"type": "cluster",
"id": "498ae72f-411f-11eb-9d07-046c59cc737e",
"metadata": {
"createdDate": "2020-12-10T13:37:50+01:00",
"createdBy": "[email protected]",
"createdByUserId": "87f9a82e-b28d-49ed-9d04-fba2c0459cd3",
"lastModifiedDate": "2020-12-11T13:37:50+01:00",
"lastModifiedBy": "[email protected]",
"lastModifiedByUserId": "87f9a82e-b28d-49ed-9d04-fba2c0459cd3",
"state": "AVAILABLE"
},
"properties": {
"displayName": "PostgreSQL cluster",
"postgresVersion": "13",
"location": "de/fra",
"dnsName": "pg.example.com",
"backupLocation": "de",
"instances": 2,
"ram": 2048,
"cores": 4,
"storageSize": 15000,
"storageType": "HDD",
"connections": [
{
"datacenterId": "5a029f4a-72e5-11ec-90d6-0242ac120003",
"lanId": "2",
"cidr": "192.168.1.100/24"
}
],
"maintenanceWindow": {
"time": "16:30:59",
"dayOfTheWeek": "Monday"
},
"synchronizationMode": "ASYNCHRONOUS",
"connectionPooler": {
"enabled": true,
"poolMode": "transaction"
}
}
}
],
"offset": 200,
"limit": 100,
"links": {
"prev": "<PREVIOUS-PAGE-URI>",
"self": "<THIS-PAGE-URI>",
"next": "<NEXT-PAGE-URI>"
}
}
Creates a new PostgreSQL cluster. If the fromBackup
field is populated, the new cluster will be created based on the given backup.
Request payload with all data needed to create a new PostgreSQL cluster.
POST /databases/postgresql/clusters HTTP/1.1
Host: api.ionos.com
Authorization: Basic username:password
Content-Type: application/json
Accept: */*
Content-Length: 956
{
"metadata": {
"createdDate": "2020-12-10T13:37:50+01:00",
"createdBy": "[email protected]",
"createdByUserId": "87f9a82e-b28d-49ed-9d04-fba2c0459cd3",
"lastModifiedDate": "2020-12-11T13:37:50+01:00",
"lastModifiedBy": "[email protected]",
"lastModifiedByUserId": "87f9a82e-b28d-49ed-9d04-fba2c0459cd3",
"state": "AVAILABLE"
},
"properties": {
"postgresVersion": "13",
"instances": 2,
"cores": 4,
"ram": 2048,
"storageSize": 15000,
"storageType": "HDD",
"connections": [
{
"datacenterId": "5a029f4a-72e5-11ec-90d6-0242ac120003",
"lanId": "2",
"cidr": "192.168.1.100/24"
}
],
"location": "de/fra",
"backupLocation": "de",
"displayName": "PostgreSQL cluster",
"maintenanceWindow": {
"time": "16:30:59",
"dayOfTheWeek": "Monday"
},
"credentials": {
"username": "db-admin",
"password": "password123"
},
"synchronizationMode": "ASYNCHRONOUS",
"fromBackup": {
"backupId": "dcd31531-3ac8-11eb-9feb-046c59cc737e",
"recoveryTargetTime": "2020-12-10T13:37:50+01:00"
},
"connectionPooler": {
"enabled": true,
"poolMode": "transaction"
}
}
}
{
"type": "cluster",
"id": "498ae72f-411f-11eb-9d07-046c59cc737e",
"metadata": {
"createdDate": "2020-12-10T13:37:50+01:00",
"createdBy": "[email protected]",
"createdByUserId": "87f9a82e-b28d-49ed-9d04-fba2c0459cd3",
"lastModifiedDate": "2020-12-11T13:37:50+01:00",
"lastModifiedBy": "[email protected]",
"lastModifiedByUserId": "87f9a82e-b28d-49ed-9d04-fba2c0459cd3",
"state": "AVAILABLE"
},
"properties": {
"displayName": "PostgreSQL cluster",
"postgresVersion": "13",
"location": "de/fra",
"dnsName": "pg.example.com",
"backupLocation": "de",
"instances": 2,
"ram": 2048,
"cores": 4,
"storageSize": 15000,
"storageType": "HDD",
"connections": [
{
"datacenterId": "5a029f4a-72e5-11ec-90d6-0242ac120003",
"lanId": "2",
"cidr": "192.168.1.100/24"
}
],
"maintenanceWindow": {
"time": "16:30:59",
"dayOfTheWeek": "Monday"
},
"synchronizationMode": "ASYNCHRONOUS",
"connectionPooler": {
"enabled": true,
"poolMode": "transaction"
}
}
}
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.
The unique ID of the cluster.
498ae72f-411f-11eb-9d07-046c59cc737e
GET /databases/postgresql/clusters/{clusterId} HTTP/1.1
Host: api.ionos.com
Authorization: Basic username:password
Accept: */*
{
"type": "cluster",
"id": "498ae72f-411f-11eb-9d07-046c59cc737e",
"metadata": {
"createdDate": "2020-12-10T13:37:50+01:00",
"createdBy": "[email protected]",
"createdByUserId": "87f9a82e-b28d-49ed-9d04-fba2c0459cd3",
"lastModifiedDate": "2020-12-11T13:37:50+01:00",
"lastModifiedBy": "[email protected]",
"lastModifiedByUserId": "87f9a82e-b28d-49ed-9d04-fba2c0459cd3",
"state": "AVAILABLE"
},
"properties": {
"displayName": "PostgreSQL cluster",
"postgresVersion": "13",
"location": "de/fra",
"dnsName": "pg.example.com",
"backupLocation": "de",
"instances": 2,
"ram": 2048,
"cores": 4,
"storageSize": 15000,
"storageType": "HDD",
"connections": [
{
"datacenterId": "5a029f4a-72e5-11ec-90d6-0242ac120003",
"lanId": "2",
"cidr": "192.168.1.100/24"
}
],
"maintenanceWindow": {
"time": "16:30:59",
"dayOfTheWeek": "Monday"
},
"synchronizationMode": "ASYNCHRONOUS",
"connectionPooler": {
"enabled": true,
"poolMode": "transaction"
}
}
}
Delete a PostgreSQL cluster.
The unique ID of the cluster.
498ae72f-411f-11eb-9d07-046c59cc737e
DELETE /databases/postgresql/clusters/{clusterId} HTTP/1.1
Host: api.ionos.com
Authorization: Basic username:password
Accept: */*
{
"type": "cluster",
"id": "498ae72f-411f-11eb-9d07-046c59cc737e",
"metadata": {
"createdDate": "2020-12-10T13:37:50+01:00",
"createdBy": "[email protected]",
"createdByUserId": "87f9a82e-b28d-49ed-9d04-fba2c0459cd3",
"lastModifiedDate": "2020-12-11T13:37:50+01:00",
"lastModifiedBy": "[email protected]",
"lastModifiedByUserId": "87f9a82e-b28d-49ed-9d04-fba2c0459cd3",
"state": "AVAILABLE"
},
"properties": {
"displayName": "PostgreSQL cluster",
"postgresVersion": "13",
"location": "de/fra",
"dnsName": "pg.example.com",
"backupLocation": "de",
"instances": 2,
"ram": 2048,
"cores": 4,
"storageSize": 15000,
"storageType": "HDD",
"connections": [
{
"datacenterId": "5a029f4a-72e5-11ec-90d6-0242ac120003",
"lanId": "2",
"cidr": "192.168.1.100/24"
}
],
"maintenanceWindow": {
"time": "16:30:59",
"dayOfTheWeek": "Monday"
},
"synchronizationMode": "ASYNCHRONOUS",
"connectionPooler": {
"enabled": true,
"poolMode": "transaction"
}
}
}
Patch attributes of a PostgreSQL cluster.
The unique ID of the cluster.
498ae72f-411f-11eb-9d07-046c59cc737e
Request payload to change a cluster.
PATCH /databases/postgresql/clusters/{clusterId} HTTP/1.1
Host: api.ionos.com
Authorization: Basic username:password
Content-Type: application/json
Accept: */*
Content-Length: 680
{
"metadata": {
"createdDate": "2020-12-10T13:37:50+01:00",
"createdBy": "[email protected]",
"createdByUserId": "87f9a82e-b28d-49ed-9d04-fba2c0459cd3",
"lastModifiedDate": "2020-12-11T13:37:50+01:00",
"lastModifiedBy": "[email protected]",
"lastModifiedByUserId": "87f9a82e-b28d-49ed-9d04-fba2c0459cd3",
"state": "AVAILABLE"
},
"properties": {
"cores": 4,
"ram": 2048,
"storageSize": 15000,
"connections": [
{
"datacenterId": "5a029f4a-72e5-11ec-90d6-0242ac120003",
"lanId": "2",
"cidr": "192.168.1.100/24"
}
],
"displayName": "PostgreSQL cluster",
"maintenanceWindow": {
"time": "16:30:59",
"dayOfTheWeek": "Monday"
},
"postgresVersion": "13",
"instances": 2,
"connectionPooler": {
"enabled": true,
"poolMode": "transaction"
}
}
}
{
"type": "cluster",
"id": "498ae72f-411f-11eb-9d07-046c59cc737e",
"metadata": {
"createdDate": "2020-12-10T13:37:50+01:00",
"createdBy": "[email protected]",
"createdByUserId": "87f9a82e-b28d-49ed-9d04-fba2c0459cd3",
"lastModifiedDate": "2020-12-11T13:37:50+01:00",
"lastModifiedBy": "[email protected]",
"lastModifiedByUserId": "87f9a82e-b28d-49ed-9d04-fba2c0459cd3",
"state": "AVAILABLE"
},
"properties": {
"displayName": "PostgreSQL cluster",
"postgresVersion": "13",
"location": "de/fra",
"dnsName": "pg.example.com",
"backupLocation": "de",
"instances": 2,
"ram": 2048,
"cores": 4,
"storageSize": 15000,
"storageType": "HDD",
"connections": [
{
"datacenterId": "5a029f4a-72e5-11ec-90d6-0242ac120003",
"lanId": "2",
"cidr": "192.168.1.100/24"
}
],
"maintenanceWindow": {
"time": "16:30:59",
"dayOfTheWeek": "Monday"
},
"synchronizationMode": "ASYNCHRONOUS",
"connectionPooler": {
"enabled": true,
"poolMode": "transaction"
}
}
}
Retrieves a list of all available PostgreSQL versions.
GET /databases/postgresql/clusters/postgresversions HTTP/1.1
Host: api.ionos.com
Authorization: Basic username:password
Accept: */*
{
"data": [
{
"name": "14"
}
]
}
Retrieves a list of all PostgreSQL versions available for this cluster.
The unique ID of the cluster.
498ae72f-411f-11eb-9d07-046c59cc737e
GET /databases/postgresql/clusters/{clusterId}/versions HTTP/1.1
Host: api.ionos.com
Authorization: Basic username:password
Accept: */*
{
"data": [
{
"name": "14"
}
]
}
Retrieves a list of all PostgreSQL versions available for this cluster including the current version.
The unique ID of the cluster.
498ae72f-411f-11eb-9d07-046c59cc737e
GET /databases/postgresql/clusters/{clusterId}/postgresversions HTTP/1.1
Host: api.ionos.com
Authorization: Basic username:password
Accept: */*
{
"data": [
{
"name": "14"
}
]
}
Was this helpful?