Navigation

Update a User

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://<ops-manager-host>/

Resource

PATCH /api/public/v1.0/users/{USER-ID}

Update an existing user. Unspecified fields preserve their current values.

Note

You cannot update the password field for security reasons.

Request Path Parameters

Parameter Required/Optional Description
USER-ID Required ID of the user that you want to retrieve. To retrieve the USER-ID for a user, see Get All Users in a Group.

Request Query Parameters

This endpoint does not use HTTP request query parameters.

Request Body Parameters

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

Response

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 -u "username:apiKey" -H "Content-Type: application/json" --digest -i -X PATCH "https://<ops-manager-host>/api/public/v1.0/users/533dc19ce4b00835ff81e2eb" --data '
{
  "emailAddress": "jane@qa.example.com",
  "lastName": "D'oh"
}'

Example Response

HTTP/1.1 200 OK

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