Managed Database for PostgreSQL and MySQL APIv1

Download OpenAPI

Introduction

Managed Database for PostgreSQL and MySQL provides fully-managed relational Database Instances, with MySQL or PostgreSQL as database engines. The resource allows you to focus on development rather than administration or configuration. It comes with a high-availability mode, data replication, and automatic backups.

Compared to traditional database management, which requires customers to provide their infrastructure and resources to manage their databases, Managed Database for PostgreSQL and MySQL Instance offers the user access to Database Instances without setting up the hardware or configuring the software. Scaleway handles the provisioning, manages the configuration, and provides useful features as high availability, automated backup, user management, and more.

Refer to our dedicated concepts page to find definitions of the different terms referring to Managed Database for PostgreSQL and MySQL.

Requirements

To perform the following steps, you must first ensure that:

1. Configure your environment variables.

Note: This is an optional step that seeks to simplify your usage of the APIs.

2. Edit the POST request payload you will use to create your Database Instance. Replace the parameters in the following example:

ParameterDescription
project_idThe ID of the Project you want to create your Database Instance in. To find your Project ID you can list the projects or consult the Scaleway console.
engineREQUIRED Version ID of the database engine. To check the list of available engines you can use the folowing endpoint: https://api.scaleway.com/rdb/v1/regions/$SCW_REGION/database-engines
nameName of the Database Instance
node_typeREQUIRED The node type. To check the list of available node types you can use the folowing endpoint: https://api.scaleway.com/rdb/v1/regions/$SCW_REGION/node-types
is_ha_clusterBOOLEAN Defines whether High Availability is enabled for the Database Instance
disable_backupBOOLEAN Defines whether automated backups are disabled for the Database Instance
tagsThe list of tags ["tag1", "tag2", ...] that will be associated with the Database Instance. Tags can be appended to the query of the List Redis™ Database Instances call to show results for only the Database Instances using a specific tag. You can also combine tags to list Database Instances that posess all the appended tags.
user_nameREQUIRED Identifier of the default user, which is created concurrently with the Database Instance
passwordREQUIRED Password for the default user
volume_typeType of volume where data is stored. You can specify either local volume (lssd) or block volume (bssd). The default value is lssd
volume_sizeVolume size when volume_type is bssd. The value should be expressed in bytes. For example 30GB is expressed as 30000000000

3. Create a Database Instance by running the following command. Make sure you include the payload you edited in the previous step.

4. List your Database Instances.

You should get a response like the following:

Note: This is a response example, the UUIDs and IP address displayed are not real.

5. Retrieve your Database Instance IP and port from the response.

Note: In the example above, the IP and port are 198.51.100.0 and 22245, respectively.

6. Connect to your Database Instance with the database client of the engine you selected.

For MySQL, run the following command:

For PostgreSQL, run:

For the recurring example, the command would look like:

7. Enter the database password that you defined upon creation.

You are now connected to your Managed Database.

Regions

Scaleway's infrastructure is spread across different regions and Availability Zones.

Managed Database for PostgreSQL and MySQL is available in the Paris, Amsterdam and Warsaw regions, which are represented by the following path parameters:

  • fr-par
  • nl-ams
  • pl-waw

Versions

Scaleway Database for PostgreSQL supports PostgreSQL versions 11, 12, 13 and 14.

Different modules are available for installation, including TimescaleDB and PostGIS. Refer to the Managed Database for PostgreSQL and MySQL FAQ page for an extensive list of PostgreSQL extensions.

You can create logical databases through the Scaleway console, the Scaleway APIs or SQL.

  • databases created using the Scaleway console or the API are owned by an internal system user. These are called "managed databases".
  • databases created using SQL will be owned by the creator. These are called "unmanaged databases".

Scaleway Database for MySQL supports MySQL 8.

  • users with an admin role have access to all logical databases and can create new ones.
  • users created via the API are authenticated using the default authentication plugin, which can be changed in the settings.
  • users with an admin role have CREATEROLE and CREATEDB privileges.
  • users do NOT have SUPERUSER nor REPLICATION privileges.
  • permission management through the Scaleway console or API is only possible for the "managed databases".

Databases that have been backed up and then restored retain the user permission settings in use at the time of backup. If you delete users after backup and then restore your backup in the same database, or if you restore a backup to a different database with different or no users, the permissions configured for them continue to exist, but with no associated owner. This error will put a stop to the restoration process.

To avoid this issue, we recommmend you re-create the users you deleted. In the occasion you restore the backup to a new database, you must create new users with the same names.

For more information about Managed Database for PostgreSQL and MySQL, you can check out the following pages:

If you wish to migrate existing databases to a Managed Database for PostgreSQL or MySQL, you can refer to the Migrating existing databases to a Database Instance tutorial page.

If your Database Instance uses local storage, your local volume might eventually approach full capacity and shift to disk_full mode. This mode grants you enough space to either upgrade your node type or clear out space in your volume.

A database backup is a dated export of a Database Instance stored on an offsite backend located in a different region than your database, by default. Once a backup is created, it can be used to restore the database. Each logical database in a Database Instance is backed up and can be restored separately.

List database backups

List all backups in a specified region, for a given Scaleway Organization or Scaleway Project. By default, the backups listed are ordered by creation date in ascending order. This can be modified via the order_by field.

GET
/rdb/v1/regions/{region}/backups
Path Parameters

region
required string
The region you want to target. Possible values are fr-par, nl-ams and pl-waw.
Query Parameters

name
string
Name of the database backups.

order_by
string
Criteria to use when ordering database backups listing. Possible values are created_at_asc, created_at_desc, name_asc, name_desc, status_asc and status_desc. The default value is created_at_asc.

instance_id
string
UUID of the Database Instance.

organization_id
string
Organization ID of the Organization the database backups belong to.

project_id
string
Project ID of the Project the database backups belong to.

page
integer
Page number. The default value is 1.

page_size
integer
Page size. The default value is 20.
200 Response

database_backups
array
List of database backups.

total_count
integer
Total count of database backups available.
Response Example

Create a new backup. You must set the instance_id, database_name, name and expires_at parameters.

POST
/rdb/v1/regions/{region}/backups
Path Parameters

region
required string
The region you want to target. Possible values are fr-par, nl-ams and pl-waw.
Body

instance_id
string
UUID of the Database Instance.

database_name
string
Name of the database you want to back up.

name
string
Name of the backup.

expires_at
nullable string
Expiration date (must follow the ISO 8601 format). (RFC 3339 format).
Request Example
200 Response

id
string
UUID of the database backup.

instance_id
string
UUID of the Database Instance.

database_name
string
Name of backed up database.

name
string
Name of the backup.

status
string
Status of the backup. Possible values are unknown, creating, ready, restoring, deleting, error, exporting and locked. The default value is unknown.

size
nullable integer
Size of the database backup. (in bytes).

expires_at
nullable string
Expiration date (must follow the ISO 8601 format). (RFC 3339 format).

created_at
nullable string
Creation date (must follow the ISO 8601 format). (RFC 3339 format).

updated_at
nullable string
Updated date (must follow the ISO 8601 format). (RFC 3339 format).

instance_name
string
Name of the Database Instance of the backup.

download_url
nullable string
URL you can download the backup from.

download_url_expires_at
nullable string
Expiration date of the download link. (RFC 3339 format).

region
string
Region of the database backup.

same_region
boolean
Store logical backups in the same region as the source Database Instance.
Response Example

Retrieve information about a given backup, specified by its database backup ID and region. Full details about the backup, like size, URL and expiration date, are returned in the response.

GET
/rdb/v1/regions/{region}/backups/{database_backup_id}
Path Parameters

region
required string
The region you want to target. Possible values are fr-par, nl-ams and pl-waw.

database_backup_id
required string
UUID of the database backup.
200 Response

id
string
UUID of the database backup.

instance_id
string
UUID of the Database Instance.

database_name
string
Name of backed up database.

name
string
Name of the backup.

status
string
Status of the backup. Possible values are unknown, creating, ready, restoring, deleting, error, exporting and locked. The default value is unknown.

size
nullable integer
Size of the database backup. (in bytes).

expires_at
nullable string
Expiration date (must follow the ISO 8601 format). (RFC 3339 format).

created_at
nullable string
Creation date (must follow the ISO 8601 format). (RFC 3339 format).

