Scaleway logo
Managed Database for PostgreSQL and MySQL API

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


List users of a Database Instance

GET
https://api.scaleway.com
/rdb/v1/regions/{region}/instances/{instance_id}/users

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

List users of a Database Instance › path Parameters

region
​string · enum · required

The region you want to target

Enum values:
fr-par
nl-ams
pl-waw
instance_id
​string · required

UUID of the Database Instance.

List users of a Database Instance › query Parameters

name
​string

Name of the user.

order_by
​scaleway.rdb.v1.ListUsersRequest.OrderBy · enum

Criteria to use when requesting user listing.

Enum values:
name_asc
name_desc
is_admin_asc
is_admin_desc
Default: name_asc
page
​google.protobuf.Int32Value · int32
page_size
​integer · uint32

List users of a Database Instance › Responses

200

List of users in a Database Instance.

total_count
​integer · uint32

Total count of users present on a Database Instance.


Create a user for a Database Instance

POST
https://api.scaleway.com
/rdb/v1/regions/{region}/instances/{instance_id}/users

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

Create a user for a Database Instance › path Parameters

region
​string · enum · required

The region you want to target

Enum values:
fr-par
nl-ams
pl-waw
instance_id
​string · required

UUID of the Database Instance in which you want to create a user.

Create a user for a Database Instance › Request Body

name
​string

Name of the user you want to create.

password
​string

Password of the user you want to create. Password must be between 8 and 128 characters, contain at least one digit, one uppercase, one lowercase and one special character.

is_admin
​boolean

Defines whether the user will have administrative privileges.

Create a user for a Database Instance › Responses

200
name
​string

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

is_admin
​boolean

Defines whether or not a user got administrative privileges on the Database Instance.


Delete a user on a Database Instance

DELETE
https://api.scaleway.com
/rdb/v1/regions/{region}/instances/{instance_id}/users/{name}

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

Delete a user on a Database Instance › path Parameters

region
​string · enum · required

The region you want to target

Enum values:
fr-par
nl-ams
pl-waw
instance_id
​string · required

UUID of the Database Instance to delete the user from.

name
​string · required

Name of the user.

Delete a user on a Database Instance › Responses

No data returned

Update a user on a Database Instance

PATCH
https://api.scaleway.com
/rdb/v1/regions/{region}/instances/{instance_id}/users/{name}

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

Update a user on a Database Instance › path Parameters

region
​string · enum · required

The region you want to target

Enum values:
fr-par
nl-ams
pl-waw
instance_id
​string · required

UUID of the Database Instance the user belongs to.

name
​string · required

Name of the database user.

Update a user on a Database Instance › Request Body

password
​string | null

Password of the database user. Password must be between 8 and 128 characters, contain at least one digit, one uppercase, one lowercase and one special character.

is_admin
​boolean | null

Defines whether or not this user got administrative privileges.

Update a user on a Database Instance › Responses

200
name
​string

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

is_admin
​boolean

Defines whether or not a user got administrative privileges on the Database Instance.