Database RDB APIv1

Download OpenAPI

Introduction

Scaleway Database is a service that make your database's management easy as pie. It provides simple and reliable solutions to create and run your database, dealing with security and high availability to ensure the durability of your data.

The following sections define concepts such as Instance, Database Engine, Configuration, ACL, Failover, Configuration, Backup and Restore in Scaleway Database.

Database Engine

A Database Engine is the software component that stores and retrieves your data from a database. For example, PostgreSQL is a database engine and it implements the SQL standard. Database Engines have versions. Different major versions represents changes that can break backward compatibility.

See "Engine Specifics" for supported engines and versions.

A Database Instance is composed of one or more computing nodes, depending on the chosen HA setting (1 leader for Standalone, 1 leader + 1 replica for High Availability). Replica nodes are linked to a leader, using synchronous replication. Synchronous replication offers the ability to confirm that all changes intended by a transaction have been transferred and applied to one or more synchronous replica servers, thus providing durability to the data.

A Database Instance has settings that let you tune its behavior to better fit your needs. Available settings depend on the Database Engine and its version. Each instance setting entry has a default value that the user can override. The deletion of a setting entry will restore the setting to the entry's default value. Some of the defaults values can be different from the engine defaults, as we optimize these defaults for the Scaleway platform.

A Database Instance Endpoint is composed of an IP and a TCP port. These are the coordinates that are used to connect to the service. For now, there is only one endpoint, always pointing to the leader node of the Instance.

Endpoints IPs are public (No access is available using private IPs for now, but this might change in the future). This might raise security concerns to some, but here are a few points that must be remembered:

  • When connecting to a Database's public IP address from a Scaleway Compute Instance from the same region, the traffic does not leave Scaleway's network.
  • All Scaleway Database Endpoints have SSL enabled. Be sure to use it to make your data and your passwords unreadable in transit to anyone but you.
  • Access to your Endpoint can be restricted to a set of trusted hosts or networks that you choose, see "ACL Rules" below.

Access Control List Rules (ACL Rules) define which host and networks can connect to your Database Instance Endpoint. You can add, edit or delete rules from your ACLs. The initial setup of an instance allows full network access from anywhere (0.0.0.0/0).

Access control is handled directly at network-level by our load-balancers, so the Database does not need to do it itself, making the filtering more efficient, universal and relieving the Database from this task.

You can order a high availability database instance. With this configuration, we install the RDBMS (Relational Database Management System) on two dedicated compute nodes. We also make sure those instances are on two physically separate racks.

On a High Availability Database Instance, replication is synchronous. With this replication mode, write operations are routed to one database node. The other node (standby node) replicates these data. Write operations are acknowledged to the user only when they are applied on the master AND on the standby node. If a node goes down, data integrity is guaranteed. You can't be in the situation where the leader node has more data than the replica. This replication mode introduces a bit of overhead on the database system, but for us, data integrity is the most important.

High availability instances are monitored continuously and got an AutoHealing feature. If a database node goes down, the standby node will take write operations in less than 10 seconds letting you be able to continue your business as usual with read and write operations. During this phase, your instance switch to AUTOHEALING status (blue dot in the console). During this period, your High Availability Instance is working on the remaining database node for at most 700 seconds. After 700 seconds, if your database node is still considered as down, a new node is spawned and automatically configured as a standby database node. Once configured, your database instance get the READY status back. With this system, your database instance is unavailable only for a few seconds letting your app work as usual.

Logical Databases can be saved to and restored from our storage facilities, located in a different physical region than your Database. Each logical database inside of a database instance is backed up and therefore restorable separately.

A User is an account protected by a password, allowing access to your Database Instance.

There are two ways to manage user permssions: from the API/Console or using SQL. All supported engines have a rich permission model and as most users only need a part of it, so Scaleway Database provides a simplified and unified permission model through the API and the console to make things easier to manage and understand. Beside this, it is perfectly fine to use engine-specific ways of managing users and permissions, see each engine documentation to find mode about the corresponding SQL commands.

The following is only about the simplified workflow.

Each User has associated Permissions that give it access to zero or more Logical Databases. A User can have the "admin" flag, the behaviour is slightly different depending on the engine, see below in "Engine Specifics".

Permission LevelDescription
noneno access to the database
readread-only access to the data
read/writeread and write access to the data
adminread and write access to the data plus some more privileges
depending on the engine (see "Engine Specifics")

Logs can contain useful information for debugging or to know more about the behaviour and activity of your database. They are available for download, but must first be gathered from the Database Nodes.

Memory, CPU and Disk usage are important metrics that you should keep an eye on. Graphs are available on the "Metrics" section in the console. You can also track these value from the API to inject them in you own system and raise custom alerts.

Scaleway's infrastructure is divided into regions and zones.

Scaleway Database is available in the following regions:

  • fr-par
  • nl-ams

You can use cURL to send request to APIs, we will provide curl example for each step.

Ubuntu

?> sudo apt-get install curl

Mac OS

?> brew install curl

Go to the following link: https://console.scaleway.com/register Provide a valid e-mail address and a password.

Login to your Scaleway account and create a token from the credentials page. A secret_key and an access_key will show on your screen, the secret_key will be used as X-Auth-Token.

