Grant a user or group permissions on a Dynatrace settings object with the Settings API; anyone with write permission on the object can add them.
| POST | SaaS | https://{your-environment-id}.apps.dynatrace.com/platform/settings/v1/objects/{object-id}/permissions |
You use the object-id path parameter to choose a settings object and the accessor and permissions fields in the request body to grant permissions to one user or group. Anyone with write permission on the object can add permissions. With the admin-access query parameter set to true and the settings:objects:admin permission, you can act on objects you don't own.
To execute this request, you need a platform token or OAuth access token with settings:objects:write scope. To learn how to obtain and use it, see Tokens and authentication.
| Parameter | Type | Description | In | Required |
|---|---|---|---|---|
| object-id | string | The ID of the required settings object | path | Required |
| admin-access | boolean | If set to true and user has settings:objects:admin permission, the endpoint will act as if the user is the owner of all objects | query | Optional |
| body | Accessor | The JSON body of the request. Contains the accessor and their new permissions. | body | Required |
AccessorPermissions object| Element | Type | Description | Required |
|---|---|---|---|
| accessor | Identity | - | Required |
| permissions | Permissions | Permissions granted to the accessor on this object. The element can hold these values
| Required |
Identity object| Element | Type | Description | Required |
|---|---|---|---|
| type | string | -The element can hold these values
| Required |
| id | string | user id or user group id if type is 'user' or 'group', missing if type is 'all-users' | Optional |
PermissionsList objectPermissions granted to the accessor on this object. r grants read access to view the object; w grants write access to modify the object. Valid values: ["r"] for read-only, ["r", "w"] for read and write.
This is a model of the request body, showing the possible elements. It has to be adjusted for usage in an actual request.
{"accessor": {"type": "user","id": "string"},"permissions": ["r","w"]}
| Code | Type | Description |
|---|---|---|
| 201 | Accessor | Success. |
| 400 | - | - |
| 404 | - | - |
| 429 | - | - |
| 503 | - | - |
| 4XX | - | - |
| 5XX | - | - |
AccessorPermissions object| Element | Type | Description |
|---|---|---|
| accessor | Identity | - |
| permissions | Permissions | Permissions granted to the accessor on this object. The element can hold these values
|
Identity object| Element | Type | Description |
|---|---|---|
| type | string | -The element can hold these values
|
| id | string | user id or user group id if type is 'user' or 'group', missing if type is 'all-users' |
PermissionsList objectPermissions granted to the accessor on this object. r grants read access to view the object; w grants write access to modify the object. Valid values: ["r"] for read-only, ["r", "w"] for read and write.
{"accessor": {"type": "user","id": "string"},"permissions": ["r","w"]}