Update user
This page will soon be available only on the dedicated Dynatrace Managed Documentation site. Update your bookmarks.
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
Parameter | Type | Description | In | Required |
---|---|---|---|---|
body | UserConfig | The JSON body of the request, containing parameters of the user. | body | optional |
Request body objects
The UserConfig
object
The configuration of the user.
Element | Type | Description | Required |
---|---|---|---|
string | User's email address | required | |
firstName | string | User's first name | required |
groups | string[] | List of user's user group IDs. | optional |
id | string | User ID | required |
lastName | string | User's last name | required |
passwordClearText | string | User's password in a clear text; used only to set initial password | 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.
1{2 "email": "string",3 "firstName": "string",4 "groups": [5 "string"6 ],7 "id": "string",8 "lastName": "string",9 "passwordClearText": "string"10}
Response
Response codes
Code | Type | Description |
---|---|---|
200 | UserConfig | Successfully updated |
400 | - | Operation failed. The input is invalid. Possible reasons:
|
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.
Element | Type | Description |
---|---|---|
string | User's email address | |
firstName | string | User's first name |
groups | string[] | List of user's user group IDs. |
id | string | User ID |
lastName | string | User's last name |
passwordClearText | string | User's password in a clear text; used only to set initial password |
Response body JSON model
1{2 "email": "string",3 "firstName": "string",4 "groups": [5 "string"6 ],7 "id": "string",8 "lastName": "string",9 "passwordClearText": "string"10}
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
1curl -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
1https://myManaged.cluster.com/api/v1.0/onpremise/users
Response body
1{2 "id": "john.wicked",3 "email": "john.wicked@company.com",4 "firstName": "John",5 "lastName": "Wicked",6 "passwordClearText": null,7 "groups": [8 "admin"9 ]10 }
Response code
200