reference: https://www.scaleway.com/docs/generate-an-api-token/

The organization id is required to create a database. You will need to query:

curl https://account.scaleway.com/organizations -H "X-Auth-Token: $secret_key"

To get your organization id:

{
"organizations": [
{
-> "id": "000a115d-2852-4b0a-9ce8-47f1134ba95a",
"name": "jsnow@got.wint",
"users": [
{
...
}
]
}
]
}

reference: https://www.scaleway.com/docs/retrieve-my-organization-id-throught-the-api/

This documentation shows how to create and connect to a PostgreSQL Database using Scaleway Database product.

Requirements:

You have to complete the "Setup" explained on upper sections, you are logged in scaleway and have your API Token and Organization ID. We are going to create, connect to and delete a database.

Create your database instance

{
"organization_id": "xxx",
"name": "myDB",
"engine": "PostgreSQL-11",
"tags": ["donnerstag"],
"is_ha_cluster": true,
"node_type": "db-dev-s",
"disable_backup": true,
"user_name": "my_initial_user",
"password": "thiZ_is_v&ry_s3cret"
}
ParameterDo
enginedatabase's engine version id
namedatabase's name
node_typeChoose your node type
organization_idYour Scaleway organization's id, organization id and X-Auth-Token are from your account
is_ha_clusterEnable or disable high availability for database instance
disable_backupDisable automated backup on your database instance
tagslist of tags ["tag1", "tag2", ...] attached to a database instance
user_nameIdentifier of the first user of your database
passwordPassword for the fist user

Example:

?> curl -X POST -d '{}' -H "Content-Type: application/json" \
-H "X-Auth-Token: $secret_key" https://api.scaleway.com/rdb/v1/regions/{region}/instances

Now you've created your database instance, you can open a connection between a database client and your database. You will need a PostgreSQL client such as psql

List instances

example:

?> curl -X GET -H "Content-Type: application/json" \
-H "X-Auth-Token: $secret_key" https://api.scaleway.com/rdb/v1/regions/{region}/instances

{
"instances": [
{
"id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"name": "myDB",
"organization_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "ready",
"engine": "PostgreSQL-11",
"endpoint": {
"ip": "xxx.xxx.xxx.xxx",
"port": 22245,
"name": null
},
"tags": [
"donnerstag"
],
"settings": [],
"backup_schedule": {
"frequency": 24,
"retention": 7,
"disabled": true
},
"is_ha_cluster": true,
"read_replicas": [],
"node_type": "db-dev-s",
"volume": {
"type": "lssd",
"size": 30000000000
}
"created_at": "2019-04-19T16:24:52.591417Z",
"region": "fr-par"
}
],
"total_count": 1
}

Get the endpoint, port

?> curl -X GET -H "Content-Type: application/json" \
-H "X-Auth-Token: $secret_key" https://api.scaleway.com/rdb/v1/regions/{region}/instances/{instance_id}

{
"id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"name": "myDB",
"organization_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "ready",
"engine": "PostgreSQL-11",
"endpoint": {
"ip": "xxx.xxx.xxx.xxx",
"port": 22245,
"name": null
},
"tags": [
"donnerstag"
],
"settings": [],
"backup_schedule": {
"frequency": 24,
"retention": 7,
"disabled": false
},
"volume": {
"type": "local",
"size": {
"bytes": 50000000000,
}
},
"is_ha_cluster": false,
"read_replicas": [],
"node_type": {
"name": "db-dev-s",
"stock_status": "available",
"description": "2 GB ram; 2 cpu; 50 GB LSSD storage",
"region": "fr-par"
},
"created_at": "2019-04-18T15:27:24.177854Z",
"region": "fr-par"
}

Connect to your database with psql client

?> psql -h 192.0.2.250 -p 28991 -U my_initial_user -d rdb
password:

postsql>

Congratulations! You have done your first steps on Database product !

In order to migrate your PostgreSQL instance to a Scaleway Database for PostgreSQL instance, you will need the following:

  • pg_dump command-line installed
  • psql command-line installed
  • scaleway database instance ip
  • scaleway database instance port
  • scaleway database instance user and password
  • source instance user
  • source instance port if required
  • list of the database that you want to migrate

You can export your data from your source instance to a local file by performing the following command:

?> pg_dump –-host=<host> --port=<port> --username=<name> --dbname=<database_name> --file=<database>.sql

If your source postgreSQL is in a docker container, the command will be:

?> docker exec -it $CONTAINER_NAME pg_dump --username=<name> --dbname=<database_name> > <database>.sql

In order to restore a database, you have to create the destination database and users of that database in your instance. You can create your database and roles by using the web console, or by using the API. Ensure that your user permission is correctly set to all.

Once you have created each destination database and its users, you can import your data from the <database>.sql file to your scaleway database instance by performing the following command:

?> psql --file=<database>.sql --host=<Scaleway Database Instance Ip> --port=<Scaleway Database Instance Port> --username=<user> --dbname=<destination database name>

Versions

Scaleway Database for PostgreSQL supports PostgreSQL versions 9.6, 10, 11 and 12.

Some modules are available for installation, including the popular TimescaleDB and PostGIS. See FAQ for a list of allowed extensions.

