IONOS DBaaS PostgreSQL REST API (1.0.0)

Download OpenAPI specification:Download

An enterprise-grade Database is provided as a Service (DBaaS) solution that can be managed through a browser-based "Data Center Designer" (DCD) tool or via an easy to use API.

The API allows you to create additional PostgreSQL database clusters or modify existing ones. It is designed to allow users to leverage the same power and flexibility found within the DCD visual tool. Both tools are consistent with their concepts and lend well to making the experience smooth and intuitive.

Clusters

Everything about PostgreSQL clusters.

List clusters

Retrieves a list of PostgreSQL clusters.

Authorizations:
basicAuthtokenAuth
query Parameters
limit
integer [ 1 .. 1000 ]
Default: 100
Example: limit=100

The maximum number of elements to return. Use together with 'offset' for pagination.

offset
integer
Default: 0
Example: offset=200

The first element to return. Use together with 'limit' for pagination.

filter.name
string

Response filter to list only the PostgreSQL clusters that contain the specified name. The value is case insensitive and matched on the 'displayName' field.

Responses

Response samples

Content type
application/json
{
  • "type": "collection",
  • "id": "498ae72f-411f-11eb-9d07-046c59cc737e",
  • "items": [
    ],
  • "offset": 200,
  • "limit": 100,
  • "links": {
    }
}

Create a cluster

Creates a new PostgreSQL cluster. If the fromBackup field is populated, the new cluster will be created based on the given backup.

Authorizations:
basicAuthtokenAuth
Request Body schema: application/json

The cluster to be created.

object (ClusterMetadata)

Metadata of the resource.

object (CreateClusterProperties)

Properties with all data needed to create a new PostgreSQL cluster.

Responses

Request samples

Content type
application/json
{
  • "metadata": {
    },
  • "properties": {
    }
}

Response samples

Content type
application/json
{
  • "type": "cluster",
  • "id": "498ae72f-411f-11eb-9d07-046c59cc737e",
  • "metadata": {
    },
  • "properties": {
    }
}

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.

Authorizations:
basicAuthtokenAuth
path Parameters
clusterId
required
string
Example: 498ae72f-411f-11eb-9d07-046c59cc737e

The unique ID of the cluster.

Responses

Response samples

Content type
application/json
{
  • "type": "cluster",
  • "id": "498ae72f-411f-11eb-9d07-046c59cc737e",
  • "metadata": {
    },
  • "properties": {
    }
}

Patch a cluster

Patch attributes of a PostgreSQL cluster.

Authorizations:
basicAuthtokenAuth
path Parameters
clusterId
required
string
Example: 498ae72f-411f-11eb-9d07-046c59cc737e

The unique ID of the cluster.

Request Body schema: application/json

Part of the cluster which should be modified.

object (ClusterMetadata)

Metadata of the resource.

object (PatchClusterProperties)

Properties of the payload to change a cluster.

Responses

Request samples

Content type
application/json
{
  • "metadata": {
    },
  • "properties": {
    }
}

Response samples

Content type
application/json
{
  • "type": "cluster",
  • "id": "498ae72f-411f-11eb-9d07-046c59cc737e",
  • "metadata": {
    },
  • "properties": {
    }
}

Delete a cluster

Delete a PostgreSQL cluster.

Authorizations:
basicAuthtokenAuth
path Parameters
clusterId
required
string
Example: 498ae72f-411f-11eb-9d07-046c59cc737e

The unique ID of the cluster.

Responses

Response samples

Content type
application/json
{
  • "type": "cluster",
  • "id": "498ae72f-411f-11eb-9d07-046c59cc737e",
  • "metadata": {
    },
  • "properties": {
    }
}

List PostgreSQL versions

Retrieves a list of all available PostgreSQL versions.

Authorizations:
basicAuthtokenAuth

Responses

Response samples

Content type
application/json
{
  • "data": [
    ]
}

List PostgreSQL versions

Retrieves a list of all PostgreSQL versions available for this cluster including the current version.

Authorizations:
basicAuthtokenAuth
path Parameters
clusterId
required
string
Example: 498ae72f-411f-11eb-9d07-046c59cc737e

The unique ID of the cluster.

Responses

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Backups

Everything about PostgreSQL backups.

List cluster backups

Retrieves a list of all PostgreSQL cluster backups.

Authorizations:
basicAuthtokenAuth
query Parameters
limit
integer [ 1 .. 1000 ]
Default: 100
Example: limit=100

The maximum number of elements to return. Use together with 'offset' for pagination.

offset
integer
Default: 0
Example: offset=200

The first element to return. Use together with 'limit' for pagination.

Responses

Response samples