updated_at
nullable string
Updated date (must follow the ISO 8601 format). (RFC 3339 format).

instance_name
string
Name of the Database Instance of the backup.

download_url
nullable string
URL you can download the backup from.

download_url_expires_at
nullable string
Expiration date of the download link. (RFC 3339 format).

region
string
Region of the database backup.

same_region
boolean
Store logical backups in the same region as the source Database Instance.
Response Example

Update the parameters of a backup, including name and expiration date.

PATCH
/rdb/v1/regions/{region}/backups/{database_backup_id}
Path Parameters

region
required string
The region you want to target. Possible values are fr-par, nl-ams and pl-waw.

database_backup_id
required string
UUID of the database backup to update.
Body

name
nullable string
Name of the Database Backup.

expires_at
nullable string
Expiration date (must follow the ISO 8601 format). (RFC 3339 format).
Request Example
200 Response

id
string
UUID of the database backup.

instance_id
string
UUID of the Database Instance.

database_name
string
Name of backed up database.

name
string
Name of the backup.

status
string
Status of the backup. Possible values are unknown, creating, ready, restoring, deleting, error, exporting and locked. The default value is unknown.

size
nullable integer
Size of the database backup. (in bytes).

expires_at
nullable string
Expiration date (must follow the ISO 8601 format). (RFC 3339 format).

created_at
nullable string
Creation date (must follow the ISO 8601 format). (RFC 3339 format).

updated_at
nullable string
Updated date (must follow the ISO 8601 format). (RFC 3339 format).

instance_name
string
Name of the Database Instance of the backup.

download_url
nullable string
URL you can download the backup from.

download_url_expires_at
nullable string
Expiration date of the download link. (RFC 3339 format).

region
string
Region of the database backup.

same_region
boolean
Store logical backups in the same region as the source Database Instance.
Response Example

Delete a backup, specified by its database backup ID and region. Deleting a backup is permanent, and cannot be undone.

DELETE
/rdb/v1/regions/{region}/backups/{database_backup_id}
Path Parameters

region
required string
The region you want to target. Possible values are fr-par, nl-ams and pl-waw.

database_backup_id
required string
UUID of the database backup to delete.
200 Response

id
string
UUID of the database backup.

instance_id
string
UUID of the Database Instance.

database_name
string
Name of backed up database.

name
string
Name of the backup.

status
string
Status of the backup. Possible values are unknown, creating, ready, restoring, deleting, error, exporting and locked. The default value is unknown.

size
nullable integer
Size of the database backup. (in bytes).

expires_at
nullable string
Expiration date (must follow the ISO 8601 format). (RFC 3339 format).

created_at
nullable string
Creation date (must follow the ISO 8601 format). (RFC 3339 format).

updated_at
nullable string
Updated date (must follow the ISO 8601 format). (RFC 3339 format).

instance_name
string
Name of the Database Instance of the backup.

download_url
nullable string
URL you can download the backup from.

download_url_expires_at
nullable string
Expiration date of the download link. (RFC 3339 format).

region
string
Region of the database backup.

same_region
boolean
Store logical backups in the same region as the source Database Instance.
Response Example

Export a backup, specified by the database_backup_id and the region parameters. The download URL is returned in the response.

POST
/rdb/v1/regions/{region}/backups/{database_backup_id}/export
Path Parameters

region
required string
The region you want to target. Possible values are fr-par, nl-ams and pl-waw.

database_backup_id
required string
UUID of the database backup you want to export.
Body

Request Example
200 Response

id
string
UUID of the database backup.

instance_id
string
UUID of the Database Instance.

database_name
string
Name of backed up database.

name
string
Name of the backup.

status
string
Status of the backup. Possible values are unknown, creating, ready, restoring, deleting, error, exporting and locked. The default value is unknown.

size
nullable integer
Size of the database backup. (in bytes).

expires_at
nullable string
Expiration date (must follow the ISO 8601 format). (RFC 3339 format).

created_at
nullable string
Creation date (must follow the ISO 8601 format). (RFC 3339 format).

updated_at
nullable string
Updated date (must follow the ISO 8601 format). (RFC 3339 format).

instance_name
string
Name of the Database Instance of the backup.

download_url
nullable string
URL you can download the backup from.

download_url_expires_at
nullable string
Expiration date of the download link. (RFC 3339 format).

region
string
Region of the database backup.

same_region
boolean
Store logical backups in the same region as the source Database Instance.
Response Example

Launch the process of restoring database backup. You must specify the instance_id of the Database Instance of destination, where the backup will be restored. Note that large database backups can take up to several hours to restore.

POST
/rdb/v1/regions/{region}/backups/{database_backup_id}/restore
Path Parameters

region
required string
The region you want to target. Possible values are fr-par, nl-ams and pl-waw.

database_backup_id
required string
Backup of a logical database.
Body

database_name
nullable string
Defines the destination database to restore into a specified database (the default destination is set to the origin database of the backup).

instance_id
required string
Defines the Database Instance where the backup has to be restored.
Request Example
200 Response

id
string
UUID of the database backup.

instance_id
string
UUID of the Database Instance.

database_name
string
Name of backed up database.

name
string
Name of the backup.

status
string
Status of the backup. Possible values are unknown, creating, ready, restoring, deleting, error, exporting and locked. The default value is unknown.

size
nullable integer
Size of the database backup. (in bytes).

expires_at
nullable string
Expiration date (must follow the ISO 8601 format). (RFC 3339 format).

created_at
nullable string
Creation date (must follow the ISO 8601 format). (RFC 3339 format).

updated_at
nullable string
Updated date (must follow the ISO 8601 format). (RFC 3339 format).

instance_name
string
Name of the Database Instance of the backup.

download_url
nullable string
URL you can download the backup from.

download_url_expires_at
nullable string
Expiration date of the download link. (RFC 3339 format).

region
string
Region of the database backup.

same_region
boolean
Store logical backups in the same region as the source Database Instance.
Response Example

A database engine is the software component that stores and retrieves your data from a database. Currently PostgreSQL 11, 12, 13 and 14 are available. MySQL is available in version 8.

List the PostgreSQL and MySQL database engines available at Scaleway.

GET
/rdb/v1/regions/{region}/database-engines
Path Parameters

region
required string
The region you want to target. Possible values are fr-par, nl-ams and pl-waw.
Query Parameters

name
string
Name of the database engine.

version
string
Version of the database engine.

page
integer
Page number. The default value is 1.

page_size
integer
Page size. The default value is 20.
200 Response

engines
array
List of the available database engines.

total_count
integer
Total count of database engines available.
Response Example

A Database Instance is made up of one or multiple dedicated compute nodes running a single database engine. Two node settings are available: High-Availability (HA), with a main node and one replica, and standalone with a main node. The HA standby node is linked to the main node, using synchronous replication. Synchronous replication offers the ability to confirm that all changes intended by a transaction have been transferred and applied to the synchronous replica node, providing durability to the data.

Note: HA standby nodes are not accessible to users unless the main node becomes unavailable and the standby takes over. If you wish to run queries on a read-only node, you can use Read Replicas

Read Replicas can be used for certain read-only workflows such as Business Intelligence, or for a read-only scaling of your application. Read Replicas use asynchronous replication to replicate data from the main node.

List all Database Instances in the specified region, for a given Scaleway Organization or Scaleway Project. By default, the Database Instances returned in the list are ordered by creation date in ascending order, though this can be modified via the order_by field. You can define additional parameters for your query, such as tags and name. For the name parameter, the value you include will be checked against the whole name string to see if it includes the string you put in the parameter.

GET
/rdb/v1/regions/{region}/instances
Path Parameters

region
required string
The region you want to target. Possible values are fr-par, nl-ams and pl-waw.
Query Parameters

tags
array
List Database Instances that have a given tag.

name
string
Lists Database Instances that match a name pattern.

order_by
string
Criteria to use when ordering Database Instance listings. Possible values are created_at_asc, created_at_desc, name_asc, name_desc, region, status_asc and status_desc. The default value is created_at_asc.

organization_id
string
Please use project_id instead.

project_id
string
Project ID to list the Database Instance of.

page
integer
Page number. The default value is 1.

page_size
integer
Page size. The default value is 20.
200 Response

instances
array
List of all Database Instances available in an Organization or Project.

total_count
integer
Total count of Database Instances available in a Organization or Project.
Response Example

