Get an Atlas User by Name

Retrieve a Atlas user's profile using their username. You cannot use this resource to return information on an API Key. To return information on an API Key, use the Get One API Key endpoint.

The Atlas API authenticates using HTTP Digest Authentication. Provide a programmatic API public key and corresponding private key as the username and password when constructing the HTTP request.

To learn how to configure API access for an Atlas project, see Configure Atlas API Access.

Info With Circle IconCreated with Sketch.Note

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:

GET /users/byName/{USER-NAME}
Path ParameterTypeNecessityDescription
{USER-NAME}stringRequiredAtlas username. Must match the username provided as part of the HTTP Digest Authentication API request component.

This endpoint might use any of the HTTP request query parameters available to all Atlas API resources. All of these are optional.

prettybooleanOptionalFlag indicating whether the response body should be in a prettyprint format.false

Flag indicating if Atlas should wrap the response in a JSON envelope.

This option may be needed for some API clients. These clients cannot access the HTTP response headers or status code. To remediate this, set envelope=true in the query.

For endpoints that return one result, the response body includes:

statusHTTP response code
envelopeExpected response body

This endpoint doesn't use HTTP request body parameters.

The JSON document contains each of the following elements:

Response ParameterTypeRequiredDescription
countrystringRequiredISO-3166-1 alpha 2 country code of the Atlas user's country of residence.
emailAddressstringRequiredAtlas user's email address.
firstNamestringRequiredAtlas user's first name.
idstringRequiredUnique identifier for the Atlas user.
lastNamestringRequiredAtlas user's last name.
linksarray of objectsRequiredOne or more links to sub-resources and/or related resources. The relation-types between URL s are explained in the Web Linking Specification.
mobileNumberstringRequiredAtlas user's mobile or cell phone number, if it is listed in the user's profile.

Password. Atlas doesn't return this parameter except in response to creating a new user.

You cannot update the password via API once set. The user must log into Atlas and update their password from the Atlas console.

rolesarray of objectsRequiredEach object in the array represents either an Atlas organization or project the Atlas user is assigned to and the Atlas role has for the associated organization or project. You can specify either roles.orgId or roles.groupId per object.
roles.groupIdstringRequiredunique identifier of the project in which the user has the specified roles.roleName.
roles.orgIdstringRequiredunique identifier of the organization in which the user has the specified roles.roleName.

name of the role.

When associated to roles.orgId, the valid roles and their mappings are:

ORG_OWNEROrganization Owner
ORG_GROUP_CREATOROrganization Project Creator
ORG_BILLING_ADMINOrganization Billing Admin
ORG_READ_ONLYOrganization Read Only
ORG_MEMBEROrganization Member

When associated to roles.groupId, the valid roles and their mappings are:

GROUP_OWNERProject Owner
GROUP_CLUSTER_MANAGERProject Cluster Manager
GROUP_READ_ONLYProject Read Only
GROUP_DATA_ACCESS_ADMINProject Data Access Admin
GROUP_DATA_ACCESS_READ_WRITEProject Data Access Read/Write
GROUP_DATA_ACCESS_READ_ONLYProject Data Access Read Only
teamIdsarray of stringsRequiredUnique identifiers for each team to which the user belongs.
usernamestringRequiredAtlas username. Must use email address formatting. You cannot modify the username once set.
curl --user "{PUBLIC-KEY}:{PRIVATE-KEY}" --digest --include \
--header "Accept: application/json" \
--header "Content-Type: application/json" \
--request GET ""
HTTP/1.1 401 Unauthorized
Content-Type: application/json;charset=ISO-8859-1
Date: {dateInUnixFormat}
WWW-Authenticate: Digest realm="MMS Public API", domain="", nonce="{nonce}", algorithm=MD5, op="auth", stale=false
Content-Length: {requestLengthInBytes}
Connection: keep-alive
HTTP/1.1 200 OK
Vary: Accept-Encoding
Content-Type: application/json
Strict-Transport-Security: max-age=300
Date: {dateInUnixFormat}
Connection: keep-alive
Content-Length: {requestLengthInBytes}
2 "country": "UK",
3 "emailAddress": "",
4 "firstName": "John",
5 "id": "5af1c27a0a7fa48c76d3a761",
6 "lastName": "Doe",
7 "links": [
8 {
9 "href": "",
10 "rel": "self"
11 },
12 {
13 "href": "",
14 "rel": ""
15 }
16 ],
17 "mobileNumber" : "2125550198",
18 "roles": [
19 {
20 "orgId": "5af1c27a0a7fa48c76d3a762",
21 "roleName": "ORG_OWNER"
22 },
23 {
24 "groupId": "5af1c27a0a7fa48c76d3a763",
25 "roleName": "GROUP_OWNER"
26 }
27 ],
28 "teamIds": [
29 "5af1c27a0a7fa48c76d3a764"
30 ],
31 "username": ""
Give Feedback