• Home
  • Dynatrace Managed
  • Cluster API
  • Cluster API v1
  • Users v1
  • Create cluster user accounts

Create cluster user accounts

This API call creates multiple cluster user accounts.

Authentication

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 - contact Dynatrace ONE via help chat or e-mail.

Endpoint

/api/v1.0/onpremise/users/bulk

Parameter

ParameterTypeDescriptionInRequired
bodyUserConfig[]

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

bodyoptional

Request body objects

The RequestBody object

The object doesn't provide any parameters.

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[]

Success

400

Operation failed. The input is invalid. Possible reasons:

  • no user information received for the create-users request
  • all required values (ID, email, first name, last name) must be set
  • invalid user data
  • input contains duplicated IDs
  • input contains duplicated email addresses
  • user ID already exists
  • user email address already assigned
  • user group ID does not exist
403

Operation forbidden - either LDAP or SSO with group assignment integration is turned on

406UserConfig

Unacceptable or incomplete request. Some users added

Response body objects

The ResponseBody object

The object doesn't provide any parameters.

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, 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

bash
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\"]}]"

Request URL

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

Response body

json
[ { "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"] } ]

Response code

200