Create a new Database Instance. You must set the engine, user_name, password and node_type parameters. Optionally, you can specify the volume type and size.

POST
/rdb/v1/regions/{region}/instances
Path Parameters

region
required string
The region you want to target. Possible values are fr-par, nl-ams and pl-waw.
Body

organization_id
deprecated string
Please use project_id instead. Only one of organization_id and project_id may be set.

project_id
string
The Project ID on which the Database Instance will be created. Only one of organization_id and project_id may be set.

name
string
Name of the Database Instance.

engine
required string
Database engine of the Database Instance (PostgreSQL, MySQL, ...).

user_name
required string
Username created when the Database Instance is created.

password
required string
Password of the user.

node_type
required string
Type of node to use for the Database Instance.

is_ha_cluster
boolean
Defines whether or not High-Availability is enabled.

disable_backup
boolean
Defines whether or not backups are disabled.

tags
array
Tags to apply to the Database Instance.

init_settings
array
List of engine settings to be set upon Database Instance initialization.

volume_type
string
Type of volume where data is stored (lssd, bssd, ...). Possible values are lssd and bssd. The default value is lssd.

volume_size
integer
Volume size when volume_type is not lssd. (in bytes).

init_endpoints
array
One or multiple EndpointSpec used to expose your Database Instance. A load_balancer public endpoint is systematically created.

backup_same_region
boolean
Defines whether to or not to store logical backups in the same region as the Database Instance.
Request Example
200 Response

created_at
nullable string
Creation date (must follow the ISO 8601 format). (RFC 3339 format).

volume
object
Volumes of the Database Instance.

region
string
Region the Database Instance is in.

id
string
UUID of the Database Instance. (UUID format).

name
string
Name of the Database Instance.

organization_id
string
Organization ID the Database Instance belongs to. (UUID format).

project_id
string
Project ID the Database Instance belongs to. (UUID format).

status
string
Status of the Database Instance. Possible values are unknown, ready, provisioning, configuring, deleting, error, autohealing, locked, initializing, disk_full, backuping, snapshotting and restarting. The default value is unknown.

engine
string
Database engine of the database (PostgreSQL, MySQL, ...).

upgradable_version
array
Available database engine versions for upgrade.

endpoint
deprecated object
Endpoint of the Database Instance.

tags
array
List of tags applied to the Database Instance.

settings
array
Advanced settings of the Database Instance.

backup_schedule
object
Backup schedule of the Database Instance.

is_ha_cluster
boolean
Defines whether or not High-Availability is enabled.

read_replicas
array
Read Replicas of the Database Instance.

node_type
string
Node type of the Database Instance.

init_settings
array
List of engine settings to be set at database initialization.

endpoints
array
List of Database Instance endpoints.

logs_policy
object
Logs policy of the Database Instance.

backup_same_region
boolean
Store logical backups in the same region as the Database Instance.

maintenances
array
List of Database Instance maintenance events.
Response Example

Retrieve information about a given Database Instance, specified by the region and instance_id parameters. Its full details, including name, status, IP address and port, are returned in the response object.

GET
/rdb/v1/regions/{region}/instances/{instance_id}
Path Parameters

region
required string
The region you want to target. Possible values are fr-par, nl-ams and pl-waw.

instance_id
required string
UUID of the Database Instance.
200 Response

created_at
nullable string
Creation date (must follow the ISO 8601 format). (RFC 3339 format).

volume
object
Volumes of the Database Instance.

region
string
Region the Database Instance is in.

id
string
UUID of the Database Instance. (UUID format).

name
string
Name of the Database Instance.

organization_id
string
Organization ID the Database Instance belongs to. (UUID format).

project_id
string
Project ID the Database Instance belongs to. (UUID format).

status
string
Status of the Database Instance. Possible values are unknown, ready, provisioning, configuring, deleting, error, autohealing, locked, initializing, disk_full, backuping, snapshotting and restarting. The default value is unknown.

engine
string
Database engine of the database (PostgreSQL, MySQL, ...).

upgradable_version
array
Available database engine versions for upgrade.

endpoint
deprecated object
Endpoint of the Database Instance.

tags
array
List of tags applied to the Database Instance.

settings
array
Advanced settings of the Database Instance.

backup_schedule
object
Backup schedule of the Database Instance.

is_ha_cluster
boolean
Defines whether or not High-Availability is enabled.

read_replicas
array
Read Replicas of the Database Instance.

node_type
string
Node type of the Database Instance.

init_settings
array
List of engine settings to be set at database initialization.

endpoints
array
List of Database Instance endpoints.

logs_policy
object
Logs policy of the Database Instance.

backup_same_region
boolean
Store logical backups in the same region as the Database Instance.

maintenances
array
List of Database Instance maintenance events.
Response Example

Update the parameters of a Database Instance, including name, tags and backup schedule details.

PATCH
/rdb/v1/regions/{region}/instances/{instance_id}
Path Parameters

region
required string
The region you want to target. Possible values are fr-par, nl-ams and pl-waw.

instance_id
required string
UUID of the Database Instance to update.
Body

backup_schedule_frequency
nullable integer
In hours.

backup_schedule_retention
nullable integer
In days.

is_backup_schedule_disabled
nullable boolean
Defines whether or not the backup schedule is disabled.

name
nullable string
Name of the Database Instance.

tags
nullable array
Tags of a Database Instance.

logs_policy
object
Logs policy of the Database Instance.

backup_same_region
nullable boolean
Store logical backups in the same region as the Database Instance.
Request Example
200 Response

created_at
nullable string
Creation date (must follow the ISO 8601 format). (RFC 3339 format).

volume
object
Volumes of the Database Instance.

region
string
Region the Database Instance is in.

id
string
UUID of the Database Instance. (UUID format).

name
string
Name of the Database Instance.

organization_id
string
Organization ID the Database Instance belongs to. (UUID format).

project_id
string
Project ID the Database Instance belongs to. (UUID format).

status
string
Status of the Database Instance. Possible values are unknown, ready, provisioning, configuring, deleting, error, autohealing, locked, initializing, disk_full, backuping, snapshotting and restarting. The default value is unknown.

engine
string
Database engine of the database (PostgreSQL, MySQL, ...).

upgradable_version
array
Available database engine versions for upgrade.

endpoint
deprecated object
Endpoint of the Database Instance.

tags
array
List of tags applied to the Database Instance.

settings
array
Advanced settings of the Database Instance.

backup_schedule
object
Backup schedule of the Database Instance.

is_ha_cluster
boolean
Defines whether or not High-Availability is enabled.

read_replicas
array
Read Replicas of the Database Instance.

node_type
string
Node type of the Database Instance.

init_settings
array
List of engine settings to be set at database initialization.

endpoints
array
List of Database Instance endpoints.

logs_policy
object
Logs policy of the Database Instance.

backup_same_region
boolean
Store logical backups in the same region as the Database Instance.

maintenances
array
List of Database Instance maintenance events.
Response Example

Delete a given Database Instance, specified by the region and instance_id parameters. Deleting a Database Instance is permanent, and cannot be undone. Note that upon deletion all your data will be lost.

DELETE
/rdb/v1/regions/{region}/instances/{instance_id}
Path Parameters

region
required string
The region you want to target. Possible values are fr-par, nl-ams and pl-waw.

instance_id
required string
UUID of the Database Instance to delete.
200 Response

created_at
nullable string
Creation date (must follow the ISO 8601 format). (RFC 3339 format).

volume
object
Volumes of the Database Instance.

region
string
Region the Database Instance is in.

id
string
UUID of the Database Instance. (UUID format).

name
string
Name of the Database Instance.

organization_id
string
Organization ID the Database Instance belongs to. (UUID format).

project_id
string
Project ID the Database Instance belongs to. (UUID format).

status
string
Status of the Database Instance. Possible values are unknown, ready, provisioning, configuring, deleting, error, autohealing, locked, initializing, disk_full, backuping, snapshotting and restarting. The default value is unknown.

engine
string
Database engine of the database (PostgreSQL, MySQL, ...).

upgradable_version
array
Available database engine versions for upgrade.

endpoint
deprecated object
Endpoint of the Database Instance.

tags
array
List of tags applied to the Database Instance.

settings
array
Advanced settings of the Database Instance.

backup_schedule
object
Backup schedule of the Database Instance.

is_ha_cluster
boolean
Defines whether or not High-Availability is enabled.

