Database RDB APIv1beta2

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. These concepts will evolve all along the private beta, this documentation will be updated after each release.

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. There are several database engines based on the SQL standard, only PostgreSQL for now. Database Engines have versions. Differences in major versions represents changes that can break the backward compatibility. PostgreSQL major versions 9.6, 10 and 11 are available during this phase.

A Database instance is composed of one or more computing nodes, depending on the chosen HA setting. A database replica is synchronized with a leader. Synchronous replication offers the ability to confirm that all changes intended by a transaction have been transferred and applied to one or more synchronous standby servers.

A Database instance has settings that let you tune it 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 entry's default value.

Access control list rules define which hosts can reach your database instance at network level. You can add, edit or delete rules from your ACLs. The initial setup of an instance allows full network access from anywhere.

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

In a high availability database instance, we choose to use synchronous replication. 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 Master AND on the standby node. With this system, if a node goes down, data integrity is guaranteed. You can't be in a situation of data corruption where the master node has more data than the slave. This replication mode introduces a bit of overhead on the database system but for us, your 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. With this system, your database instance is unavailable only for a few seconds letting your app working as usual.

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

The region is a geographic zone of the following list:

  • 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/

The access to Database product is limited during the private beta. Only authorized users will access to the service.

This documentation shows how to create and connect to a PostgreSQL Database using Scaleway Database product. During the private beta, PostgreSQL is available, the feature set can change and your database's might not be kept at the end of this phase. You will be notified by e-mail before any potential loss of data related with a new release.

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-10",
"tags": ["donnerstag"],
"is_ha_cluster": true,
"node_type": "db-beta",
"disable_backup": true,
"user_name": "my_initial_user",
"password": "thiz_is_very_s3cret"
}
ParameterDo
enginedatabase's engine version id
namedatabase's name
node_typeChoose your node type (only "db-beta" for now)
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/v1beta2/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/v1beta2/regions/{region}/instances

{
"instances": [
{
"id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"name": "myDB",
"organization_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "ready",
"engine": "PostgreSQL-10",
"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": {
"name": "db-beta",
"stock_status": "available",
"description": "2 GB ram; 2 cpu; 50 GB LSSD storage",
"region": "fr-par"
},
"volume": {
"type": "local",
"size": {
"bytes": 50000000000,
}
}
"created_at": "2019-04-19T16:24:52.591417Z",
"region": "fr-par"
}
],
"total_count": 1
}

Get the endpoint, port and password

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

{
"id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"name": "myDB",
"organization_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "ready",
"engine": "PostgreSQL-10",
"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-beta",
"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
password:

postsql>

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

In order to migrate your postgreSQL instance to a postgreSQL scaleway database instance, you will need the following informations:

  • 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>

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

GET
/rdb/v1beta2/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 and name_desc. The default value is created_at_asc.

instance_id
nullable string

page
number
Page number. The default value is 1.

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

backups
array
id
string

instance_id
string

database_name
string

name
string

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

size
nullable string

expires_at
string

created_at
string

updated_at
string

instance_name
string

region
string

total_count
number
Response Example
{
"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",
"region": "string"
}
],
"total_count": 42
}
POST
/rdb/v1beta2/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 and error. The default value is unknown.

size
nullable string

expires_at
string

created_at
string

updated_at
string

instance_name
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",
"region": "string"
}
GET
/rdb/v1beta2/regions/{region}/backups/{backup_id}
Path Parameters

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

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 and error. The default value is unknown.

size
nullable string

expires_at
string

created_at
string

updated_at
string

instance_name
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",
"region": "string"
}
PATCH
/rdb/v1beta2/regions/{region}/backups/{backup_id}
Path Parameters

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

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 and error. The default value is unknown.

size
nullable string

expires_at
string

created_at
string

updated_at
string

instance_name
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",
"region": "string"
}
DELETE
/rdb/v1beta2/regions/{region}/backups/{backup_id}
Path Parameters

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

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 and error. The default value is unknown.

size
nullable string

expires_at
string