Logical databases are created either using Console/API or SQL.

  • Databases created using the Console/API will be 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".
  • Users with the admin level have the CREATEROLE and CREATEDB privileges
  • Users do NOT have the SUPERUSER privileges
  • Permissions management through the Console/API is only possible on "managed databases".

Database will be restored with the permissions they were backuped with. However, privileges will be ignored for deleted users, and if objects cannot be restored to the original owner, they will be owned by an internal system user.

Scaleway Database for MySQL supports MySQL 8.

  • User with the admin level have access to all logical databases and can create new ones.
  • Users created through the API are authenticated using the default authentication plugin, which can be changed in the settings.

Even if we manage your database storage space, you're responsible for its usage.

In the case you're reaching the space provisioned for your instance, the instance will shift to the disk_full status, informing you that there is only 1GB left on your database instance. This lets you either scale up the disk on the console or leaves you enough room to do some cleanup.

In disk_full mode, the default transaction mode will shift to read only, allowing your application to still access its data, while preventing new data from being inserted.

In order to remove data from your instance, you must connect to it as usual, but explicitly shift to a read write transaction, like this:

-- On PostgreSQL
BEGIN;
SET TRANSACTION READ WRITE;
-- do some cleanup
COMMIT;
-- On MySQL
SET transaction_read_only=0;
BEGIN;
-- do some cleanup
COMMIT;

When enough space is available on the instance, the default transaction mode will change back to read write shortly after, allowing normal operation again.

Failing to cleanup or forcing insertions while the database is in disk_full mode will lead to downtime.

Save and restore backups of your database instance on a specific storage backend.

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

region
required string
The region you want to target. Possible value is fr-par.
Query Parameters

name
nullable string

order_by
string
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
nullable string

organization_id
nullable string

page
number
Page number. The default value is 1.

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

database_backups
array
id
string

instance_id
string

database_name
string

name
string

status
string
Possible values are unknown, creating, ready, restoring, deleting, error and exporting. The default value is unknown.

size
nullable string
(in bytes).

expires_at
string

created_at
string

updated_at
string

instance_name
string

download_url
nullable string

download_url_expires_at
string

region
string

total_count
number
Response Example
{
"database_backups": [
{
"id": "string",
"instance_id": "string",
"database_name": "string",
"name": "string",
"status": "unknown",
"size": "string",
"expires_at": "string",
"created_at": "string",
"updated_at": "string",
"instance_name": "string",
"download_url": "string",
"download_url_expires_at": "string",
"region": "string"
}
],
"total_count": 42
}
POST
/rdb/v1/regions/{region}/backups
Path Parameters

region
required string
The region you want to target. Possible value is fr-par.
Body

instance_id
string

database_name
string

name
string

expires_at
string
Request Example
{
"instance_id": "string",
"database_name": "string",
"name": "string",
"expires_at": "string"
}
200 Response

id
string

instance_id
string

database_name
string

name
string

status
string
Possible values are unknown, creating, ready, restoring, deleting, error and exporting. The default value is unknown.

size
nullable string
(in bytes).

expires_at
string

created_at
string

updated_at
string

instance_name
string

download_url
nullable string

download_url_expires_at
string

region
string
Response Example
{
"id": "string",
"instance_id": "string",
"database_name": "string",
"name": "string",
"status": "unknown",
"size": "string",
"expires_at": "string",
"created_at": "string",
"updated_at": "string",
"instance_name": "string",
"download_url": "string",
"download_url_expires_at": "string",
"region": "string"
}
GET
/rdb/v1/regions/{region}/backups/{database_backup_id}
Path Parameters

region
required string
The region you want to target. Possible value is fr-par.

database_backup_id
required string
200 Response

id
string

instance_id
string

database_name
string

name
string

status
string
Possible values are unknown, creating, ready, restoring, deleting, error and exporting. The default value is unknown.

size
nullable string
(in bytes).

expires_at
string

created_at
string

updated_at
string

instance_name
string

download_url
nullable string

download_url_expires_at
string

region
string
Response Example
{
"id": "string",
"instance_id": "string",
"database_name": "string",
"name": "string",
"status": "unknown",
"size": "string",
"expires_at": "string",
"created_at": "string",
"updated_at": "string",
"instance_name": "string",
"download_url": "string",
"download_url_expires_at": "string",
"region": "string"
}
PATCH
/rdb/v1/regions/{region}/backups/{database_backup_id}
Path Parameters

region
required string
The region you want to target. Possible value is fr-par.

database_backup_id
required string
Body

name
nullable string

expires_at
string
Request Example
{
"name": "string",
"expires_at": "string"
}
200 Response

id
string

instance_id
string

database_name
string

name
string

status
string
Possible values are unknown, creating, ready, restoring, deleting, error and exporting. The default value is unknown.

size
nullable string
(in bytes).

expires_at
string

created_at
string

updated_at
string

instance_name
string

download_url
nullable string

download_url_expires_at
string

region
string
Response Example
{
"id": "string",
"instance_id": "string",
"database_name": "string",
"name": "string",
"status": "unknown",
"size": "string",
"expires_at": "string",
"created_at": "string",
"updated_at": "string",
"instance_name": "string",
"download_url": "string",
"download_url_expires_at": "string",
"region": "string"
}
DELETE
/rdb/v1/regions/{region}/backups/{database_backup_id}
Path Parameters

