Update user

The ServiceProviderAPI (Service Provider API) Api-Token scope is required to set or update cluster proxy configuration using Dynatrace API.

Endpoint

/api/v1.0/onpremise/users

Parameter

Parameter Type Description In Required
body UserConfig

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

body optional

Body format

The UserConfig object

The configuration of the user.

Element Type Description Required
id string

User ID

required
email string

User's email address

required
firstName string

User's first name

required
lastName string

User's last name

required
passwordClearText string

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

optional
groups string[]

List of user's user group IDs.

optional

Response

Response codes

Code Description
200

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

The UserConfig object

The configuration of the user.

Element Type Description
id string

User ID

email string

User's email address

firstName string

User's first name

lastName string

User's last name

passwordClearText string

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

groups string[]

List of user's user group IDs.

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

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

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

Response body

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

Response code

200