Users

How to manage users of a database cluster.

Get all Cluster Users

get

Retrieves a list of MongoDB users.

Authorizations
AuthorizationstringRequired

For 'Basic' authentication, take your credentials by first combining the username and password with a colon (username:password) and then encoding the resulting string in base64 (YWxhZGRpbjpvcGVuc2VzYW1l).

Example Request Header

Authorization: Basic YWxhZGRpbjpvcGVuc2Vzl

More details: https://en.wikipedia.org/wiki/Basic_access_authentication

Path parameters
clusterIdstringRequired

The unique ID of the cluster.

Query parameters
limitinteger · min: 1 · max: 1000Optional

The maximum number of elements to return. Use together with 'offset' for pagination.

Default: 100Example: 100
offsetintegerOptional

The first element to return. Use together with 'limit' for pagination.

Default: 0Example: 200
Responses
get
/clusters/{clusterId}/users

Create a MongoDB User

post

Creates a MongoDB user.

Authorizations
AuthorizationstringRequired

For 'Basic' authentication, take your credentials by first combining the username and password with a colon (username:password) and then encoding the resulting string in base64 (YWxhZGRpbjpvcGVuc2VzYW1l).

Example Request Header

Authorization: Basic YWxhZGRpbjpvcGVuc2Vzl

More details: https://en.wikipedia.org/wiki/Basic_access_authentication

Path parameters
clusterIdstringRequired

The unique ID of the cluster.

Body

MongoDB database user post request.

Responses
post
/clusters/{clusterId}/users

Get a MongoDB User by ID

get

Retrieves the MongoDB user identified by the username.

Authorizations
AuthorizationstringRequired

For 'Basic' authentication, take your credentials by first combining the username and password with a colon (username:password) and then encoding the resulting string in base64 (YWxhZGRpbjpvcGVuc2VzYW1l).

Example Request Header

Authorization: Basic YWxhZGRpbjpvcGVuc2Vzl

More details: https://en.wikipedia.org/wiki/Basic_access_authentication

Path parameters
clusterIdstringRequired

The unique ID of the cluster.

usernamestringRequired

The authentication username.

Responses
get
/clusters/{clusterId}/users/{username}

Delete a MongoDB User by ID

delete

Deletes a MongoDB user specified by its ID.

Authorizations
AuthorizationstringRequired

For 'Basic' authentication, take your credentials by first combining the username and password with a colon (username:password) and then encoding the resulting string in base64 (YWxhZGRpbjpvcGVuc2VzYW1l).

Example Request Header

Authorization: Basic YWxhZGRpbjpvcGVuc2Vzl

More details: https://en.wikipedia.org/wiki/Basic_access_authentication

Path parameters
clusterIdstringRequired

The unique ID of the cluster.

usernamestringRequired

The authentication username.

Responses
delete
/clusters/{clusterId}/users/{username}

Patch a MongoDB User by ID

patch

Patches a MongoDB user specified by its ID.

Authorizations
AuthorizationstringRequired

For 'Basic' authentication, take your credentials by first combining the username and password with a colon (username:password) and then encoding the resulting string in base64 (YWxhZGRpbjpvcGVuc2VzYW1l).

Example Request Header

Authorization: Basic YWxhZGRpbjpvcGVuc2Vzl

More details: https://en.wikipedia.org/wiki/Basic_access_authentication

Path parameters
clusterIdstringRequired

The unique ID of the cluster.

usernamestringRequired

The authentication username.

Body

MongoDB database user patch request.

Responses
patch
/clusters/{clusterId}/users/{username}

Last updated

Was this helpful?