region
required string
The region you want to target. Possible value is fr-par.

database_backup_id
required string
200 Response

id
string

instance_id
string

database_name
string

name
string

status
string
Possible values are unknown, creating, ready, restoring, deleting, error and exporting. The default value is unknown.

size
nullable string
(in bytes).

expires_at
string

created_at
string

updated_at
string

instance_name
string

download_url
nullable string

download_url_expires_at
string

region
string
Response Example
{
"id": "string",
"instance_id": "string",
"database_name": "string",
"name": "string",
"status": "unknown",
"size": "string",
"expires_at": "string",
"created_at": "string",
"updated_at": "string",
"instance_name": "string",
"download_url": "string",
"download_url_expires_at": "string",
"region": "string"
}
POST
/rdb/v1/regions/{region}/backups/{database_backup_id}/export
Path Parameters

region
required string
The region you want to target. Possible value is fr-par.

database_backup_id
required string
Body

Request Example
{}
200 Response

id
string

instance_id
string

database_name
string

name
string

status
string
Possible values are unknown, creating, ready, restoring, deleting, error and exporting. The default value is unknown.

size
nullable string
(in bytes).

expires_at
string

created_at
string

updated_at
string

instance_name
string

download_url
nullable string

download_url_expires_at
string

region
string
Response Example
{
"id": "string",
"instance_id": "string",
"database_name": "string",
"name": "string",
"status": "unknown",
"size": "string",
"expires_at": "string",
"created_at": "string",
"updated_at": "string",
"instance_name": "string",
"download_url": "string",
"download_url_expires_at": "string",
"region": "string"
}
POST
/rdb/v1/regions/{region}/backups/{database_backup_id}/restore
Path Parameters

region
required string
The region you want to target. Possible value is fr-par.

database_backup_id
required string
Backup of a logical database.
Body

database_name
nullable string
Defines the destination database in order to restore into a specified database, the default destination is set to the origin database of the backup.

instance_id
required string
Defines the rdb instance where the backup has to be restored.
Request Example
{
"database_name": "string",
"instance_id": "string"
}
200 Response

id
string

instance_id
string

database_name
string

name
string

status
string
Possible values are unknown, creating, ready, restoring, deleting, error and exporting. The default value is unknown.

size
nullable string
(in bytes).

expires_at
string

created_at
string

updated_at
string

instance_name
string

download_url
nullable string

download_url_expires_at
string

region
string
Response Example
{
"id": "string",
"instance_id": "string",
"database_name": "string",
"name": "string",
"status": "unknown",
"size": "string",
"expires_at": "string",
"created_at": "string",
"updated_at": "string",
"instance_name": "string",
"download_url": "string",
"download_url_expires_at": "string",
"region": "string"
}

Software that stores and retrieves data from a database. Each database engine has a name and versions.

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

region
required string
The region you want to target. Possible value is fr-par.
Query Parameters

page
number
Page number. The default value is 1.

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

engines
array
name
string

logo_url
string

versions
array
version
string

name
string

end_of_life
string

available_settings
array
name
string

default_value
string

hot_configurable
boolean

description
string

property_type
string
Possible values are BOOLEAN, INT and STRING. The default value is BOOLEAN.

unit
nullable string

string_constraint
nullable string

int_min
nullable number

int_max
nullable number

disabled
boolean

beta
boolean

region
string

total_count
number
Response Example
{
"engines": [
{
"name": "string",
"logo_url": "string",
"versions": [
{
"version": "string",
"name": "string",
"end_of_life": "string",
"available_settings": [
{
"name": "string",
"default_value": "string",
"hot_configurable": "boolean",
"description": "string",
"property_type": "BOOLEAN",
"unit": "string",
"string_constraint": "string",
"int_min": 42,
"int_max": 42
}
],
"disabled": "boolean",
"beta": "boolean"
}
],
"region": "string"
}
],
"total_count": 42
}

A Database Instance is composed of one or more Nodes, depending of the is_ha_cluster setting. Autohealing is enabled by default for HA clusters. Database automated backup is enabled by default in order to prevent data loss.

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

region
required string
The region you want to target. Possible value is fr-par.
Query Parameters

tags
array

name
nullable string

order_by
string
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
nullable string

page
number
Page number. The default value is 1.

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

instances
array
id
string

name
string

organization_id
string

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

engine
string

endpoint
object
ip
nullable string
(IP address).

port
number

name
nullable string

tags
array

settings
array
name
string

value
string

backup_schedule
object
frequency
number

retention
number

disabled
boolean

is_ha_cluster
boolean

read_replicas
array
ip
nullable string
(IP address).

port
number

name
nullable string

node_type
string

volume
object
type
string
Possible values are lssd and bssd. The default value is lssd.

size
number
(in bytes).

created_at
string

region
string

