This API call creates multiple cluster user accounts.
The ServiceProviderAPI (Service Provider API) Api-Token scope is required to get the default realm password policy configuration using the Dynatrace API. With this API method, you can preset user's password by passing passwordClearText value. This is allowed only if a specific Feature Flag is enabled. To do this, Please contact a Dynatrace product expert via live chat within your environment..
/api/v1.0/onpremise/users/bulk
| Parameter | Type | Description | In | Required |
|---|---|---|---|---|
| body | User | The JSON body of the request, containing parameters of the users. | body | optional |
RequestBody objectUserConfig objectThe 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 |
This is a model of the request body, showing the possible elements. It has to be adjusted for usage in an actual request.
[{"email": "string","firstName": "string","groups": ["string"],"id": "string","lastName": "string","passwordClearText": "string"}]
| Code | Type | Description |
|---|---|---|
| 200 | User | Success |
| 400 | - | Operation failed. The input is invalid. Possible reasons:
|
| 403 | - | Operation forbidden - either LDAP or SSO with group assignment integration is turned on |
| 406 | User | Unacceptable or incomplete request. Some users added |
ResponseBody objectUserConfig objectThe 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 |
[{"email": "string","firstName": "string","groups": ["string"],"id": "string","lastName": "string","passwordClearText": "string"}]
In this example, we add two users - john.wicked and ann.brown in a single request. This will set their data and assign individually group memberships. As a response, you will receive back persisted state of the entities.
curl -X POST "https://myManaged.cluster.com/api/v1.0/onpremise/users/bulk" -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\":[\"owners\",\"users\"]},{\"id\":\"anne.brown\",\"email\":\"anne.brown@company.com\",\"firstName\":\"Anne\",\"lastName\":\"Brown\",\"passwordClearText\":null,\"groups\":[\"users\"]}]"
https://myManaged.cluster.com/api/v1.0/onpremise/users/bulk
[{"id": "john.wicked","email": "john.wicked@company.com","firstName": "John","lastName": "Wicked","passwordClearText": null,"groups": ["owners","users"]},{"id": "anne.brown","email": "anne.brown@company.com","firstName": "Anne","lastName": "Brown","passwordClearText": null,"groups": ["users"]}]
200