Scaleway logo
Serverless SQL Databases API

List your Serverless SQL Databases

GET
https://api.scaleway.com
/serverless-sqldb/v1alpha1/regions/{region}/databases

List all Serverless SQL Databases for a given Scaleway Organization or Scaleway Project. By default, the databases returned in the list are ordered by creation date in ascending order, though this can be modified via the order_by field. 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.

List your Serverless SQL Databases › path Parameters

region
​string · enum · required

The region you want to target

Enum values:
fr-par

List your Serverless SQL Databases › query Parameters

project_id
​string · required

UUID of the Scaleway project.

organization_id
​string

Filter by the UUID of the Scaleway organization. (UUID format)

page
​integer · int32

Page number.

page_size
​integer · uint32

Page size.

name
​string

Filter by the name of the database.

Sorting criteria. One of created_at_asc, created_at_desc, name_asc, name_desc.

Enum values:
created_at_asc
created_at_desc
name_asc
name_desc
Default: created_at_asc

List your Serverless SQL Databases › Responses

200

List of the databases.

total_count
​integer · uint64

Total count of Serverless SQL Databases.


Create a new Serverless SQL Database

POST
https://api.scaleway.com
/serverless-sqldb/v1alpha1/regions/{region}/databases

You must provide the following parameters: organization_id, project_id, name, cpu_min, cpu_max. You can also provide from_backup_id to create a database from a backup.

Create a new Serverless SQL Database › path Parameters

region
​string · enum · required

The region you want to target

Enum values:
fr-par

Create a new Serverless SQL Database › Request Body

project_id
​string · required

The ID of your Scaleway project.

name
​string · required

The name of the Serverless SQL Database to be created.

cpu_min
​integer · uint32 · required

The minimum number of CPU units for your Serverless SQL Database.

cpu_max
​integer · uint32 · required

The maximum number of CPU units for your Serverless SQL Database.

from_backup_id
​string | null

The ID of the backup to create the database from.

version
​string

The major version of the postgreSQL requested.

Create a new Serverless SQL Database › Responses

200
id
​string

UUID that uniquely identifies your Serverless SQL DB Database.

srn
​string

The SRN of the database.

name
​string

Name of the database.

Status of the Serverless SQL Ddatabase. One of unknown_status | ready | creating | deleting | error | restoring | locked.

Enum values:
unknown_status
error
creating
ready
deleting
restoring
locked
Default: unknown_status
endpoint
​string

Endpoint of the database.

organization_id
​string

The ID of your Scaleway organization.

project_id
​string

Project ID the database belongs to.

region
​string

Region of the database.

created_at
​string | null · date-time

Creation date. (RFC 3339 format)

cpu_min
​integer · uint32

The minimum number of CPU units for your Serverless SQL Database.

cpu_max
​integer · uint32

The maximum number of CPU units for your Serverless SQL Database.

cpu_current
​integer · uint32

The current number of CPU units allocated to your Serverless SQL Database.

started
​boolean

Whether your Serverless SQL Database is running or not.

The major version of the underlying database engine.


Get a database information

GET
https://api.scaleway.com
/serverless-sqldb/v1alpha1/regions/{region}/databases/{database_id}

Retrieve information about your Serverless SQL Database. You must provide the database_id parameter.

Get a database information › path Parameters

region
​string · enum · required

The region you want to target

Enum values:
fr-par
database_id
​string · required

UUID of the Serverless SQL DB database.

Get a database information › Responses

200
id
​string

UUID that uniquely identifies your Serverless SQL DB Database.

srn
​string

The SRN of the database.

name
​string

Name of the database.

Status of the Serverless SQL Ddatabase. One of unknown_status | ready | creating | deleting | error | restoring | locked.

Enum values:
unknown_status
error
creating
ready
deleting
restoring
locked
Default: unknown_status
endpoint
​string

Endpoint of the database.

organization_id
​string

The ID of your Scaleway organization.

project_id
​string

Project ID the database belongs to.

region
​string

Region of the database.

created_at
​string | null · date-time

Creation date. (RFC 3339 format)

cpu_min
​integer · uint32

The minimum number of CPU units for your Serverless SQL Database.

cpu_max
​integer · uint32

The maximum number of CPU units for your Serverless SQL Database.

cpu_current
​integer · uint32

The current number of CPU units allocated to your Serverless SQL Database.

started
​boolean

Whether your Serverless SQL Database is running or not.

The major version of the underlying database engine.


Delete a database