Content type
application/json
{
  • "type": "collection",
  • "id": "498ae72f-411f-11eb-9d07-046c59cc737e",
  • "items": [
    ],
  • "offset": 200,
  • "limit": 100,
  • "links": {
    }
}

Fetch a cluster backup

Retrieve a PostgreSQL cluster backup by using its ID. This value can be found when you GET a list of PostgreSQL cluster backups.

Authorizations:
basicAuthtokenAuth
path Parameters
backupId
required
string
Example: 498ae72f-411f-11eb-9d07-046c59cc737e-4oymiqu-12

The unique ID of the backup.

Responses

Response samples

Content type
application/json
{
  • "type": "backup",
  • "id": "498ae72f-411f-11eb-9d07-046c59cc737e",
  • "metadata": {
    },
  • "properties": {
    }
}

List backups of cluster

Retrieves a list of all backups of the given PostgreSQL cluster.

Authorizations:
basicAuthtokenAuth
path Parameters
clusterId
required
string
Example: 498ae72f-411f-11eb-9d07-046c59cc737e

The unique ID of the cluster.

query Parameters
limit
integer [ 1 .. 1000 ]
Default: 100
Example: limit=100

The maximum number of elements to return. Use together with 'offset' for pagination.

offset
integer
Default: 0
Example: offset=200

The first element to return. Use together with 'limit' for pagination.

Responses

Response samples

Content type
application/json
{
  • "type": "collection",
  • "id": "498ae72f-411f-11eb-9d07-046c59cc737e",
  • "items": [
    ],
  • "offset": 200,
  • "limit": 100,
  • "links": {
    }
}

Restores

Everything about PostgreSQL restores.

In-place restore of a cluster

Triggers an in-place restore of the given PostgreSQL.

Authorizations:
basicAuthtokenAuth
path Parameters
clusterId
required
string
Example: 498ae72f-411f-11eb-9d07-046c59cc737e

The unique ID of the cluster.

Request Body schema: application/json

The restore request to create.

backupId
required
string

The unique ID of the backup you want to restore.

recoveryTargetTime
string <date-time>

If this value is supplied as ISO 8601 timestamp, the backup will be replayed up until the given timestamp. If empty, the backup will be applied completely.

Responses

Request samples

Content type
application/json
{
  • "backupId": "dcd31531-3ac8-11eb-9feb-046c59cc737e",
  • "recoveryTargetTime": "2020-12-10T13:37:50+01:00"
}

Response samples

Content type
application/json
{
  • "httpStatus": 400,
  • "messages": [
    ]
}

Logs

Everything about PostgreSQL logs.

Get logs of your cluster

Retrieves PostgreSQL logs based on the given parameters.

Authorizations:
basicAuthtokenAuth
path Parameters
clusterId
required
string
Example: 498ae72f-411f-11eb-9d07-046c59cc737e

The unique ID of the cluster.

query Parameters
start
string <date-time>

The start time for the query in RFC3339 format. Must not be more than 30 days ago but before the end parameter. The default is 30 days ago.

end
string <date-time>

The end time for the query in RFC3339 format. Must not be greater than now. The default is the current timestamp.

direction
string
Default: "BACKWARD"
Enum: "BACKWARD" "FORWARD"

The direction in which to scan through the logs. The logs are returned in order of the direction.

limit
integer [ 1 .. 5000 ]
Default: 100

The maximal number of log lines to return. If the limit is reached then log lines will be cut at the end (respecting the scan direction).

Responses

Response samples

Content type
application/json
{
  • "instances": [
    ]
}

Users

Everything about PostgreSQL users.

List users

Retrieves a list of users

Authorizations:
basicAuthtokenAuth
path Parameters
clusterId
required
string
Example: 498ae72f-411f-11eb-9d07-046c59cc737e

The unique ID of the cluster.

query Parameters
limit
integer [ 1 .. 1000 ]
Default: 100
Example: limit=100

The maximum number of elements to return. Use together with 'offset' for pagination.

offset
integer
Default: 0
Example: offset=200

The first element to return. Use together with 'limit' for pagination.

system
boolean

If set to 'true' all users, including system users are returned. System users cannot be deleted or updated.

Responses

Response samples

Content type
application/json
{
  • "offset": 200,
  • "limit": 100,
  • "_links": {
    },
  • "type": "collection",
  • "id": "498ae72f-411f-11eb-9d07-046c59cc737e",
  • "href": "string",
  • "items": [
    ]
}

Create a user

Create a new Postgres User

Authorizations:
basicAuthtokenAuth
path Parameters
clusterId
required
string
Example: 498ae72f-411f-11eb-9d07-046c59cc737e

The unique ID of the cluster.

Request Body schema: application/json
required
object (UserProperties)

Responses

Request samples

Content type
application/json
{
  • "properties": {
    }
}

