• Home
  • Dynatrace Managed
  • Cluster API
  • Cluster API v1
  • User groups v1
  • Create user group

Create user group

This API call creates a cluster user group.

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, Please contact a Dynatrace ONE product specialist by selecting the chat button in the upper-right corner of the Dynatrace menu bar..

Endpoint

/api/v1.0/onpremise/groups

Parameter

ParameterTypeDescriptionInRequired
bodyGroupConfig

Request body used for creating new user group. For creating user group leave 'id' empty, setting 'id' will return 'Bad Request'. Trying to create group with name that already exists will return 'Not Acceptable'. 'isAccessAccount' value is ignored when 'Dynatrace Platform Subscription' is not in use.

bodyoptional

Request body objects

The GroupConfig object

The configuration of the group.

ElementTypeDescriptionRequired
isClusterAdminGroupboolean

If true, then the group has the cluster administrator rights.

required
hasAccessAccountRoleboolean

If true, then the group has the access account rights.

optional
hasManageAccountAndViewProductUsageRoleboolean

If true, then the group has the manage account rights.

optional
isAccessAccountboolean-optional
isManageAccountboolean-optional
idstring

Group ID. Leave empty if creating group. Set if updating group.

required
namestring

Group name

required
ldapGroupNamesstring[]

LDAP group names

optional
ssoGroupNamesstring[]

SSO group names. If defined it's used to map SSO group name to Dynatrace group name, otherwise mapping is done by group name

optional
accessRightobject

Access rights

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
{ "isClusterAdminGroup": true, "hasAccessAccountRole": true, "hasManageAccountAndViewProductUsageRole": true, "isAccessAccount": true, "isManageAccount": true, "id": "string", "name": "string", "ldapGroupNames": [ "string" ], "ssoGroupNames": [ "string" ], "accessRight": {} }

Response

Response codes

CodeTypeDescription
200GroupConfig

Successfully updated

400

Operation failed. The input is invalid. Possible reasons:

  • No group information received for the request to create a group
  • Group ID cannot be set
  • Group name cannot be null or empty
  • At least one of the specified environments doesn't exist
406

Not acceptable. Group already exists

Response body objects

The GroupConfig object

The configuration of the group.

ElementTypeDescription
isClusterAdminGroupboolean

If true, then the group has the cluster administrator rights.

hasAccessAccountRoleboolean

If true, then the group has the access account rights.

hasManageAccountAndViewProductUsageRoleboolean

If true, then the group has the manage account rights.

isAccessAccountboolean-
isManageAccountboolean-
idstring

Group ID. Leave empty if creating group. Set if updating group.

namestring

Group name

ldapGroupNamesstring[]

LDAP group names

ssoGroupNamesstring[]

SSO group names. If defined it's used to map SSO group name to Dynatrace group name, otherwise mapping is done by group name

accessRightobject

Access rights

Response body JSON model

json
{ "isClusterAdminGroup": true, "hasAccessAccountRole": true, "hasManageAccountAndViewProductUsageRole": true, "isAccessAccount": true, "isManageAccount": true, "id": "string", "name": "string", "ldapGroupNames": [ "string" ], "ssoGroupNames": [ "string" ], "accessRight": {} }

Example

In this example, you create the Sales Group user group that only maps to sales LDAP group membership. This group will allow access Cluster Management Console and Account Management full rights. As a response, you'll receive back the entity's current state and newly generated ID.

Curl

bash
curl -X 'POST' \ 'https://myManaged.cluster.com/api/v1.0/onpremise/groups' \ -H 'accept: application/json' \ -H 'Authorization: Api-Token FG563.LKJHDFLKJHDFHLKJDGV.ABCDEFGHJKLMNOP' \ -H 'Content-Type: application/json' \ -d '{ "isClusterAdminGroup": true, "isAccessAccount": true, "isManageAccount": true, "id": "", "name": "Sales Group", "ldapGroupNames": [ "sales" ] } }'

Request URL

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

Response body

json
{ "isClusterAdminGroup": true, "isAccessAccount": true, "isManageAccount": true, "id": "salesgroup", "name": "Sales Group", "ldapGroupNames": [ "sales" ] }

Response code

200