total_count
number
Response Example
{
"instances": [
{
"id": "string",
"name": "string",
"organization_id": "string",
"status": "unknown",
"engine": "string",
"endpoint": {
"ip": "1.2.3.4",
"port": 42,
"name": "string"
},
"tags": [
"string"
],
"settings": [
{
"name": "string",
"value": "string"
}
],
"backup_schedule": {
"frequency": 42,
"retention": 42,
"disabled": "boolean"
},
"is_ha_cluster": "boolean",
"read_replicas": [
{
"ip": "1.2.3.4",
"port": 42,
"name": "string"
}
],
"node_type": "string",
"volume": {
"type": "lssd",
"size": 42
},
"created_at": "string",
"region": "string"
}
],
"total_count": 42
}
POST
/rdb/v1/regions/{region}/instances
Path Parameters

region
required string
The region you want to target. Possible value is fr-par.
Body

organization_id
required string

name
required string

engine
required string

user_name
required string

password
required string

node_type
required string

is_ha_cluster
boolean

disable_backup
boolean

tags
array
Request Example
{
"organization_id": "string",
"name": "string",
"engine": "string",
"user_name": "string",
"password": "string",
"node_type": "string",
"is_ha_cluster": "boolean",
"disable_backup": "boolean",
"tags": [
"string"
]
}
200 Response

id
string

name
string

organization_id
string

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

engine
string

endpoint
object
ip
nullable string
(IP address).

port
number

name
nullable string

tags
array

settings
array
name
string

value
string

backup_schedule
object
frequency
number

retention
number

disabled
boolean

is_ha_cluster
boolean

read_replicas
array
ip
nullable string
(IP address).

port
number

name
nullable string

node_type
string

volume
object
type
string
Possible values are lssd and bssd. The default value is lssd.

size
number
(in bytes).

created_at
string

region
string
Response Example
{
"id": "string",
"name": "string",
"organization_id": "string",
"status": "unknown",
"engine": "string",
"endpoint": {
"ip": "1.2.3.4",
"port": 42,
"name": "string"
},
"tags": [
"string"
],
"settings": [
{
"name": "string",
"value": "string"
}
],
"backup_schedule": {
"frequency": 42,
"retention": 42,
"disabled": "boolean"
},
"is_ha_cluster": "boolean",
"read_replicas": [
{
"ip": "1.2.3.4",
"port": 42,
"name": "string"
}
],
"node_type": "string",
"volume": {
"type": "lssd",
"size": 42
},
"created_at": "string",
"region": "string"
}
GET
/rdb/v1/regions/{region}/instances/{instance_id}
Path Parameters

region
required string
The region you want to target. Possible value is fr-par.

instance_id
required string
200 Response

id
string

name
string

organization_id
string

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

engine
string

endpoint
object
ip
nullable string
(IP address).

port
number

name
nullable string

tags
array

settings
array
name
string

value
string

backup_schedule
object
frequency
number

retention
number

disabled
boolean

is_ha_cluster
boolean

read_replicas
array
ip
nullable string
(IP address).

port
number

name
nullable string

node_type
string

volume
object
type
string
Possible values are lssd and bssd. The default value is lssd.

size
number
(in bytes).

created_at
string

region
string
Response Example
{
"id": "string",
"name": "string",
"organization_id": "string",
"status": "unknown",
"engine": "string",
"endpoint": {
"ip": "1.2.3.4",
"port": 42,
"name": "string"
},
"tags": [
"string"
],
"settings": [
{
"name": "string",
"value": "string"
}
],
"backup_schedule": {
"frequency": 42,
"retention": 42,
"disabled": "boolean"
},
"is_ha_cluster": "boolean",
"read_replicas": [
{
"ip": "1.2.3.4",
"port": 42,
"name": "string"
}
],
"node_type": "string",
"volume": {
"type": "lssd",
"size": 42
},
"created_at": "string",
"region": "string"
}
PATCH
/rdb/v1/regions/{region}/instances/{instance_id}
Path Parameters

region
required string
The region you want to target. Possible value is fr-par.

instance_id
required string
Body

backup_schedule_frequency
nullable number
In hours.

backup_schedule_retention
nullable number
In days.

is_backup_schedule_disabled
nullable boolean

name
nullable string

tags
nullable array
Request Example
{
"backup_schedule_frequency": 42,
"backup_schedule_retention": 42,
"is_backup_schedule_disabled": "boolean",
"name": "string",
"tags": [
"string"
]
}
200 Response

id
string

name
string

organization_id
string

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

engine
string

endpoint
object
ip
nullable string
(IP address).

port
number

name
nullable string

tags
array

settings
array
name
string

value
string

backup_schedule
object
frequency
number

retention
number

disabled
boolean

is_ha_cluster
boolean

read_replicas
array
ip
nullable string
(IP address).

port
number

name
nullable string

node_type
string

volume
object
type
string
Possible values are lssd and bssd. The default value is lssd.

size
number
(in bytes).

created_at
string

region
string
Response Example
{
"id": "string",
"name": "string",
"organization_id": "string",
"status": "unknown",
"engine": "string",
"endpoint": {
"ip": "1.2.3.4",
"port": 42,
"name": "string"
},
"tags": [
"string"
],
"settings": [
{
"name": "string",
"value": "string"
}
],
"backup_schedule": {
"frequency": 42,
"retention": 42,
"disabled": "boolean"
},
"is_ha_cluster": "boolean",
"read_replicas": [
{
"ip": "1.2.3.4",
"port": 42,
"name": "string"
}
],
"node_type": "string",
"volume": {
"type": "lssd",
"size": 42
},
"created_at": "string",
"region": "string"
}
DELETE
/rdb/v1/regions/{region}/instances/{instance_id}
Path Parameters

