Permission management API - POST permissions
Assigns permissions to a user group in your Dynatrace account. Existing permissions remain unaffected.
The request consumes an application/json
payload.
POST |
|
Authentication
To execute this request, you need the Allow write access for identity resources (users and groups) (account-idm-write
) scope assigned to your token. To learn how to obtain and use it, see Authentication.
Parameters
Parameter | Type | Description | In | Required |
---|---|---|---|---|
accountUuid | string | The ID of the required account. You can find the UUID on the Account > Account management API page, during creation of an OAuth client. | path | required |
groupUuid | string | The UUID of the required user group. | path | required |
body | PermissionsDto[] | The body of the request. Contains a list of permissions to be assigned to the group. Existing permissions remain unaffected. | body | required |
Request body objects
The RequestBody
object
The PermissionsDto
object
Element | Type | Description | Required |
---|---|---|---|
permissionName | string | The name of the permission.
| required |
scope | string | The scope of the permission. Depending on the scope type, it is defined by:
| required |
scopeType | string | The type of the permission scope.
| required |
createdAt | string | The date and time of the permission creation in | optional |
updatedAt | string | The date and time of the most recent permission modification in | 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 {3 "permissionName": "account-company-info",4 "scope": "string",5 "scopeType": "account",6 "createdAt": "string",7 "updatedAt": "string"8 }9]
Response
Response codes
Code | Description |
---|---|
201 | Success. Permissions have been assigned to the user group. Response doesn't have a body. |
Example
In this example, the request assigns the tenant-manage-security-problems (Manage security problems) permission to the user group with the ID of 7a1d224d-0ebc-4318-ab1e-64b217b7c156. The response code of 201 indicates that the modification was successful.
Curl
1curl --request POST \2 --url 'https://api.dynatrace.com/iam/v1/accounts/9ad20784-76c6-4167-bfba-9b0d8d72a71d/groups/7a1d224d-0ebc-4318-ab1e-64b217b7c156/permissions' \3 --header 'Authorization: Bearer abcdefjhij1234567890' \4 --header 'Content-Type: application/json' \5 --data '[6 {7 "permissionName": "tenant-manage-security-problems",8 "scope": "mySampleEnv",9 "scopeType": "tenant"10 }11]'
Request URL
1https://api.dynatrace.com/iam/v1/accounts/9ad20784-76c6-4167-bfba-9b0d8d72a71d/groups/7a1d224d-0ebc-4318-ab1e-64b217b7c156/permissions
Request body
1[2 {3 "permissionName": "tenant-manage-security-problems",4 "scope": "mySampleEnv",5 "scopeType": "tenant"6 }7]
Response code
201