Get a Single Database User


Groups and projects are synonymous terms. Your {GROUP-ID} is the same as your project ID. For existing groups, your group/project ID remains the same. The resource and corresponding endpoints use the term groups.

Base URL:

The Atlas API uses HTTP Digest Authentication. Provide your Atlas username and API key as the username and password when constructing the HTTP request.

For complete documentation on configuring API access for an Atlas project, see Configure Atlas API Access.


GET /api/atlas/v1.0/groups/{GROUP-ID}/databaseUsers/admin/{USERNAME}

Request Path Parameters

Parameter Required/Optional Description
GROUP-ID Required. Unique identifier for the project.
USERNAME Required. Username to retrieve

Request Query Parameters

This endpoint may use any of the HTTP request query parameters available to all Atlas API resources. These are all optional.

Name Type Description Default
pretty boolean Displays response in a prettyprint format. false
envelope boolean Specifies whether or not to wrap the response in an envelope. false

Request Body Parameters

This endpoint does not use HTTP request body parameters.

Response Elements

If you set the query element envelope to true, the response is wrapped by the content object.

Name Description
databaseName The user’s authentication database. A user must provide both a username and authentication database to log into MongoDB. In Atlas deployments of MongoDB, the authentication database is always the admin database.
deleteAfterDate ISO-8601- formatted date after which Atlas deletes the user. This field is only present if an expiration date was specified when creating the entry.
groupId ID of the Atlas project the user belongs to.
links One or more links to sub-resources and/or related resources.
roles Array of this user’s roles and the databases / collections on which the roles apply. A role allows the user to perform particular actions on the specified database. A role on the admin database can include privileges that apply to the other databases as well.
roles.databaseName Database on which the user has the specified role. A role on the admin database can include privileges that apply to the other databases.
roles.collectionName Collection on which the user has the specified role.

Name of the role. The possible values are:

username Username for authenticating to MongoDB.




You must modify the following code block with the appropriate credentials and project ID.

curl -i -u "username:apiKey" --digest ""


HTTP/1.1 200 OK

  "databaseName" : "admin",
  "groupId" : "5356823b3794dee37132bb7b",
  "links" : [ ... ],
  "roles" : [ {
    "databaseName" : "admin",
    "roleName" : "readAnyDatabase"
  }, {
    "databaseName" : "marketing",
    "roleName" : "readWrite"
  }, {
    "databaseName" : "marketing",
    "roleName" : "backup"
  } ],
  "username" : "ellen"