region
required string
The region you want to target. Possible value is fr-par.

instance_id
required string
200 Response

id
string

name
string

organization_id
string

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

engine
string

endpoint
object
ip
nullable string
(IP address).

port
number

name
nullable string

tags
array

settings
array
name
string

value
string

backup_schedule
object
frequency
number

retention
number

disabled
boolean

is_ha_cluster
boolean

read_replicas
array
ip
nullable string
(IP address).

port
number

name
nullable string

node_type
string

volume
object
type
string
Possible values are lssd and bssd. The default value is lssd.

size
number
(in bytes).

created_at
string

region
string
Response Example
{
"id": "string",
"name": "string",
"organization_id": "string",
"status": "unknown",
"engine": "string",
"endpoint": {
"ip": "1.2.3.4",
"port": 42,
"name": "string"
},
"tags": [
"string"
],
"settings": [
{
"name": "string",
"value": "string"
}
],
"backup_schedule": {
"frequency": 42,
"retention": 42,
"disabled": "boolean"
},
"is_ha_cluster": "boolean",
"read_replicas": [
{
"ip": "1.2.3.4",
"port": 42,
"name": "string"
}
],
"node_type": "string",
"volume": {
"type": "lssd",
"size": 42
},
"created_at": "string",
"region": "string"
}
GET
/rdb/v1/regions/{region}/instances/{instance_id}/certificate
Path Parameters

region
required string
The region you want to target. Possible value is fr-par.

instance_id
required string
200 Response

name
string

content_type
string

content
string
Response Example
{
"name": "string",
"content_type": "string",
"content": "string"
}
POST
/rdb/v1/regions/{region}/instances/{instance_id}/clone
Path Parameters

region
required string
The region you want to target. Possible value is fr-par.

instance_id
required string
Body

name
string

node_type
nullable string
Request Example
{
"name": "string",
"node_type": "string"
}
200 Response

id
string

name
string

organization_id
string

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

engine
string

endpoint
object
ip
nullable string
(IP address).

port
number

name
nullable string

tags
array

settings
array
name
string

value
string

backup_schedule
object
frequency
number

retention
number

disabled
boolean

is_ha_cluster
boolean

read_replicas
array
ip
nullable string
(IP address).

port
number

name
nullable string

node_type
string

volume
object
type
string
Possible values are lssd and bssd. The default value is lssd.

size
number
(in bytes).

created_at
string

region
string
Response Example
{
"id": "string",
"name": "string",
"organization_id": "string",
"status": "unknown",
"engine": "string",
"endpoint": {
"ip": "1.2.3.4",
"port": 42,
"name": "string"
},
"tags": [
"string"
],
"settings": [
{
"name": "string",
"value": "string"
}
],
"backup_schedule": {
"frequency": 42,
"retention": 42,
"disabled": "boolean"
},
"is_ha_cluster": "boolean",
"read_replicas": [
{
"ip": "1.2.3.4",
"port": 42,
"name": "string"
}
],
"node_type": "string",
"volume": {
"type": "lssd",
"size": 42
},
"created_at": "string",
"region": "string"
}
GET
/rdb/v1/regions/{region}/instances/{instance_id}/logs
Path Parameters

region
required string
The region you want to target. Possible value is fr-par.

instance_id
required string
Query Parameters

order_by
string
Possible values are created_at_asc and created_at_desc. The default value is created_at_asc.
200 Response

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

id
string

status
string
Possible values are unknown, ready, creating and error. The default value is unknown.

node_name
string

expires_at
string

created_at
string

region
string
Response Example
{
"instance_logs": [
{
"download_url": "string",
"id": "string",
"status": "unknown",
"node_name": "string",
"expires_at": "string",
"created_at": "string",
"region": "string"
}
]
}

Get database instance metrics.

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

region
required string
The region you want to target. Possible value is fr-par.

instance_id
required string
Query Parameters

start_date
string

end_date
string

metric_name
nullable string
200 Response

timeseries
array
name
string

points
array

metadata
map
<metadataKey>
string
Response Example
{
"timeseries": [
{
"name": "string",
"points": [
[
null
]
],
"metadata": {
"<metadataKey>": "string"
}
}
]
}

Prepare your instance logs. Logs will be grouped on a minimum interval of a day.

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

region
required string
The region you want to target. Possible value is fr-par.

instance_id
required string
Body

start_date
string
Start datetime of your log. Format: `{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z`.

end_date
string
End datetime of your log. Format: `{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z`.
Request Example
{
"start_date": "string",
"end_date": "string"
}
200 Response

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

id
string

status
string
Possible values are unknown, ready, creating and error. The default value is unknown.

node_name
string

expires_at
string

created_at
string

region
string
Response Example
{
"instance_logs": [
{
"download_url": "string",
"id": "string",
"status": "unknown",
"node_name": "string",
"expires_at": "string",
"created_at": "string",
"region": "string"
}
]
}