created_at
string

updated_at
string

instance_name
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",
"region": "string"
}
POST
/rdb/v1beta2/regions/{region}/backups/{backup_id}/restore
Path Parameters

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

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 and error. The default value is unknown.

size
nullable string

expires_at
string

created_at
string

updated_at
string

instance_name
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",
"region": "string"
}
PATCH
/rdb/v1beta2/regions/{region}/instances/{instance_id}/backup-schedule
Path Parameters

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

instance_id
required string
Body

frequency
nullable number
In hours.

retention
nullable number
In days.

disabled
nullable boolean
Request Example
{
"frequency": 42,
"retention": 42,
"disabled": "boolean"
}
200 Response

frequency
number
In hours.

retention
number
In days.

disabled
boolean
Response Example
{
"frequency": 42,
"retention": 42,
"disabled": "boolean"
}

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

GET
/rdb/v1beta2/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
string

int_min
nullable number

int_max
nullable number

disabled
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"
}
],
"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/v1beta2/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 and region. 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, destroying, error, autohealing, locked, initializing, disk_full and backuping. The default value is unknown.

engine
string

endpoint
object
ip
string

port
number

name
nullable string

tags
array

settings
array
name
string

value
string

backup_schedule
object
frequency
number
In hours.

retention
number
In days.

disabled
boolean

is_ha_cluster
boolean

read_replicas
array
ip
string

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": "string",
"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": "string",
"port": 42,
"name": "string"
}
],
"node_type": "string",
"volume": {
"type": "lssd",
"size": 42
},
"created_at": "string",
"region": "string"
}
],
"total_count": 42
}
POST
/rdb/v1beta2/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, destroying, error, autohealing, locked, initializing, disk_full and backuping. The default value is unknown.

engine
string

endpoint
object
ip
string

port
number

name
nullable string

tags
array

settings
array
name
string

value
string

backup_schedule
object
frequency
number
In hours.

retention
number
In days.

disabled
boolean

is_ha_cluster
boolean

read_replicas
array
ip
string

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": "string",
"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": "string",
"port": 42,
"name": "string"
}
],
"node_type": "string",
"volume": {
"type": "lssd",
"size": 42
},
"created_at": "string",
"region": "string"
}
GET
/rdb/v1beta2/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, destroying, error, autohealing, locked, initializing, disk_full and backuping. The default value is unknown.

engine
string

endpoint
object
ip
string

port
number

name
nullable string

tags
array

settings
array
name
string

value
string

backup_schedule
object
frequency
number
In hours.

retention
number
In days.

disabled
boolean

is_ha_cluster
boolean

read_replicas
array
ip
string

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": "string",
"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": "string",
"port": 42,
"name": "string"
}
],
"node_type": "string",
"volume": {
"type": "lssd",
"size": 42
},
"created_at": "string",
"region": "string"
}
PATCH
/rdb/v1beta2/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

name
nullable string

tags
nullable array
Request Example
{
"name": "string",
"tags": [
"string"
]
}
200 Response

id
string

name
string

organization_id
string

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

engine
string

endpoint
object
ip
string

port
number

name
nullable string

tags
array

settings
array
name
string

value
string

backup_schedule
object
frequency
number
In hours.

retention
number
In days.

disabled
boolean

is_ha_cluster
boolean

read_replicas
array
ip
string

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": "string",
"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": "string",
"port": 42,
"name": "string"
}
],
"node_type": "string",
"volume": {
"type": "lssd",
"size": 42
},
"created_at": "string",
"region": "string"
}
DELETE
/rdb/v1beta2/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, destroying, error, autohealing, locked, initializing, disk_full and backuping. The default value is unknown.

engine
string

endpoint
object
ip
string

port
number

name
nullable string

tags
array

settings
array
name
string

value
string

backup_schedule
object
frequency
number
In hours.

retention
number
In days.

disabled
boolean

is_ha_cluster
boolean