read_replicas
array
Read Replicas of the Database Instance.

node_type
string
Node type of the Database Instance.

init_settings
array
List of engine settings to be set at database initialization.

endpoints
array
List of Database Instance endpoints.

logs_policy
object
Logs policy of the Database Instance.

backup_same_region
boolean
Store logical backups in the same region as the Database Instance.

maintenances
array
List of Database Instance maintenance events.
Response Example

Retrieve information about the TLS certificate of a given Database Instance. Details like name and content are returned in the response.

GET
/rdb/v1/regions/{region}/instances/{instance_id}/certificate
Path Parameters

region
required string
The region you want to target. Possible values are fr-par, nl-ams and pl-waw.

instance_id
required string
UUID of the Database Instance.
200 Response

name
string

content_type
string

content
string
Response Example

Clone a given Database Instance, specified by the region and instance_id parameters. The clone feature allows you to create a new Database Instance from an existing one. The clone includes all existing databases, users and permissions. You can create a clone on a Database Instance bigger than your current one.

POST
/rdb/v1/regions/{region}/instances/{instance_id}/clone
Path Parameters

region
required string
The region you want to target. Possible values are fr-par, nl-ams and pl-waw.

instance_id
required string
UUID of the Database Instance you want to clone.
Body

name
string
Name of the Database Instance clone.

node_type
nullable string
Node type of the clone.
Request Example
200 Response

created_at
nullable string
Creation date (must follow the ISO 8601 format). (RFC 3339 format).

volume
object
Volumes of the Database Instance.

region
string
Region the Database Instance is in.

id
string
UUID of the Database Instance. (UUID format).

name
string
Name of the Database Instance.

organization_id
string
Organization ID the Database Instance belongs to. (UUID format).

project_id
string
Project ID the Database Instance belongs to. (UUID format).

status
string
Status of the Database Instance. Possible values are unknown, ready, provisioning, configuring, deleting, error, autohealing, locked, initializing, disk_full, backuping, snapshotting and restarting. The default value is unknown.

engine
string
Database engine of the database (PostgreSQL, MySQL, ...).

upgradable_version
array
Available database engine versions for upgrade.

endpoint
deprecated object
Endpoint of the Database Instance.

tags
array
List of tags applied to the Database Instance.

settings
array
Advanced settings of the Database Instance.

backup_schedule
object
Backup schedule of the Database Instance.

is_ha_cluster
boolean
Defines whether or not High-Availability is enabled.

read_replicas
array
Read Replicas of the Database Instance.

node_type
string
Node type of the Database Instance.

init_settings
array
List of engine settings to be set at database initialization.

endpoints
array
List of Database Instance endpoints.

logs_policy
object
Logs policy of the Database Instance.

backup_same_region
boolean
Store logical backups in the same region as the Database Instance.

maintenances
array
List of Database Instance maintenance events.
Response Example

List the available logs of a Database Instance. By default, the logs returned in the list are ordered by creation date in ascending order, though this can be modified via the order_by field.

GET
/rdb/v1/regions/{region}/instances/{instance_id}/logs
Path Parameters

region
required string
The region you want to target. Possible values are fr-par, nl-ams and pl-waw.

instance_id
required string
UUID of the Database Instance you want logs of.
Query Parameters

order_by
string
Criteria to use when ordering Database Instance logs listing. Possible values are created_at_asc and created_at_desc. The default value is created_at_asc.
200 Response

instance_logs
array
Available logs in a Database Instance.
Response Example

List remote log details. By default, the details returned in the list are ordered by creation date in ascending order, though this can be modified via the order_by field.

GET
/rdb/v1/regions/{region}/instances/{instance_id}/logs-details
Path Parameters

region
required string
The region you want to target. Possible values are fr-par, nl-ams and pl-waw.

instance_id
required string
UUID of the Database Instance you want logs of.
200 Response

details
array
Remote Database Instance logs details.
Response Example

Retrieve the time series metrics of a given Database Instance. You can define the period from which to retrieve metrics by specifying the start_date and end_date.

GET
/rdb/v1/regions/{region}/instances/{instance_id}/metrics
Path Parameters

region
required string
The region you want to target. Possible values are fr-par, nl-ams and pl-waw.

instance_id
required string
UUID of the Database Instance.
Query Parameters

start_date
string
Start date to gather metrics from. (RFC 3339 format).

end_date
string
End date to gather metrics from. (RFC 3339 format).

metric_name
string
Name of the metric to gather.
200 Response

timeseries
array
Time series of metrics of a Database Instance.
Response Example

Prepare your Database Instance logs. You can define the start_date and end_date parameters for your query. The download URL is returned in the response. Logs are recorded from 00h00 to 23h59 and then aggregated in a .log file once a day. Therefore, even if you specify a timeframe from which you want to get the logs, you will receive logs from the full 24 hours.

POST
/rdb/v1/regions/{region}/instances/{instance_id}/prepare-logs
Path Parameters

region
required string
The region you want to target. Possible values are fr-par, nl-ams and pl-waw.

instance_id
required string
UUID of the Database Instance you want logs of.
Body

start_date
nullable string
Start datetime of your log. (RFC 3339 format). (RFC 3339 format).

end_date
nullable string
End datetime of your log. (RFC 3339 format). (RFC 3339 format).
Request Example
200 Response

instance_logs
array
Instance logs for a Database Instance between a start and an end date.
Response Example

Purge a given remote log from a Database Instance. You can specify the log_name of the log you wish to clean from your Database Instance.

POST
/rdb/v1/regions/{region}/instances/{instance_id}/purge-logs
Path Parameters

region
required string
The region you want to target. Possible values are fr-par, nl-ams and pl-waw.

instance_id
required string
UUID of the Database Instance you want logs of.
Body

log_name
nullable string
Given log name to purge.
Request Example
204 Response

Empty response

Renew a TLS for a Database Instance. Renewing a certificate means that you will not be able to connect to your Database Instance using the previous certificate. You will also need to download and update the new certificate for all database clients.

POST
/rdb/v1/regions/{region}/instances/{instance_id}/renew-certificate
Path Parameters

region
required string
The region you want to target. Possible values are fr-par, nl-ams and pl-waw.

instance_id
required string
UUID of the Database Instance you want logs of.
Body

Request Example
204 Response

Empty response

Restart a given Database Instance, specified by the region and instance_id parameters. The status of the Database Instance returned in the response.

POST
/rdb/v1/regions/{region}/instances/{instance_id}/restart
Path Parameters

region
required string
The region you want to target. Possible values are fr-par, nl-ams and pl-waw.

instance_id
required string
UUID of the Database Instance you want to restart.
Body

Request Example
200 Response

created_at
nullable string
Creation date (must follow the ISO 8601 format). (RFC 3339 format).

volume
object
Volumes of the Database Instance.

region
string
Region the Database Instance is in.

id
string
UUID of the Database Instance. (UUID format).

name
string
Name of the Database Instance.

organization_id
string
Organization ID the Database Instance belongs to. (UUID format).

project_id
string
Project ID the Database Instance belongs to. (UUID format).

status
string
Status of the Database Instance. Possible values are unknown, ready, provisioning, configuring, deleting, error, autohealing, locked, initializing, disk_full, backuping, snapshotting and restarting. The default value is unknown.

engine
string
Database engine of the database (PostgreSQL, MySQL, ...).

upgradable_version
array
Available database engine versions for upgrade.

endpoint
deprecated object
Endpoint of the Database Instance.

tags
array
List of tags applied to the Database Instance.

settings
array
Advanced settings of the Database Instance.

backup_schedule
object
Backup schedule of the Database Instance.

is_ha_cluster
boolean
Defines whether or not High-Availability is enabled.

read_replicas
array
Read Replicas of the Database Instance.

node_type
string
Node type of the Database Instance.

init_settings
array
List of engine settings to be set at database initialization.

endpoints
array
List of Database Instance endpoints.

logs_policy
object
Logs policy of the Database Instance.

backup_same_region
boolean
Store logical backups in the same region as the Database Instance.

maintenances
array
List of Database Instance maintenance events.
Response Example

Upgrade your current Database Instance specifications like node type, high availability, volume, or the database engine version. Note that upon upgrade the enable_ha parameter can only be set to true.

POST
/rdb/v1/regions/{region}/instances/{instance_id}/upgrade
Path Parameters

