Update user group
This API call updates a cluster user group.
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/groups
Parameter
Parameter | Type | Description | In | Required |
---|---|---|---|---|
body | Group | Request body used for updating existing user group. For updating user group set correct 'id', not setting 'id' will return 'Bad Request'. Trying to change group name to one that already exists will return 'Bad Request'. Trying to update group that doesn't exist will return 'Not Acceptable'. 'isAccessAccount' value is ignored when 'Dynatrace Platform Subscription' is not in use. | body | optional |
Request body objects
The GroupConfig
object
The configuration of the group.
Element | Type | Description | Required |
---|---|---|---|
isClusterAdminGroup | boolean | If true, then the group has the cluster administrator rights. | required |
hasAccessAccountRole | boolean | If true, then the group has the access account rights. | optional |
hasManageAccountAndViewProductUsageRole | boolean | If true, then the group has the manage account rights. | optional |
isAccessAccount | boolean | - | optional |
isManageAccount | boolean | - | optional |
id | string | Group ID. Leave empty if creating group. Set if updating group. | required |
name | string | Group name | required |
ldapGroupNames | string[] | LDAP group names | optional |
ssoGroupNames | string[] | 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 |
accessRight | object | 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.
{
"isClusterAdminGroup": true,
"hasAccessAccountRole": true,
"hasManageAccountAndViewProductUsageRole": true,
"isAccessAccount": true,
"isManageAccount": true,
"id": "string",
"name": "string",
"ldapGroupNames": [
"string"
],
"ssoGroupNames": [
"string"
],
"accessRight": {}
}
Response
Response codes
Code | Type | Description |
---|---|---|
200 | Group | Successfully updated |
400 | Operation failed. The input is invalid. Possible reasons:
| |
406 | Not acceptable. Group name already exists or group not found |
Response body objects
The GroupConfig
object
The configuration of the group.
Element | Type | Description |
---|---|---|
isClusterAdminGroup | boolean | If true, then the group has the cluster administrator rights. |
hasAccessAccountRole | boolean | If true, then the group has the access account rights. |
hasManageAccountAndViewProductUsageRole | boolean | If true, then the group has the manage account rights. |
isAccessAccount | boolean | - |
isManageAccount | boolean | - |
id | string | Group ID. Leave empty if creating group. Set if updating group. |
name | string | Group name |
ldapGroupNames | string[] | LDAP group names |
ssoGroupNames | string[] | SSO group names. If defined it's used to map SSO group name to Dynatrace group name, otherwise mapping is done by group name |
accessRight | object | Access rights |
Response body JSON model
{
"isClusterAdminGroup": true,
"hasAccessAccountRole": true,
"hasManageAccountAndViewProductUsageRole": true,
"isAccessAccount": true,
"isManageAccount": true,
"id": "string",
"name": "string",
"ldapGroupNames": [
"string"
],
"ssoGroupNames": [
"string"
],
"accessRight": {}
}
Example
In this example, you update the Sales Group
user group to only map 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.
Curl
curl -X 'PUT' \
'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": "salesgroup",
"name": "Sales Group",
"ldapGroupNames": [
"sales"
]
}
}'
Request URL
https://myManaged.cluster.com/api/v1.0/onpremise/groups
Response body
{
"isClusterAdminGroup": true,
"isAccessAccount": true,
"isManageAccount": true,
"id": "salesgroup",
"name": "Sales Group",
"ldapGroupNames": [
"sales"
]
}
Response code
200