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 Database Instances
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.
path Parameters
regionThe region you want to target
query Parameters
tagsList Database Instances that have a given tag.
nameLists Database Instances that match a name pattern.
order_byCriteria to use when ordering Database Instance listings.
organization_idPlease use project_id instead.
project_idProject ID to list the Database Instance of.
has_maintenancesFilter to only list instances with a scheduled maintenance.
pagepage_sizeList Database Instances › Responses
List of all Database Instances available in an Organization or Project.
total_countTotal count of Database Instances available in a Organization or Project.
Create a Database Instance
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.
path Parameters
regionThe region you want to target
Create a Database Instance › Request Body
engineDatabase engine of the Database Instance (PostgreSQL, MySQL, ...).
user_nameUsername created when the Database Instance is created.
passwordPassword of the user. Password must be between 8 and 128 characters, contain at least one digit, one uppercase, one lowercase and one special character.
node_typeType of node to use for the Database Instance.
project_idThe Project ID on which the Database Instance will be created.
nameName of the Database Instance.
is_ha_clusterDefines whether or not High-Availability is enabled.
disable_backupDefines whether or not backups are disabled.
tagsTags to apply to the Database Instance.
List of engine settings to be set upon Database Instance initialization.
volume_typeType of volume where data is stored (lssd, bssd, ...).
volume_sizeVolume size when volume_type is not lssd. (in bytes)
One or multiple EndpointSpec used to expose your Database Instance. A load_balancer public endpoint is systematically created.
backup_same_regionDefines whether to or not to store logical backups in the same region as the Database Instance.
Encryption at rest settings for your Database Instance.
organization_idPlease use project_id instead.
Create a Database Instance › Responses
created_atCreation date (must follow the ISO 8601 format). (RFC 3339 format)
Volumes of the Database Instance.
regionRegion the Database Instance is in.
idUUID of the Database Instance. (UUID format)
nameName of the Database Instance.
organization_idOrganization ID the Database Instance belongs to. (UUID format)
project_idProject ID the Database Instance belongs to. (UUID format)
statusStatus of the Database Instance.
engineDatabase engine of the database (PostgreSQL, MySQL, ...).
Available database engine versions for upgrade.
tagsList of tags applied to the Database Instance.
Advanced settings of the Database Instance.
Backup schedule of the Database Instance.
is_ha_clusterDefines whether or not High-Availability is enabled.
Read Replicas of the Database Instance.
node_typeNode type of the Database Instance.
List of engine settings to be set at database initialization.
List of Database Instance endpoints.
Logs policy of the Database Instance.
backup_same_regionStore logical backups in the same region as the Database Instance.
List of Database Instance maintenance events.
Encryption at rest settings for your Database Instance.
Endpoint of the Database Instance.
Get a Database Instance
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.
path Parameters
regionThe region you want to target
instance_idUUID of the Database Instance.
Get a Database Instance › Responses
created_atCreation date (must follow the ISO 8601 format). (RFC 3339 format)
Volumes of the Database Instance.
regionRegion the Database Instance is in.
idUUID of the Database Instance. (UUID format)
nameName of the Database Instance.
organization_idOrganization ID the Database Instance belongs to. (UUID format)
project_idProject ID the Database Instance belongs to. (UUID format)
statusStatus of the Database Instance.
engineDatabase engine of the database (PostgreSQL, MySQL, ...).
Available database engine versions for upgrade.
tagsList of tags applied to the Database Instance.
Advanced settings of the Database Instance.
Backup schedule of the Database Instance.
is_ha_clusterDefines whether or not High-Availability is enabled.
Read Replicas of the Database Instance.
node_typeNode type of the Database Instance.
List of engine settings to be set at database initialization.
List of Database Instance endpoints.
Logs policy of the Database Instance.
backup_same_regionStore logical backups in the same region as the Database Instance.
List of Database Instance maintenance events.
Encryption at rest settings for your Database Instance.
Endpoint of the Database Instance.
Delete a Database Instance
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.
path Parameters
regionThe region you want to target
instance_idUUID of the Database Instance to delete.
Delete a Database Instance › Responses
created_atCreation date (must follow the ISO 8601 format). (RFC 3339 format)
Volumes of the Database Instance.
regionRegion the Database Instance is in.
idUUID of the Database Instance. (UUID format)
nameName of the Database Instance.
organization_idOrganization ID the Database Instance belongs to. (UUID format)
project_idProject ID the Database Instance belongs to. (UUID format)
statusStatus of the Database Instance.
engineDatabase engine of the database (PostgreSQL, MySQL, ...).
Available database engine versions for upgrade.
tagsList of tags applied to the Database Instance.
Advanced settings of the Database Instance.
Backup schedule of the Database Instance.
is_ha_clusterDefines whether or not High-Availability is enabled.
Read Replicas of the Database Instance.
node_typeNode type of the Database Instance.
List of engine settings to be set at database initialization.
List of Database Instance endpoints.
Logs policy of the Database Instance.
backup_same_regionStore logical backups in the same region as the Database Instance.
List of Database Instance maintenance events.
Encryption at rest settings for your Database Instance.
Endpoint of the Database Instance.
Update a Database Instance
Update the parameters of a Database Instance, including name, tags and backup schedule details.
path Parameters
regionThe region you want to target
instance_idUUID of the Database Instance to update.
Update a Database Instance › Request Body
backup_schedule_frequencyIn hours.
backup_schedule_retentionIn days.
is_backup_schedule_disabledDefines whether or not the backup schedule is disabled.
nameName of the Database Instance.
tagsTags of a Database Instance.
Logs policy of the Database Instance.
backup_same_regionStore logical backups in the same region as the Database Instance.
backup_schedule_start_hourDefines the start time of the autobackup.
Update a Database Instance › Responses
created_atCreation date (must follow the ISO 8601 format). (RFC 3339 format)
Volumes of the Database Instance.
regionRegion the Database Instance is in.
idUUID of the Database Instance. (UUID format)
nameName of the Database Instance.
organization_idOrganization ID the Database Instance belongs to. (UUID format)
project_idProject ID the Database Instance belongs to. (UUID format)
statusStatus of the Database Instance.
engineDatabase engine of the database (PostgreSQL, MySQL, ...).
Available database engine versions for upgrade.
tagsList of tags applied to the Database Instance.
Advanced settings of the Database Instance.
Backup schedule of the Database Instance.
is_ha_clusterDefines whether or not High-Availability is enabled.
Read Replicas of the Database Instance.
node_typeNode type of the Database Instance.
List of engine settings to be set at database initialization.
List of Database Instance endpoints.
Logs policy of the Database Instance.
backup_same_regionStore logical backups in the same region as the Database Instance.
List of Database Instance maintenance events.
Encryption at rest settings for your Database Instance.
Endpoint of the Database Instance.
Apply Database Instance maintenance
Apply maintenance tasks to your Database Instance. This will trigger pending maintenance tasks to start in your Database Instance and can generate service interruption. Maintenance tasks can be applied between starts_at and stops_at times, and are run directly by Scaleway at forced_at timestamp.
path Parameters
regionThe region you want to target
instance_idUUID of the Database Instance you want to apply maintenance.
Apply Database Instance maintenance › Responses
starts_atStart date of the maintenance window. (RFC 3339 format)
stops_atEnd date of the maintenance window. (RFC 3339 format)
closed_atClosed maintenance date. (RFC 3339 format)
reasonMaintenance information message.
statusStatus of the maintenance.
forced_atTime when Scaleway-side maintenance will be applied. (RFC 3339 format)
is_applicableIndicate if the maintenance can be applied by the user.
Get the TLS certificate of a Database Instance
Retrieve information about the TLS certificate of a given Database Instance. Details like name and content are returned in the response.
path Parameters
regionThe region you want to target
instance_idUUID of the Database Instance.
Get the TLS certificate of a Database Instance › Responses
namecontent_typecontentClone a Database Instance
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.
path Parameters
regionThe region you want to target
instance_idUUID of the Database Instance you want to clone.
Clone a Database Instance › Request Body
nameName of the Database Instance clone.
node_typeNode type of the clone.
Clone a Database Instance › Responses
created_atCreation date (must follow the ISO 8601 format). (RFC 3339 format)
Volumes of the Database Instance.
regionRegion the Database Instance is in.
idUUID of the Database Instance. (UUID format)
nameName of the Database Instance.
organization_idOrganization ID the Database Instance belongs to. (UUID format)
project_idProject ID the Database Instance belongs to. (UUID format)
statusStatus of the Database Instance.
engineDatabase engine of the database (PostgreSQL, MySQL, ...).
Available database engine versions for upgrade.
tagsList of tags applied to the Database Instance.
Advanced settings of the Database Instance.
Backup schedule of the Database Instance.
is_ha_clusterDefines whether or not High-Availability is enabled.
Read Replicas of the Database Instance.
node_typeNode type of the Database Instance.
List of engine settings to be set at database initialization.
List of Database Instance endpoints.
Logs policy of the Database Instance.
backup_same_regionStore logical backups in the same region as the Database Instance.
List of Database Instance maintenance events.
Encryption at rest settings for your Database Instance.
Endpoint of the Database Instance.
List available logs of a Database Instance
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.
path Parameters
regionThe region you want to target
instance_idUUID of the Database Instance you want logs of.
query Parameters
order_byCriteria to use when ordering Database Instance logs listing.
List available logs of a Database Instance › Responses
Available logs in a Database Instance.
List remote Database Instance logs details
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.
path Parameters
regionThe region you want to target
instance_idUUID of the Database Instance you want logs of.
List remote Database Instance logs details › Responses
Remote Database Instance logs details.
[deprecated] Get Database Instance metrics
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. This method is deprecated and will be removed in a future version.
path Parameters
regionThe region you want to target
instance_idUUID of the Database Instance.
query Parameters
start_dateStart date to gather metrics from. (RFC 3339 format)
end_dateEnd date to gather metrics from. (RFC 3339 format)
metric_nameName of the metric to gather.
[deprecated] Get Database Instance metrics › Responses
Time series of metrics of a Database Instance.
Prepare logs of a Database Instance
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.
path Parameters
regionThe region you want to target
instance_idUUID of the Database Instance you want logs of.
Prepare logs of a Database Instance › Request Body
start_dateStart datetime of your log. (RFC 3339 format). (RFC 3339 format)
end_dateEnd datetime of your log. (RFC 3339 format). (RFC 3339 format)
Prepare logs of a Database Instance › Responses
Instance logs for a Database Instance between a start and an end date.
Purge remote Database Instance logs
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.
path Parameters
regionThe region you want to target
instance_idUUID of the Database Instance you want logs of.
Purge remote Database Instance logs › Responses
Renew the TLS certificate of a Database Instance
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.
path Parameters
regionThe region you want to target
instance_idUUID of the Database Instance you want logs of.
Renew the TLS certificate of a Database Instance › Responses
Restart Database Instance
Restart a given Database Instance, specified by the region and instance_id parameters. The status of the Database Instance returned in the response.
path Parameters
regionThe region you want to target
instance_idUUID of the Database Instance you want to restart.
Restart Database Instance › Responses
created_atCreation date (must follow the ISO 8601 format). (RFC 3339 format)
Volumes of the Database Instance.
regionRegion the Database Instance is in.
idUUID of the Database Instance. (UUID format)
nameName of the Database Instance.
organization_idOrganization ID the Database Instance belongs to. (UUID format)
project_idProject ID the Database Instance belongs to. (UUID format)
statusStatus of the Database Instance.
engineDatabase engine of the database (PostgreSQL, MySQL, ...).
Available database engine versions for upgrade.
tagsList of tags applied to the Database Instance.
Advanced settings of the Database Instance.
Backup schedule of the Database Instance.
is_ha_clusterDefines whether or not High-Availability is enabled.
Read Replicas of the Database Instance.
node_typeNode type of the Database Instance.
List of engine settings to be set at database initialization.
List of Database Instance endpoints.
Logs policy of the Database Instance.
backup_same_regionStore logical backups in the same region as the Database Instance.
List of Database Instance maintenance events.
Encryption at rest settings for your Database Instance.
Endpoint of the Database Instance.
Upgrade a Database Instance
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.
path Parameters
regionThe region you want to target
instance_idUUID of the Database Instance you want to upgrade.
Upgrade a Database Instance › Request Body
node_typeNode type of the Database Instance you want to upgrade to.
enable_haDefines whether or not high availability should be enabled on the Database Instance.
volume_sizeIncrease your block storage volume size.
volume_typeChange your Database Instance storage type.
upgradable_version_idUpdate 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)
Upgrade your database engine to a new major version including instance endpoints.
enable_encryptionDefines whether or not encryption should be enabled on the Database Instance.
Upgrade a Database Instance › Responses
created_atCreation date (must follow the ISO 8601 format). (RFC 3339 format)
Volumes of the Database Instance.
regionRegion the Database Instance is in.
idUUID of the Database Instance. (UUID format)
nameName of the Database Instance.
organization_idOrganization ID the Database Instance belongs to. (UUID format)
project_idProject ID the Database Instance belongs to. (UUID format)
statusStatus of the Database Instance.
engineDatabase engine of the database (PostgreSQL, MySQL, ...).
Available database engine versions for upgrade.
tagsList of tags applied to the Database Instance.
Advanced settings of the Database Instance.
Backup schedule of the Database Instance.
is_ha_clusterDefines whether or not High-Availability is enabled.
Read Replicas of the Database Instance.
node_typeNode type of the Database Instance.
List of engine settings to be set at database initialization.
List of Database Instance endpoints.
Logs policy of the Database Instance.
backup_same_regionStore logical backups in the same region as the Database Instance.
List of Database Instance maintenance events.
Encryption at rest settings for your Database Instance.
Endpoint of the Database Instance.
Get given logs of a Database Instance
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.
path Parameters
regionThe region you want to target
instance_log_idUUID of the instance_log you want.
Get given logs of a Database Instance › Responses
download_urlPresigned Object Storage URL to download your log file.
idUUID of the Database Instance log.
statusStatus of the logs in a Database Instance.
node_nameName of the underlying node.
expires_atExpiration date (must follow the ISO 8601 format). (RFC 3339 format)
created_atCreation date (must follow the ISO 8601 format). (RFC 3339 format)
regionRegion the Database Instance is in.