region
required string
The region you want to target. Possible values are fr-par, nl-ams and pl-waw.

instance_id
required string
UUID of the Database Instance you want to upgrade.
Body

node_type
string
Node type of the Database Instance you want to upgrade to. Only one of node_type, enable_ha, volume_size, volume_type and upgradable_version_id may be set.

enable_ha
boolean
Defines whether or not high availability should be enabled on the Database Instance. Only one of node_type, enable_ha, volume_size, volume_type and upgradable_version_id may be set.

volume_size
integer
Increase your block storage volume size. Only one of node_type, enable_ha, volume_size, volume_type and upgradable_version_id may be set.

volume_type
string
Change your Database Instance storage type. Possible values are lssd and bssd. The default value is lssd. Only one of node_type, enable_ha, volume_size, volume_type and upgradable_version_id may be set.

upgradable_version_id
string
Update your database engine to a newer version. This will create a new Database Instance with same specifications as the current one and perform a Database Engine upgrade. (UUID format). Only one of node_type, enable_ha, volume_size, volume_type and upgradable_version_id may be set.
Request Example
200 Response

created_at
nullable string
Creation date (must follow the ISO 8601 format). (RFC 3339 format).

volume
object
Volumes of the Database Instance.

region
string
Region the Database Instance is in.

id
string
UUID of the Database Instance. (UUID format).

name
string
Name of the Database Instance.

organization_id
string
Organization ID the Database Instance belongs to. (UUID format).

project_id
string
Project ID the Database Instance belongs to. (UUID format).

status
string
Status of the Database Instance. Possible values are unknown, ready, provisioning, configuring, deleting, error, autohealing, locked, initializing, disk_full, backuping, snapshotting and restarting. The default value is unknown.

engine
string
Database engine of the database (PostgreSQL, MySQL, ...).

upgradable_version
array
Available database engine versions for upgrade.

endpoint
deprecated object
Endpoint of the Database Instance.

tags
array
List of tags applied to the Database Instance.

settings
array
Advanced settings of the Database Instance.

backup_schedule
object
Backup schedule of the Database Instance.

is_ha_cluster
boolean
Defines whether or not High-Availability is enabled.

read_replicas
array
Read Replicas of the Database Instance.

node_type
string
Node type of the Database Instance.

init_settings
array
List of engine settings to be set at database initialization.

endpoints
array
List of Database Instance endpoints.

logs_policy
object
Logs policy of the Database Instance.

backup_same_region
boolean
Store logical backups in the same region as the Database Instance.

maintenances
array
List of Database Instance maintenance events.
Response Example

Retrieve information about the logs of a Database Instance. Specify the instance_log_id and region in your request to get information such as download_url, status, expires_at and created_at about your logs in the response.

GET
/rdb/v1/regions/{region}/logs/{instance_log_id}
Path Parameters

region
required string
The region you want to target. Possible values are fr-par, nl-ams and pl-waw.

instance_log_id
required string
UUID of the instance_log you want.
200 Response

download_url
nullable string
Presigned S3 URL to download your log file.

id
string
UUID of the Database Instance log.

status
string
Status of the logs in a Database Instance. Possible values are unknown, ready, creating and error. The default value is unknown.

node_name
string
Name of the underlying node.

expires_at
nullable string
Expiration date (must follow the ISO 8601 format). (RFC 3339 format).

created_at
nullable string
Creation date (must follow the ISO 8601 format). (RFC 3339 format).

region
string
Region the Database Instance is in.
Response Example

A Read Replica is a live copy of a Database Instance that behaves like an Instance, but that only allows read-only connections. The replica mirrors the data of the primary Database node and any changes made are replicated to the replica asynchronously. Read Replicas allow you to scale your Database Instance for read-heavy database workloads. They can also be used for business intelligence workloads.

A Read Replica can have at most one direct access and one Private Network endpoint. Loadbalancer endpoints are not available on Read Replicas even if this resource is displayed in the Read Replica response example.

If you want to remove a Read Replica endpoint, you can use delete a Database Instance endpoint API call.

Instance Access Control Lists (ACL) also apply to Read Replica direct access endpoints.

Limitations: There might be replication lags between the primary node and its Read Replica nodes. You can try to reduce this lag with some good practices:

  • All your tables should have a primary key
  • Don't run large transactions that modify, delete or insert lots of rows. Try to split it into several small transactions.

Create a new Read Replica of a Database Instance. You must specify the region and the instance_id. You can only create a maximum of 3 Read Replicas per Database Instance.

POST
/rdb/v1/regions/{region}/read-replicas
Path Parameters

region
required string
The region you want to target. Possible values are fr-par, nl-ams and pl-waw.
Body

instance_id
required string
UUID of the Database Instance you want to create a Read Replica from. (UUID format).

endpoint_spec
array
Specification of the endpoint you want to create.
Request Example
200 Response

id
string
UUID of the Read Replica. (UUID format).

endpoints
array
Display Read Replica connection information.

status
string
Read replica status. Possible values are unknown, provisioning, initializing, ready, deleting, error, locked and configuring. The default value is unknown.

region
string
Region the Read Replica is in.
Response Example

Retrieve information about a Database Instance Read Replica. Full details about the Read Replica, like endpoints, status and region are returned in the response.

GET
/rdb/v1/regions/{region}/read-replicas/{read_replica_id}
Path Parameters

region
required string
The region you want to target. Possible values are fr-par, nl-ams and pl-waw.

read_replica_id
required string
UUID of the Read Replica. (UUID format).
200 Response

id
string
UUID of the Read Replica. (UUID format).

endpoints
array
Display Read Replica connection information.

status
string
Read replica status. Possible values are unknown, provisioning, initializing, ready, deleting, error, locked and configuring. The default value is unknown.

region
string
Region the Read Replica is in.
Response Example

Delete a Read Replica of a Database Instance. You must specify the region and read_replica_id parameters of the Read Replica you want to delete.

DELETE
/rdb/v1/regions/{region}/read-replicas/{read_replica_id}
Path Parameters

region
required string
The region you want to target. Possible values are fr-par, nl-ams and pl-waw.

read_replica_id
required string
UUID of the Read Replica. (UUID format).
200 Response

id
string
UUID of the Read Replica. (UUID format).

endpoints
array
Display Read Replica connection information.

status
string
Read replica status. Possible values are unknown, provisioning, initializing, ready, deleting, error, locked and configuring. The default value is unknown.

region
string
Region the Read Replica is in.
Response Example

Create a new endpoint for a Read Replica. Read Replicas can have at most one direct access and one Private Network endpoint.

POST
/rdb/v1/regions/{region}/read-replicas/{read_replica_id}/endpoints
Path Parameters

region
required string
The region you want to target. Possible values are fr-par, nl-ams and pl-waw.

read_replica_id
required string
UUID of the Read Replica. (UUID format).
Body

endpoint_spec
required array
Specification of the endpoint you want to create.
Request Example
200 Response

id
string
UUID of the Read Replica. (UUID format).

endpoints
array
Display Read Replica connection information.

status
string
Read replica status. Possible values are unknown, provisioning, initializing, ready, deleting, error, locked and configuring. The default value is unknown.

region
string
Region the Read Replica is in.
Response Example

When you resync a Read Replica, first it is reset, then its data is resynchronized from the primary node. Your Read Replica remains unavailable during the resync process. The duration of this process is proportional to the size of your Database Instance. The configured endpoints do not change.

POST
/rdb/v1/regions/{region}/read-replicas/{read_replica_id}/reset
Path Parameters

region
required string
The region you want to target. Possible values are fr-par, nl-ams and pl-waw.

read_replica_id
required string
UUID of the Read Replica. (UUID format).
Body

Request Example
200 Response

id
string
UUID of the Read Replica. (UUID format).

endpoints
array
Display Read Replica connection information.

status
string
Read replica status. Possible values are unknown, provisioning, initializing, ready, deleting, error, locked and configuring. The default value is unknown.

region
string
Region the Read Replica is in.
Response Example

Network Access Control Lists allow you to control incoming network traffic by setting up ACL rules.

List the ACL rules for a given Database Instance. The response is an array of ACL objects, each one representing an ACL that denies, allows or redirects traffic based on certain conditions.

GET
/rdb/v1/regions/{region}/instances/{instance_id}/acls
Path Parameters

region
required string
The region you want to target. Possible values are fr-par, nl-ams and pl-waw.

