Navigation

Create the First User

Base URL: https://<ops-manager-host>/

Resource

POST /api/public/v1.0/unauth/users

Create the first Ops Manager user. This endpoint is available only when the Ops Manager instance has no users. This is the only API call you can make without first having an API key.

The user created through this endpoint is automatically granted the GLOBAL_OWNER role. The returned document includes the new user’s Public API key, which you can use to make further API calls.

The endpoint does not create a group, but you can use the new user and API key to create a group through the Groups resource in the API. You cannot login to Ops Manager until after you have created a group.

Request Path Parameters

This endpoint does not use HTTP request path parameters.

Request Query Parameters

This endpoint does not use HTTP request query parameters.

Request Body Parameters

All fields are required.

Name Type Description
username string Ops Manager username.
password string Password. This field is NOT included in the entity returned from the server. It can only be sent in the entity body when creating a new user.
emailAddress string Email address.
firstName string First name.
lastName string Last name.

Response

The HTTP document contains each of the following elements:

Name Type Description
id string Unique identifier.
username string Ops 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.

For the “global” roles (those whose name starts with GLOBAL_) there is no groupId since these roles are not tied to a group.

roles.roleName string

The name of the role. Possible values are:

  • 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
  • GLOBAL_AUTOMATION_ADMIN
  • GLOBAL_BACKUP_ADMIN
  • GLOBAL_MONITORING_ADMIN
  • GLOBAL_OWNER
  • GLOBAL_READ_ONLY
  • GLOBAL_USER_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 -H "Content-Type: application/json" -i -X POST "http://<ops-manager-host>/api/public/v1.0/unauth/users" --data '
{
  "username": "jane.doe@mongodb.com",
  "emailAddress": "jane.doe@mongodb.com",
  "password": "Passw0rd.",
  "firstName": "Jane",
  "lastName": "Doe"
}'

Example Response

HTTP/1.1 201 Created

{
  "user": {
    "username": "jane.doe@mongodb.com",
    "roles": [
      {
        "roleName": "GLOBAL_OWNER"
      }
    ],
    "lastName": "Doe",
    "id": "533dc19ce4b00835ff81e2eb",
    "firstName": "Jane",
    "emailAddress": "jane.doe@mongodb.com",
    "links": [ ... ]
  },
  "apiKey": "1234abcd-ab12-cd34-ef56-1234abcd1234"
}
←   Update a User Whitelist  →