Navigation

Get a User by Name

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. This page uses the more familiar term group when referring to descriptions. The endpoint remains as stated in the document.

Base URL: https://cloud.mongodb.com/

Resource

GET /api/public/v1.0/users/byName/{USER-NAME}

You can always retrieve your own user account. Otherwise, you must have the user admin role in at least one group that is common between you and the user you are retrieving.

Request Path Parameters

Parameter Required/Optional Description
USER-NAME Required Username of the MongoDB user that you want to retrieve.

Request Query Parameters

This endpoint does not use HTTP request query parameters.

Request Body Parameters

This endpoint does not use HTTP request body parameters.

Response

The HTTP document contains each of the following elements:

Name Type Description
id string Unique identifier.
username string Cloud Manager username.
emailAddress string Email address.
mobileNumber string Mobile number.
firstName string First name.
lastName string Last name.
roles object array Role assignments.
roles.orgId string The ID of the organization in which the user has the specified role.
roles.groupId string The ID of the group in which the user has the specified role.
roles.roleName string

The name of the role. Possible values are:

Note

The users resource returns all the roles the user has in both Cloud Manager and MongoDB Atlas.

  • ORG_MEMBER``
  • ORG_READ_ONLY
  • ORG_BILLING_ADMIN
  • ORG_GROUP_CREATOR
  • ORG_OWNER
  • GROUP_ATLAS_ADMIN
  • GROUP_AUTOMATION_ADMIN
  • GROUP_BACKUP_ADMIN
  • GROUP_MONITORING_ADMIN
  • GROUP_OWNER
  • GROUP_READ_ONLY
  • GROUP_USER_ADMIN
  • GROUP_BILLING_ADMIN
  • GROUP_DATA_ACCESS_ADMIN
links array Links to related sub-resources. All links arrays in responses include at least one link called self. The relations between URLs are explained in the Web Linking Specification.

Example Request

curl -u "username:apiKey" --digest -i "https://cloud.mongodb.com/api/public/v1.0/users/byName/jane"

Example Response

HTTP/1.1 200 OK

{
  "emailAddress" : "jane@qa.example.com",
  "firstName" : "Jane",
  "id" : "533dc19ce4b00835ff81e2eb",
  "lastName" : "D'oh",
  "roles" : [ {
    "groupId" : "533daa30879bb2da07807696",
    "roleName" : "GROUP_USER_ADMIN"
  },{
    "orgId" : "55555bbe3bd5253aea2d9b16",
    "roleName" : "ORG_MEMBER"
  } ],
  "links": [ ... ],
  "username": "jane"
}