instance_id
required string
UUID of the Database Instance.
Query Parameters

page
integer
Page number. The default value is 1.

page_size
integer
Page size. The default value is 20.
200 Response

rules
array
List of ACL rules present on a Database Instance.

total_count
integer
Total count of ACL rules present on a Database Instance.
Response Example

Add an additional ACL rule to a Database Instance.

POST
/rdb/v1/regions/{region}/instances/{instance_id}/acls
Path Parameters

region
required string
The region you want to target. Possible values are fr-par, nl-ams and pl-waw.

instance_id
required string
UUID of the Database Instance you want to add ACL rules to.
Body

rules
required array
ACL rules to add to the Database Instance.
Request Example
200 Response

rules
array
ACL Rules enabled for the Database Instance.
Response Example

Replace all the ACL rules of a Database Instance.

PUT
/rdb/v1/regions/{region}/instances/{instance_id}/acls
Path Parameters

region
required string
The region you want to target. Possible values are fr-par, nl-ams and pl-waw.

instance_id
required string
UUID of the Database Instance where the ACL rules must be set.
Body

rules
required array
ACL rules to define for the Database Instance.
Request Example
200 Response

rules
array
ACLs rules configured for a Database Instance.
Response Example

Delete one or more ACL rules of a Database Instance.

DELETE
/rdb/v1/regions/{region}/instances/{instance_id}/acls
Path Parameters

region
required string
The region you want to target. Possible values are fr-par, nl-ams and pl-waw.

instance_id
required string
UUID of the Database Instance you want to delete an ACL rule from.
Body

acl_rule_ips
required array
IP addresses defined in the ACL rules of the Database Instance.
Request Example
200 Response

rules
array
IP addresses defined in the ACL rules of the Database Instance.
Response Example

Advanced Database Instance settings allow you to tune the behavior of your database engines to better fit your needs.

Available settings depend on the database engine and its version. Note that some settings can only be defined upon database engine initialization. These are called init settings. You can find a full list of the settings available in the response body of the list available database engines endpoint.

Each advanced setting entry has a default value that users can override. The deletion of a setting entry will restore the setting to default value. Some of the defaults values can be different from the engine's defaults, as we optimize them to the Scaleway platform.

Add an advanced setting to a Database Instance. You must set the name and the value of each setting.

POST
/rdb/v1/regions/{region}/instances/{instance_id}/settings
Path Parameters

region
required string
The region you want to target. Possible values are fr-par, nl-ams and pl-waw.

instance_id
required string
UUID of the Database Instance you want to add settings to.
Body

settings
required array
Settings to add to the Database Instance.
Request Example
200 Response

settings
array
Settings available on the Database Instance.
Response Example

Update an advanced setting for a Database Instance. Settings added upon database engine initalization can only be defined once, and cannot, therefore, be updated.

PUT
/rdb/v1/regions/{region}/instances/{instance_id}/settings
Path Parameters

region
required string
The region you want to target. Possible values are fr-par, nl-ams and pl-waw.

instance_id
required string
UUID of the Database Instance where the settings must be set.
Body

settings
required array
Settings to define for the Database Instance.
Request Example
200 Response

settings
array
Settings configured for a Database Instance.
Response Example

Delete an advanced setting in a Database Instance. You must specify the names of the settings you want to delete in the request.

DELETE
/rdb/v1/regions/{region}/instances/{instance_id}/settings
Path Parameters

region
required string
The region you want to target. Possible values are fr-par, nl-ams and pl-waw.

instance_id
required string
UUID of the Database Instance to delete settings from.
Body

setting_names
required array
Settings names to delete.
Request Example
200 Response

settings
array
Settings names to delete from the Database Instance.
Response Example

Privileges are permissions that can be granted to database users. You can manage user permissions either via the console, the Scaleway APIs or SQL. Managed Database for PostgreSQL and MySQL provides a simplified and unified permission model through the API and the console to make things easier to manage and understand.

Each user has associated permissions that give them access to zero or more logical databases. These include:

  • None: No access to the database
  • Read: Allow users to read tables and fields in a database
  • Write: Allow users to write content in databases.
  • Admin: Read and write access to the data, and extended privileges depending on the database engine.

List privileges of a user on a database. By default, the details returned in the list are ordered by creation date in ascending order, though this can be modified via the order_by field. You can define additional parameters for your query, such as database_name and user_name.

GET
/rdb/v1/regions/{region}/instances/{instance_id}/privileges
Path Parameters

region
required string
The region you want to target. Possible values are fr-par, nl-ams and pl-waw.

instance_id
required string
UUID of the Database Instance.
Query Parameters

order_by
string
Criteria to use when ordering privileges listing. Possible values are user_name_asc, user_name_desc, database_name_asc and database_name_desc. The default value is user_name_asc.

page
integer
Page number. The default value is 1.

page_size
integer
Page size. The default value is 20.

database_name
string
Name of the database.

user_name
string
Name of the user.
200 Response

privileges
array
Privileges of a user in a database in a Database Instance.

total_count
integer
Total count of privileges present on a database.
Response Example

Set the privileges of a user on a database. You must define database_name, user_name and permission in the request body.

PUT
/rdb/v1/regions/{region}/instances/{instance_id}/privileges
Path Parameters

region
required string
The region you want to target. Possible values are fr-par, nl-ams and pl-waw.

instance_id
required string
UUID of the Database Instance.
Body

database_name
string
Name of the database.

user_name
string
Name of the user.

permission
string
Permission to set (Read, Read/Write, All, Custom). Possible values are readonly, readwrite, all, custom and none. The default value is readonly.
Request Example
200 Response

permission
string
Permission (Read, Read/Write, All, Custom). Possible values are readonly, readwrite, all, custom and none. The default value is readonly.

database_name
string
Name of the database.

user_name
string
Name of the user.
Response Example

Users are profiles to which you can attribute database-level permissions. They allow you to define permissions specific to each type of database usage. For example, users with an admin role can create new databases and users.

List all users of a given Database Instance. By default, the users returned in the list are ordered by creation date in ascending order, though this can be modified via the order_by field.

GET
/rdb/v1/regions/{region}/instances/{instance_id}/users
Path Parameters

region
required string
The region you want to target. Possible values are fr-par, nl-ams and pl-waw.

instance_id
required string
UUID of the Database Instance.
Query Parameters

name
string
Name of the user.

order_by
string
Criteria to use when requesting user listing. Possible values are name_asc, name_desc, is_admin_asc and is_admin_desc. The default value is name_asc.

page
integer
Page number. The default value is 1.

page_size
integer
Page size. The default value is 20.
200 Response

users
array
List of users in a Database Instance.

total_count
integer
Total count of users present on a Database Instance.
Response Example

Create a new user for a Database Instance. You must define the name, password and is_admin parameters.

POST
/rdb/v1/regions/{region}/instances/{instance_id}/users
Path Parameters

region
required string
The region you want to target. Possible values are fr-par, nl-ams and pl-waw.

instance_id
required string
UUID of the Database Instance in which you want to create a user.
Body

name
string
Name of the user you want to create.

password
string
Password of the user you want to create.

is_admin
boolean
Defines whether the user will have administrative privileges.
Request Example
200 Response

name
string
Name of the user (Length must be between 1 and 63 characters for PostgreSQL and between 1 and 32 characters for MySQL. First character must be an alphabet character (a-zA-Z). Your username cannot start with '_rdb' or in PostgreSQL, 'pg_'. Only a-zA-Z0-9_$- characters are accepted).

is_admin
boolean
Defines whether or not a user got administrative privileges on the Database Instance.
Response Example

Update the parameters of a user on a Database Instance. You can update the password and is_admin parameters, but you cannot change the name of the user.

PATCH
/rdb/v1/regions/{region}/instances/{instance_id}/users/{name}
Path Parameters

region
required string
The region you want to target. Possible values are fr-par, nl-ams and pl-waw.

instance_id
required string
UUID of the Database Instance the user belongs to.

name
required string
Name of the database user.
Body

password
nullable string
Password of the database user.

is_admin
nullable boolean
Defines whether or not this user got administrative privileges.
Request Example
200 Response

name
string
Name of the user (Length must be between 1 and 63 characters for PostgreSQL and between 1 and 32 characters for MySQL. First character must be an alphabet character (a-zA-Z). Your username cannot start with '_rdb' or in PostgreSQL, 'pg_'. Only a-zA-Z0-9_$- characters are accepted).

