Scaleway logo
Managed MongoDB®

Users are profiles to which you can attribute database-level permissions. They allow you to define permissions specific to each type of database usage.


Apply user roles

PUT
https://api.scaleway.com
/mongodb/v1/regions/{region}/instances/{instance_id}/set-user-roles

Apply preset roles for a user in a Database Instance.

Apply user roles › path Parameters

region
​string · enum · required

The region you want to target

Enum values:
fr-par
instance_id
​string · required

UUID of the Database Instance the user belongs to.

Apply user roles › Request Body

user_name
​string

Name of the database user.

List of roles assigned to the user, along with the corresponding database where each role is granted.

Apply user roles › Responses

200
name
​string

Name of the user (Length must be between 1 and 63 characters. First character must be an alphabet character (a-zA-Z). Only a-zA-Z0-9_$- characters are accepted).

List of roles assigned to the user, along with the corresponding database where each role is granted.


List users of a Database Instance

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

List all users of a given Database Instance.

List users of a Database Instance › path Parameters

region
​string · enum · required

The region you want to target

Enum values:
fr-par
instance_id
​string · required

UUID of the Database Instance.

List users of a Database Instance › query Parameters

name
​string

Name of the user.

Criteria to use when requesting user listing.

Enum values:
name_asc
name_desc
Default: name_asc
page
​integer · int32
page_size
​integer · uint32

List users of a Database Instance › Responses

200

List of users in a Database Instance.

total_count
​integer · uint64

Total count of users present on a Database Instance.


Create an user on a Database Instance

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

Create an user on a Database Instance. You must define the name, password of the user and instance_id parameters in the request.

Create an user on a Database Instance › path Parameters

region
​string · enum · required

The region you want to target

Enum values:
fr-par
instance_id
​string · required

UUID of the Database Instance the user belongs to.

Create an user on a Database Instance › Request Body

name
​string

Name of the database user.

password
​string

Password of the database user.

Create an user on a Database Instance › Responses

200
name
​string

Name of the user (Length must be between 1 and 63 characters. First character must be an alphabet character (a-zA-Z). Only a-zA-Z0-9_$- characters are accepted).

List of roles assigned to the user, along with the corresponding database where each role is granted.


Delete a user on a Database Instance

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

Delete an existing user on a Database Instance.

Delete a user on a Database Instance › path Parameters

region
​string · enum · required

The region you want to target

Enum values:
fr-par
instance_id
​string · required

UUID of the Database Instance the user belongs to.

name
​string · required

Name of the database user.

Delete a user on a Database Instance › Responses

No data returned

Update a user on a Database Instance

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

Update the parameters of a user on a Database Instance. You can update the password parameter, 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
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.

Update a user on a Database Instance › Responses

200
name
​string

Name of the user (Length must be between 1 and 63 characters. First character must be an alphabet character (a-zA-Z). Only a-zA-Z0-9_$- characters are accepted).

List of roles assigned to the user, along with the corresponding database where each role is granted.