Response samples

Content type
application/json
{
  • "type": "collection",
  • "id": "498ae72f-411f-11eb-9d07-046c59cc737e",
  • "href": "string",
  • "metadata": {
    },
  • "properties": {
    }
}

Get user

Retrieves a single user

Authorizations:
basicAuthtokenAuth
path Parameters
clusterId
required
string
Example: 498ae72f-411f-11eb-9d07-046c59cc737e

The unique ID of the cluster.

username
required
string [ 1 .. 63 ] characters
Example: benjamin

The authentication username.

Responses

Response samples

Content type
application/json
{
  • "type": "collection",
  • "id": "498ae72f-411f-11eb-9d07-046c59cc737e",
  • "href": "string",
  • "metadata": {
    },
  • "properties": {
    }
}

Patch user

Patches a single user. Only changing the password is supported. System users cannot be patched.

Authorizations:
basicAuthtokenAuth
path Parameters
clusterId
required
string
Example: 498ae72f-411f-11eb-9d07-046c59cc737e

The unique ID of the cluster.

username
required
string [ 1 .. 63 ] characters
Example: benjamin

The authentication username.

Request Body schema: application/json

Patch containing all properties that should be updated

required
object (PatchUserProperties)

Responses

Request samples

Content type
application/json
{
  • "properties": {
    }
}

Response samples

Content type
application/json
{
  • "type": "collection",
  • "id": "498ae72f-411f-11eb-9d07-046c59cc737e",
  • "href": "string",
  • "metadata": {
    },
  • "properties": {
    }
}

Delete user

Deletes a single user

Authorizations:
basicAuthtokenAuth
path Parameters
clusterId
required
string
Example: 498ae72f-411f-11eb-9d07-046c59cc737e

The unique ID of the cluster.

username
required
string [ 1 .. 63 ] characters
Example: benjamin

The authentication username.

Responses

Response samples

Content type
application/json
{
  • "httpStatus": 400,
  • "messages": [
    ]
}

Databases

Everything about PostgreSQL databases.

List databases

Retrieves a list of databases

Authorizations:
basicAuthtokenAuth
path Parameters
clusterId
required
string
Example: 498ae72f-411f-11eb-9d07-046c59cc737e

The unique ID of the cluster.

query Parameters
limit
integer [ 1 .. 1000 ]
Default: 100
Example: limit=100

The maximum number of elements to return. Use together with 'offset' for pagination.

offset
integer
Default: 0
Example: offset=200

The first element to return. Use together with 'limit' for pagination.

Responses

Response samples

Content type
application/json
{
  • "offset": 200,
  • "limit": 100,
  • "_links": {
    },
  • "type": "collection",
  • "id": "498ae72f-411f-11eb-9d07-046c59cc737e",
  • "href": "string",
  • "items": [
    ]
}

Create a database

Create a new database

Authorizations:
basicAuthtokenAuth
path Parameters
clusterId
required
string
Example: 498ae72f-411f-11eb-9d07-046c59cc737e

The unique ID of the cluster.

Request Body schema: application/json

a database to create

required
object (DatabaseProperties)

Responses

Request samples

Content type
application/json
{
  • "properties": {
    }
}

Response samples

Content type
application/json
{
  • "type": "collection",
  • "id": "498ae72f-411f-11eb-9d07-046c59cc737e",
  • "href": "string",
  • "metadata": {
    },
  • "properties": {
    }
}

Get database

Retrieves a single database

Authorizations:
basicAuthtokenAuth
path Parameters
clusterId
required
string
Example: 498ae72f-411f-11eb-9d07-046c59cc737e

The unique ID of the cluster.

databasename
required
string [ 1 .. 63 ] characters
Example: benjamindb

The database name.

Responses

Response samples

Content type
application/json
{
  • "type": "collection",
  • "id": "498ae72f-411f-11eb-9d07-046c59cc737e",
  • "href": "string",
  • "metadata": {
    },
  • "properties": {
    }
}

Delete database

Deletes a single database

Authorizations:
basicAuthtokenAuth
path Parameters
clusterId
required
string
Example: 498ae72f-411f-11eb-9d07-046c59cc737e

The unique ID of the cluster.

databasename
required
string [ 1 .. 63 ] characters
Example: benjamindb

The database name.

Responses

Response samples

Content type
application/json
{
  • "httpStatus": 400,
  • "messages": [
    ]
}

Metadata

All metadata about the API, like versions.

Get the current API version

Retrieves the current version of the responding API.

Authorizations:
basicAuthtokenAuth

Responses

Response samples

Content type
application/json

Fetch all API versions

Retrieves all available versions of the responding API.

Authorizations:
basicAuthtokenAuth

Responses

Response samples

Content type
application/json