is_admin
boolean
Defines whether or not a user got administrative privileges on the Database Instance.
Response Example

Delete a given user on a Database Instance. You must specify, in the endpoint, the region, instance_id and name parameters of the user you want to delete.

DELETE
/rdb/v1/regions/{region}/instances/{instance_id}/users/{name}
Path Parameters

region
required string
The region you want to target. Possible values are fr-par, nl-ams and pl-waw.

instance_id
required string
UUID of the Database Instance to delete the user from.

name
required string
Name of the user.
204 Response

Empty response

Databases can be used to store and manage sets of structured information, or data. The interaction between the user and a database is done using a Database Engine, which provides a structured query language to add, modify or delete information from the database.

List all databases of a given Database Instance. By default, the databases returned in the list are ordered by creation date in ascending order, though this can be modified via the order_by field. You can define additional parameters for your query, such as name, managed and owner.

GET
/rdb/v1/regions/{region}/instances/{instance_id}/databases
Path Parameters

region
required string
The region you want to target. Possible values are fr-par, nl-ams and pl-waw.

instance_id
required string
UUID of the Database Instance to list the databases of.
Query Parameters

name
string
Name of the database.

managed
boolean
Defines whether or not the database is managed.

owner
string
User that owns this database.

order_by
string
Criteria to use when ordering database listing. Possible values are name_asc, name_desc, size_asc and size_desc. The default value is name_asc.

page
integer
Page number. The default value is 1.

page_size
integer
Page size. The default value is 20.
200 Response

databases
array
List of the databases.

total_count
integer
Total count of databases present on a Database Instance.
Response Example

Create a new database. You must define the name parameter in the request.

POST
/rdb/v1/regions/{region}/instances/{instance_id}/databases
Path Parameters

region
required string
The region you want to target. Possible values are fr-par, nl-ams and pl-waw.

instance_id
required string
UUID of the Database Instance where to create the database.
Body

name
string
Name of the database.
Request Example
200 Response

name
string
Name of the database.

owner
string
Name of the database owner.

managed
boolean
Defines whether the database is managed or not.

size
integer
Size of the database. (in bytes).
Response Example

Delete a given database on a Database Instance. You must specify, in the endpoint, the region, instance_id and name parameters of the database you want to delete.

DELETE
/rdb/v1/regions/{region}/instances/{instance_id}/databases/{name}
Path Parameters

region
required string
The region you want to target. Possible values are fr-par, nl-ams and pl-waw.

instance_id
required string
UUID of the Database Instance where to delete the database.

name
required string
Name of the database to delete.
204 Response

Empty response

Two node type ranges are available:

  • General Purpose: production-grade nodes designed for scalable database infrastructures.
  • Development: sandbox environments and reliable performance for development and testing purposes.

List all available node types. By default, the node types returned in the list are ordered by creation date in ascending order, though this can be modified via the order_by field.

GET
/rdb/v1/regions/{region}/node-types
Path Parameters

region
required string
The region you want to target. Possible values are fr-par, nl-ams and pl-waw.
Query Parameters

include_disabled_types
boolean
Defines whether or not to include disabled types.

page
integer
Page number. The default value is 1.

page_size
integer
Page size. The default value is 20.
200 Response

node_types
array
Types of the node.

total_count
integer
Total count of node-types available.
Response Example

A snapshot is a consistent, instantaneous copy of the Block Storage volume of your Database Instance at a certain point in time. They are designed to recover your data in case of failure or accidental alterations of the data by a user. They allow you to quickly create a new Instance from a previous state of your database, regardless of the size of the volume. Their limitation is that, unlike backups, snapshots can only be stored in the same location as the original data.

Create a new snapshot of a Database Instance. You must define the name parameter in the request.

POST
/rdb/v1/regions/{region}/instances/{instance_id}/snapshots
Path Parameters

region
required string
The region you want to target. Possible values are fr-par, nl-ams and pl-waw.

instance_id
required string
UUID of the Database Instance.
Body

name
required string
Name of the snapshot.

expires_at
nullable string
Expiration date (must follow the ISO 8601 format). (RFC 3339 format).
Request Example
200 Response

id
string
UUID of the snapshot.

instance_id
string
UUID of the Database Instance.

name
string
Name of the snapshot.

status
string
Status of the snapshot. Possible values are unknown, creating, ready, restoring, deleting, error and locked. The default value is unknown.

size
nullable integer
Size of the snapshot. (in bytes).

expires_at
nullable string
Expiration date (must follow the ISO 8601 format). (RFC 3339 format).

created_at
nullable string
Creation date (must follow the ISO 8601 format). (RFC 3339 format).

updated_at
nullable string
Updated date (must follow the ISO 8601 format). (RFC 3339 format).

instance_name
string
Name of the Database Instance of the snapshot.

node_type
string
Source node type.

region
string
Region of this snapshot.
Response Example

List snapshots. You can include the instance_id or project_id in your query to get the list of snapshots for specific Database Instances and/or Projects. By default, the details returned in the list are ordered by creation date in ascending order, though this can be modified via the order_by field.

GET
/rdb/v1/regions/{region}/snapshots
Path Parameters

region
required string
The region you want to target. Possible values are fr-par, nl-ams and pl-waw.
Query Parameters

name
string
Name of the snapshot.

order_by
string
Criteria to use when ordering snapshot listing. Possible values are created_at_asc, created_at_desc, name_asc, name_desc, expires_at_asc and expires_at_desc. The default value is created_at_asc.

instance_id
string
UUID of the Database Instance.

organization_id
string
Organization ID the snapshots belongs to.

project_id
string
Project ID the snapshots belongs to.

page
integer
Page number. The default value is 1.

page_size
integer
Page size. The default value is 20.
200 Response

snapshots
array
List of snapshots.

total_count
integer
Total count of snapshots available.
Response Example

Retrieve information about a given snapshot, specified by its snapshot_id and region. Full details about the snapshot, like size and expiration date, are returned in the response.

GET
/rdb/v1/regions/{region}/snapshots/{snapshot_id}
Path Parameters

region
required string
The region you want to target. Possible values are fr-par, nl-ams and pl-waw.

snapshot_id
required string
UUID of the snapshot.
200 Response

id
string
UUID of the snapshot.

instance_id
string
UUID of the Database Instance.

name
string
Name of the snapshot.

status
string
Status of the snapshot. Possible values are unknown, creating, ready, restoring, deleting, error and locked. The default value is unknown.

size
nullable integer
Size of the snapshot. (in bytes).

expires_at
nullable string
Expiration date (must follow the ISO 8601 format). (RFC 3339 format).

created_at
nullable string
Creation date (must follow the ISO 8601 format). (RFC 3339 format).

updated_at
nullable string
Updated date (must follow the ISO 8601 format). (RFC 3339 format).

instance_name
string
Name of the Database Instance of the snapshot.

node_type
string
Source node type.

region
string
Region of this snapshot.
Response Example

Update the parameters of a snapshot of a Database Instance. You can update the name and expires_at parameters.

PATCH
/rdb/v1/regions/{region}/snapshots/{snapshot_id}
Path Parameters

region
required string
The region you want to target. Possible values are fr-par, nl-ams and pl-waw.

snapshot_id
required string
UUID of the snapshot to update.
Body

name
nullable string
Name of the snapshot.

expires_at
nullable string
Expiration date (must follow the ISO 8601 format). (RFC 3339 format).
Request Example
200 Response

id
string
UUID of the snapshot.

instance_id
string
UUID of the Database Instance.

name
string
Name of the snapshot.

status
string
Status of the snapshot. Possible values are unknown, creating, ready, restoring, deleting, error and locked. The default value is unknown.

size
nullable integer
Size of the snapshot. (in bytes).

expires_at
nullable string
Expiration date (must follow the ISO 8601 format). (RFC 3339 format).

created_at
nullable string
Creation date (must follow the ISO 8601 format). (RFC 3339 format).

updated_at
nullable string
Updated date (must follow the ISO 8601 format). (RFC 3339 format).

instance_name
string
Name of the Database Instance of the snapshot.

node_type
string
Source node type.

region
string
Region of this snapshot.
Response Example

Delete a given snapshot of a Database Instance. You must specify, in the endpoint, the region and snapshot_id parameters of the snapshot you want to delete.

