• Home
  • Dynatrace Managed
  • Cluster API
  • Cluster API v1
  • Users v1
  • Update user

Update user

This API call updates a cluster user account.

Authentication

To execute this request, you need the Service Provider API (ServiceProviderAPI) permission assigned to your API token. Generate your API token via Cluster Management Console (CMC). To learn how to obtain and use it, see Cluster API - Authentication.

Endpoint

/api/v1.0/onpremise/users

Parameter

ParameterTypeDescriptionInRequired
bodyUserConfig

The JSON body of the request, containing parameters of the user.

bodyoptional

Request body objects

The UserConfig object

The configuration of the user.

ElementTypeDescriptionRequired
idstring

User ID

required
emailstring

User's email address

required
firstNamestring

User's first name

required
lastNamestring

User's last name

required
passwordClearTextstring

User's password in a clear text; used only to set initial password

optional
groupsstring[]

List of user's user group IDs.

optional

Request body JSON model

This is a model of the request body, showing the possible elements. It has to be adjusted for usage in an actual request.

json
{ "id": "string", "email": "string", "firstName": "string", "lastName": "string", "passwordClearText": "string", "groups": [ "string" ] }

Response

Response codes

CodeTypeDescription
200UserConfig

Successfully updated

400

Operation failed. The input is invalid. Possible reasons:

  • all required values (ID, email, first name, last name) must be set
  • invalid user data
  • user email address already assigned
  • user group ID does not exist
403

Operation forbidden - users and groups are fully managed via LDAP or SSO

404

Not found

406

Unacceptable request

524

Email address already registered

Response body objects

The UserConfig object

The configuration of the user.

ElementTypeDescription
idstring

User ID

emailstring

User's email address

firstNamestring

User's first name

lastNamestring

User's last name

passwordClearTextstring

User's password in a clear text; used only to set initial password

groupsstring[]

List of user's user group IDs.

Response body JSON model

json
{ "id": "string", "email": "string", "firstName": "string", "lastName": "string", "passwordClearText": "string", "groups": [ "string" ] }

Example

In this example, you update the john.wicked user to assign admins group membership only. As a response, you will receive back current state of the entity.

Curl

bash
curl -X PUT "https://myManaged.cluster.com/api/v1.0/onpremise/users" -H "accept: application/json" -H "Content-Type: application/json" -d "{\"id\":\"john.wicked\",\"email\":\"john.wicked@company.com\",\"firstName\":\"John\",\"lastName\":\"Wicked\",\"passwordClearText\":null,\"groups\":[\"admin\"]}"

Request URL

plaintext
https://myManaged.cluster.com/api/v1.0/onpremise/users

Response body

json
{ "id": "john.wicked", "email": "john.wicked@company.com", "firstName": "John", "lastName": "Wicked", "passwordClearText": null, "groups": [ "admin" ] }

Response code

200