Upgrade your current node_type or enable high availability on your standalone database instance.

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

region
required string
The region you want to target. Possible value is fr-par.

instance_id
required string
Body

node_type
string

enable_ha
boolean
Request Example
{
"node_type": "string",
"enable_ha": "boolean"
}
200 Response

id
string

name
string

organization_id
string

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

engine
string

endpoint
object
ip
nullable string
(IP address).

port
number

name
nullable string

tags
array

settings
array
name
string

value
string

backup_schedule
object
frequency
number

retention
number

disabled
boolean

is_ha_cluster
boolean

read_replicas
array
ip
nullable string
(IP address).

port
number

name
nullable string

node_type
string

volume
object
type
string
Possible values are lssd and bssd. The default value is lssd.

size
number
(in bytes).

created_at
string

region
string
Response Example
{
"id": "string",
"name": "string",
"organization_id": "string",
"status": "unknown",
"engine": "string",
"endpoint": {
"ip": "1.2.3.4",
"port": 42,
"name": "string"
},
"tags": [
"string"
],
"settings": [
{
"name": "string",
"value": "string"
}
],
"backup_schedule": {
"frequency": 42,
"retention": 42,
"disabled": "boolean"
},
"is_ha_cluster": "boolean",
"read_replicas": [
{
"ip": "1.2.3.4",
"port": 42,
"name": "string"
}
],
"node_type": "string",
"volume": {
"type": "lssd",
"size": 42
},
"created_at": "string",
"region": "string"
}

Network Access Control List allows to control network in and out traffic by setting up ACL rules. ACL rules could be created, edited, deleted

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

region
required string
The region you want to target. Possible value is fr-par.

instance_id
required string
Query Parameters

page
number
Page number. The default value is 1.

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

rules
array
ip
string
(IP address).

port
number

protocol
string
Possible values are tcp, udp and icmp. The default value is tcp.

direction
string
Possible values are inbound and outbound. The default value is inbound.

action
string
Possible values are allow and deny. The default value is allow.

description
string

total_count
number
Response Example
{
"rules": [
{
"ip": "1.2.3.4",
"port": 42,
"protocol": "tcp",
"direction": "inbound",
"action": "allow",
"description": "string"
}
],
"total_count": 42
}
POST
/rdb/v1/regions/{region}/instances/{instance_id}/acls
Path Parameters

region
required string
The region you want to target. Possible value is fr-par.

instance_id
required string
Body

rules
array
ip
string
(IP address).

description
string
Request Example
{
"rules": [
{
"ip": "1.2.3.4",
"description": "string"
}
]
}
200 Response

rules
array
ip
string
(IP address).

port
number

protocol
string
Possible values are tcp, udp and icmp. The default value is tcp.

direction
string
Possible values are inbound and outbound. The default value is inbound.

action
string
Possible values are allow and deny. The default value is allow.

description
string
Response Example
{
"rules": [
{
"ip": "1.2.3.4",
"port": 42,
"protocol": "tcp",
"direction": "inbound",
"action": "allow",
"description": "string"
}
]
}
PUT
/rdb/v1/regions/{region}/instances/{instance_id}/acls
Path Parameters

region
required string
The region you want to target. Possible value is fr-par.

instance_id
required string
Body

rules
array
ip
string
(IP address).

description
string
Request Example
{
"rules": [
{
"ip": "1.2.3.4",
"description": "string"
}
]
}
200 Response

rules
array
ip
string
(IP address).

port
number

protocol
string
Possible values are tcp, udp and icmp. The default value is tcp.

direction
string
Possible values are inbound and outbound. The default value is inbound.

action
string
Possible values are allow and deny. The default value is allow.

description
string
Response Example
{
"rules": [
{
"ip": "1.2.3.4",
"port": 42,
"protocol": "tcp",
"direction": "inbound",
"action": "allow",
"description": "string"
}
]
}
DELETE
/rdb/v1/regions/{region}/instances/{instance_id}/acls
Path Parameters

region
required string
The region you want to target. Possible value is fr-par.

instance_id
required string
Body

acl_rule_ips
array
Request Example
{
"acl_rule_ips": [
"string"
]
}
200 Response

rules
array
ip
string
(IP address).

port
number

protocol
string
Possible values are tcp, udp and icmp. The default value is tcp.

direction
string
Possible values are inbound and outbound. The default value is inbound.

action
string
Possible values are allow and deny. The default value is allow.

description
string
Response Example
{
"rules": [
{
"ip": "1.2.3.4",
"port": 42,
"protocol": "tcp",
"direction": "inbound",
"action": "allow",
"description": "string"
}
]
}

Instance Settings are tunables of Database Engines. Available settings depend on the database engine and its version.

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

region
required string
The region you want to target. Possible value is fr-par.

instance_id
required string
Body

settings
array
name
string

value
string
Request Example
{
"settings": [
{
"name": "string",
"value": "string"
}
]
}
200 Response

settings
array
name
string

value
string
Response Example
{
"settings": [
{
"name": "string",
"value": "string"
}
]
}
PUT
/rdb/v1/regions/{region}/instances/{instance_id}/settings
Path Parameters

region
required string
The region you want to target. Possible value is fr-par.