DELETE
/rdb/v1/regions/{region}/snapshots/{snapshot_id}
Path Parameters

region
required string
The region you want to target. Possible values are fr-par, nl-ams and pl-waw.

snapshot_id
required string
UUID of the snapshot to delete.
200 Response

id
string
UUID of the snapshot.

instance_id
string
UUID of the Database Instance.

name
string
Name of the snapshot.

status
string
Status of the snapshot. Possible values are unknown, creating, ready, restoring, deleting, error and locked. The default value is unknown.

size
nullable integer
Size of the snapshot. (in bytes).

expires_at
nullable string
Expiration date (must follow the ISO 8601 format). (RFC 3339 format).

created_at
nullable string
Creation date (must follow the ISO 8601 format). (RFC 3339 format).

updated_at
nullable string
Updated date (must follow the ISO 8601 format). (RFC 3339 format).

instance_name
string
Name of the Database Instance of the snapshot.

node_type
string
Source node type.

region
string
Region of this snapshot.
Response Example

Restore a snapshot. When you restore a snapshot, a new Instance is created and billed to your account. Note that is possible to select a larger node type for your new Database Instance. However, the Block volume size will be the same as the size of the restored snapshot. All Instance settings will be restored if you chose a node type with the same or more memory size than the initial Instance. Settings will be reset to the default if your node type has less memory.

POST
/rdb/v1/regions/{region}/snapshots/{snapshot_id}/create-instance
Path Parameters

region
required string
The region you want to target. Possible values are fr-par, nl-ams and pl-waw.

snapshot_id
required string
Block snapshot of the Database Instance.
Body

instance_name
string
Name of the Database Instance created with the snapshot.

is_ha_cluster
nullable boolean
Defines whether or not High-Availability is enabled on the new Database Instance.

node_type
nullable string
The node type used to restore the snapshot.
Request Example
200 Response

created_at
nullable string
Creation date (must follow the ISO 8601 format). (RFC 3339 format).

volume
object
Volumes of the Database Instance.

region
string
Region the Database Instance is in.

id
string
UUID of the Database Instance. (UUID format).

name
string
Name of the Database Instance.

organization_id
string
Organization ID the Database Instance belongs to. (UUID format).

project_id
string
Project ID the Database Instance belongs to. (UUID format).

status
string
Status of the Database Instance. Possible values are unknown, ready, provisioning, configuring, deleting, error, autohealing, locked, initializing, disk_full, backuping, snapshotting and restarting. The default value is unknown.

engine
string
Database engine of the database (PostgreSQL, MySQL, ...).

upgradable_version
array
Available database engine versions for upgrade.

endpoint
deprecated object
Endpoint of the Database Instance.

tags
array
List of tags applied to the Database Instance.

settings
array
Advanced settings of the Database Instance.

backup_schedule
object
Backup schedule of the Database Instance.

is_ha_cluster
boolean
Defines whether or not High-Availability is enabled.

read_replicas
array
Read Replicas of the Database Instance.

node_type
string
Node type of the Database Instance.

init_settings
array
List of engine settings to be set at database initialization.

endpoints
array
List of Database Instance endpoints.

logs_policy
object
Logs policy of the Database Instance.

backup_same_region
boolean
Store logical backups in the same region as the Database Instance.

maintenances
array
List of Database Instance maintenance events.
Response Example

A point of connection to a Database Instance. The endpoint is associated with an IPv4 address and a port. It contains the information about whether the endpoint is read-write or not. The endpoints always point to the main node of a Database Instance.

All endpoints have TLS enabled. You can use TLS to make your data and your passwords unreadable in transit to anyone but you.

For added security, you can set up ACL rules to restrict access to your endpoint to a set of trusted hosts or networks of your choice.

Load Balancers are used to forward traffic to the right node based on the node state (active/hot standby). The Load Balancers' configuration is set to cut off inactive connections if no TCP traffic is sent within a 6-hour timeframe. We recommend using connection pooling on the application side to renew database connections regularly.

Retrieve information about a Database Instance endpoint. Full details about the endpoint, like ip, port, private_network and load_balancer specifications are returned in the response.

GET
/rdb/v1/regions/{region}/endpoints/{endpoint_id}
Path Parameters

region
required string
The region you want to target. Possible values are fr-par, nl-ams and pl-waw.

endpoint_id
required string
UUID of the endpoint you want to get.
200 Response

id
string
UUID of the endpoint. (UUID format).

ip
nullable string
IPv4 address of the endpoint. (IP address). Only one of ip and hostname may be set.

port
integer
TCP port of the endpoint.

name
nullable string
Name of the endpoint.

private_network
object
Private Network details. One maximum per Database Instance or Read Replica (a Database Instance and its Read Replica can have different Private Networks). Cannot be updated (has to be deleted and recreated). Only one of private_network, load_balancer and direct_access may be set.

load_balancer
object
Load balancer details. Public endpoint for Database Instance which is systematically present. One per Database Instance. Only one of private_network, load_balancer and direct_access may be set.

direct_access
object
Direct access details. Public endpoint reserved for Read Replicas. One per Read Replica. Only one of private_network, load_balancer and direct_access may be set.

hostname
string
Hostname of the endpoint. Only one of ip and hostname may be set.
Response Example

Delete the endpoint of a Database Instance. You must specify the region and endpoint_id parameters of the endpoint you want to delete. Note that might need to update any environment configurations that point to the deleted endpoint.

DELETE
/rdb/v1/regions/{region}/endpoints/{endpoint_id}
Path Parameters

region
required string
The region you want to target. Possible values are fr-par, nl-ams and pl-waw.

endpoint_id
required string
UUID of the endpoint you want to delete. This endpoint can also be used to delete a Read Replica endpoint.
204 Response

Empty response
POST
/rdb/v1/regions/{region}/endpoints/{endpoint_id}/migrate
Path Parameters

region
required string
The region you want to target. Possible values are fr-par, nl-ams and pl-waw.

endpoint_id
required string
UUID of the endpoint you want to migrate.
Body

instance_id
required string
UUID of the instance you want to attach the endpoint to.
Request Example
200 Response

id
string
UUID of the endpoint. (UUID format).

ip
nullable string
IPv4 address of the endpoint. (IP address). Only one of ip and hostname may be set.

port
integer
TCP port of the endpoint.

name
nullable string
Name of the endpoint.

private_network
object
Private Network details. One maximum per Database Instance or Read Replica (a Database Instance and its Read Replica can have different Private Networks). Cannot be updated (has to be deleted and recreated). Only one of private_network, load_balancer and direct_access may be set.

load_balancer
object
Load balancer details. Public endpoint for Database Instance which is systematically present. One per Database Instance. Only one of private_network, load_balancer and direct_access may be set.

direct_access
object
Direct access details. Public endpoint reserved for Read Replicas. One per Read Replica. Only one of private_network, load_balancer and direct_access may be set.

hostname
string
Hostname of the endpoint. Only one of ip and hostname may be set.
Response Example

Create a new endpoint for a Database Instance. You can add load_balancer and private_network specifications to the body of the request. Note that this action replaces your current endpoint, which means you might need to update any environment configurations that point to the old endpoint.

POST
/rdb/v1/regions/{region}/instances/{instance_id}/endpoints
Path Parameters

region
required string
The region you want to target. Possible values are fr-par, nl-ams and pl-waw.

instance_id
required string
UUID of the Database Instance you to which you want to add an endpoint.
Body

endpoint_spec
object
Specification of the endpoint you want to create.
Request Example
200 Response

id
string
UUID of the endpoint. (UUID format).

ip
nullable string
IPv4 address of the endpoint. (IP address). Only one of ip and hostname may be set.

port
integer
TCP port of the endpoint.

name
nullable string
Name of the endpoint.

private_network
object
Private Network details. One maximum per Database Instance or Read Replica (a Database Instance and its Read Replica can have different Private Networks). Cannot be updated (has to be deleted and recreated). Only one of private_network, load_balancer and direct_access may be set.

load_balancer
object
Load balancer details. Public endpoint for Database Instance which is systematically present. One per Database Instance. Only one of private_network, load_balancer and direct_access may be set.

direct_access
object
Direct access details. Public endpoint reserved for Read Replicas. One per Read Replica. Only one of private_network, load_balancer and direct_access may be set.

hostname
string
Hostname of the endpoint. Only one of ip and hostname may be set.
Response Example