DELETE
https://api.scaleway.com
/serverless-sqldb/v1alpha1/regions/{region}/databases/{database_id}

Deletes a database. You must provide the database_id parameter. All data stored in the database will be permanently deleted.

Delete a database › path Parameters

region
​string · enum · required

The region you want to target

Enum values:
fr-par
database_id
​string · required

UUID of the Serverless SQL Database.

Delete a database › Responses

200
id
​string

UUID that uniquely identifies your Serverless SQL DB Database.

srn
​string

The SRN of the database.

name
​string

Name of the database.

Status of the Serverless SQL Ddatabase. One of unknown_status | ready | creating | deleting | error | restoring | locked.

Enum values:
unknown_status
error
creating
ready
deleting
restoring
locked
Default: unknown_status
endpoint
​string

Endpoint of the database.

organization_id
​string

The ID of your Scaleway organization.

project_id
​string

Project ID the database belongs to.

region
​string

Region of the database.

created_at
​string | null · date-time

Creation date. (RFC 3339 format)

cpu_min
​integer · uint32

The minimum number of CPU units for your Serverless SQL Database.

cpu_max
​integer · uint32

The maximum number of CPU units for your Serverless SQL Database.

cpu_current
​integer · uint32

The current number of CPU units allocated to your Serverless SQL Database.

started
​boolean

Whether your Serverless SQL Database is running or not.

The major version of the underlying database engine.


Update database information

PATCH
https://api.scaleway.com
/serverless-sqldb/v1alpha1/regions/{region}/databases/{database_id}

Update CPU limits of your Serverless SQL Database. You must provide the database_id parameter.

Update database information › path Parameters

region
​string · enum · required

The region you want to target

Enum values:
fr-par
database_id
​string · required

UUID of the Serverless SQL Database.

Update database information › Request Body

cpu_min
​integer | null · uint32

The minimum number of CPU units for your Serverless SQL Database.

cpu_max
​integer | null · uint32

The maximum number of CPU units for your Serverless SQL Database.

Update database information › Responses

200
id
​string

UUID that uniquely identifies your Serverless SQL DB Database.

srn
​string

The SRN of the database.

name
​string

Name of the database.

Status of the Serverless SQL Ddatabase. One of unknown_status | ready | creating | deleting | error | restoring | locked.

Enum values:
unknown_status
error
creating
ready
deleting
restoring
locked
Default: unknown_status
endpoint
​string

Endpoint of the database.

organization_id
​string

The ID of your Scaleway organization.

project_id
​string

Project ID the database belongs to.

region
​string

Region of the database.

created_at
​string | null · date-time

Creation date. (RFC 3339 format)

cpu_min
​integer · uint32

The minimum number of CPU units for your Serverless SQL Database.

cpu_max
​integer · uint32

The maximum number of CPU units for your Serverless SQL Database.

cpu_current
​integer · uint32

The current number of CPU units allocated to your Serverless SQL Database.

started
​boolean

Whether your Serverless SQL Database is running or not.

The major version of the underlying database engine.


Restore a database from a backup

POST
https://api.scaleway.com
/serverless-sqldb/v1alpha1/regions/{region}/databases/{database_id}/restore

Restore a database from a backup. You must provide the backup_id parameter.

Restore a database from a backup › path Parameters

region
​string · enum · required

The region you want to target

Enum values:
fr-par
database_id
​string · required

UUID of the Serverless SQL Database.

Restore a database from a backup › Request Body

backup_id
​string · required

UUID of the Serverless SQL Database backup to restore.

Restore a database from a backup › Responses

200
id
​string

UUID that uniquely identifies your Serverless SQL DB Database.

srn
​string

The SRN of the database.

name
​string

Name of the database.

Status of the Serverless SQL Ddatabase. One of unknown_status | ready | creating | deleting | error | restoring | locked.

Enum values:
unknown_status
error
creating
ready
deleting
restoring
locked
Default: unknown_status
endpoint
​string

Endpoint of the database.

organization_id
​string

The ID of your Scaleway organization.

project_id
​string

Project ID the database belongs to.

region
​string

Region of the database.

created_at
​string | null · date-time

Creation date. (RFC 3339 format)

cpu_min
​integer · uint32

The minimum number of CPU units for your Serverless SQL Database.

cpu_max
​integer · uint32

The maximum number of CPU units for your Serverless SQL Database.

cpu_current
​integer · uint32

The current number of CPU units allocated to your Serverless SQL Database.

started
​boolean

Whether your Serverless SQL Database is running or not.

The major version of the underlying database engine.