instance_id
required string
Body

settings
array
name
string

value
string
Request Example
{
"settings": [
{
"name": "string",
"value": "string"
}
]
}
200 Response

settings
array
name
string

value
string
Response Example
{
"settings": [
{
"name": "string",
"value": "string"
}
]
}
DELETE
/rdb/v1/regions/{region}/instances/{instance_id}/settings
Path Parameters

region
required string
The region you want to target. Possible value is fr-par.

instance_id
required string
Body

setting_names
array
Request Example
{
"setting_names": [
"string"
]
}
200 Response

settings
array
name
string

value
string
Response Example
{
"settings": [
{
"name": "string",
"value": "string"
}
]
}

Define some privileges to a user on a specific database.

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

region
required string
The region you want to target. Possible value is fr-par.

instance_id
required string
Query Parameters

user_name
nullable string

database_name
nullable string

order_by
string
Possible values are user_name_asc, user_name_desc, database_name_asc and database_name_desc. The default value is user_name_asc.

page
number
Page number. The default value is 1.

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

privileges
array
permission
string
Possible values are readonly, readwrite, all, custom and none. The default value is readonly.

database_name
string

user_name
string

total_count
number
Response Example
{
"privileges": [
{
"permission": "readonly",
"database_name": "string",
"user_name": "string"
}
],
"total_count": 42
}
PUT
/rdb/v1/regions/{region}/instances/{instance_id}/privileges
Path Parameters

region
required string
The region you want to target. Possible value is fr-par.

instance_id
required string
Body

database_name
string

user_name
string

permission
string
Possible values are readonly, readwrite, all, custom and none. The default value is readonly.
Request Example
{
"database_name": "string",
"user_name": "string",
"permission": "readonly"
}
200 Response

permission
string
Possible values are readonly, readwrite, all, custom and none. The default value is readonly.

database_name
string

user_name
string
Response Example
{
"permission": "readonly",
"database_name": "string",
"user_name": "string"
}

Manage users on your instance

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

region
required string
The region you want to target. Possible value is fr-par.

instance_id
required string
Query Parameters

name
nullable string

order_by
string
Possible values are name_asc, name_desc, is_admin_asc and is_admin_desc. The default value is name_asc.

page
number
Page number. The default value is 1.

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

users
array
name
string

is_admin
boolean

total_count
number
Response Example
{
"users": [
{
"name": "string",
"is_admin": "boolean"
}
],
"total_count": 42
}
POST
/rdb/v1/regions/{region}/instances/{instance_id}/users
Path Parameters

region
required string
The region you want to target. Possible value is fr-par.

instance_id
required string
Body

name
string

password
string

is_admin
boolean
Request Example
{
"name": "string",
"password": "string",
"is_admin": "boolean"
}
200 Response

name
string

is_admin
boolean
Response Example
{
"name": "string",
"is_admin": "boolean"
}
PATCH
/rdb/v1/regions/{region}/instances/{instance_id}/users/{name}
Path Parameters

region
required string
The region you want to target. Possible value is fr-par.

instance_id
required string

name
required string
Body

password
nullable string

is_admin
nullable boolean
Request Example
{
"password": "string",
"is_admin": "boolean"
}
200 Response

name
string

is_admin
boolean
Response Example
{
"name": "string",
"is_admin": "boolean"
}
DELETE
/rdb/v1/regions/{region}/instances/{instance_id}/users/{name}
Path Parameters

region
required string
The region you want to target. Possible value is fr-par.

instance_id
required string

name
required string
204 Response

Empty response

Manage logical databases on your instance

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

region
required string
The region you want to target. Possible value is fr-par.

instance_id
required string
Query Parameters

name
nullable string

managed
nullable boolean

owner
nullable string

order_by
string
Possible values are name_asc, name_desc, size_asc and size_desc. The default value is name_asc.

page
number
Page number. The default value is 1.

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

databases
array
name
string

owner
string

managed
boolean

size
number
(in bytes).

total_count
number
Response Example
{
"databases": [
{
"name": "string",
"owner": "string",
"managed": "boolean",
"size": 42
}
],
"total_count": 42
}
POST
/rdb/v1/regions/{region}/instances/{instance_id}/databases
Path Parameters

region
required string
The region you want to target. Possible value is fr-par.

instance_id
required string
Body

name
string
Request Example
{
"name": "string"
}
200 Response

name
string

owner
string

managed
boolean

size
number
(in bytes).
Response Example
{
"name": "string",
"owner": "string",
"managed": "boolean",
"size": 42
}
DELETE
/rdb/v1/regions/{region}/instances/{instance_id}/databases/{name}
Path Parameters

region
required string
The region you want to target. Possible value is fr-par.

instance_id
required string

name
required string
204 Response

Empty response

Node types powering your instance

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

region
required string
The region you want to target. Possible value is fr-par.
Query Parameters

include_disabled_types
boolean

page
number
Page number. The default value is 1.

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

node_types
array
name
string

stock_status
string
Possible values are unknown, low_stock, out_of_stock and available. The default value is unknown.

description
string

vcpus
number

memory
number
(in bytes).

volume_constraint
object
min_size
number
(in bytes).

max_size
number
(in bytes).