read_replicas
array
ip
string

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": "string",
"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": "string",
"port": 42,
"name": "string"
}
],
"node_type": "string",
"volume": {
"type": "lssd",
"size": 42
},
"created_at": "string",
"region": "string"
}
GET
/rdb/v1beta2/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/v1beta2/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, destroying, error, autohealing, locked, initializing, disk_full and backuping. The default value is unknown.

engine
string

endpoint
object
ip
string

port
number

name
nullable string

tags
array

settings
array
name
string

value
string

backup_schedule
object
frequency
number
In hours.

retention
number
In days.

disabled
boolean

is_ha_cluster
boolean

read_replicas
array
ip
string

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": "string",
"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": "string",
"port": 42,
"name": "string"
}
],
"node_type": "string",
"volume": {
"type": "lssd",
"size": 42
},
"created_at": "string",
"region": "string"
}
GET
/rdb/v1beta2/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
string

expires_at
string

created_at
string

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

Get database instance metrics. The metric format is subject to change

GET
/rdb/v1beta2/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

metrics
array
name
string

values
array
time
string

value
number

labels
map
<labelKey>
string
Response Example
{
"metrics": [
{
"name": "string",
"values": [
{
"time": "string",
"value": 42
}
],
"labels": {
"<labelKey>": "string"
}
}
]
}

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

POST
/rdb/v1beta2/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
string

expires_at
string

created_at
string

region
string
Response Example
{
"instance_logs": [
{
"download_url": "string",
"id": "string",
"status": "unknown",
"node": "string",
"expires_at": "string",
"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/v1beta2/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

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": "string",
"port": 42,
"protocol": "tcp",
"direction": "inbound",
"action": "allow",
"description": "string"
}
],
"total_count": 42
}
POST
/rdb/v1beta2/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

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

rules
array
ip
string

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": "string",
"port": 42,
"protocol": "tcp",
"direction": "inbound",
"action": "allow",
"description": "string"
}
]
}
PUT
/rdb/v1beta2/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

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

rules
array
ip
string

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": "string",
"port": 42,
"protocol": "tcp",
"direction": "inbound",
"action": "allow",
"description": "string"
}
]
}
DELETE
/rdb/v1beta2/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

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": "string",
"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/v1beta2/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/v1beta2/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/v1beta2/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/v1beta2/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/v1beta2/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/v1beta2/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/v1beta2/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/v1beta2/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/v1beta2/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/v1beta2/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

total_count
number
Response Example
{
"databases": [
{
"name": "string",
"owner": "string",
"managed": "boolean",
"size": 42
}
],
"total_count": 42
}
POST
/rdb/v1beta2/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
Response Example
{
"name": "string",
"owner": "string",
"managed": "boolean",
"size": 42
}
DELETE
/rdb/v1beta2/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/v1beta2/regions/{region}/node-types
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

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).

is_bssd_compatible
boolean

region
string

total_count
number
Response Example
{
"node_types": [
{
"name": "string",
"stock_status": "unknown",
"description": "string",
"vcpus": 42,
"memory": 42,
"volume_constraint": {
"min_size": 42,
"max_size": 42
},
"is_bssd_compatible": "boolean",
"region": "string"
}
],
"total_count": 42
}

MISC methods

GET
/rdb/v1beta2/regions/{region}
Path Parameters

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

name
string

description
string

version
string

documentation_url
nullable string
Response Example
{
"name": "string",
"description": "string",
"version": "string",
"documentation_url": "string"
}
POST
/rdb/v1beta2/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
Request Example
{
"node_type": "string"
}
200 Response

id
string

name
string

organization_id
string

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

engine
string

endpoint
object
ip
string

port
number

name
nullable string

tags
array

settings
array
name
string

value
string

backup_schedule
object
frequency
number
In hours.

retention
number
In days.

disabled
boolean

is_ha_cluster
boolean

read_replicas
array
ip
string

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": "string",
"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": "string",
"port": 42,
"name": "string"
}
],
"node_type": "string",
"volume": {
"type": "lssd",
"size": 42
},
"created_at": "string",
"region": "string"
}