Transfer the ownership of a Dynatrace settings object to a new owner with the Settings API; only the owner or an admin can hand over an object.
| POST | SaaS | https://{your-environment-id}.apps.dynatrace.com/platform/settings/v1/objects/{object-id}:change-owner |
You use the object-id path parameter to choose a settings object and the newOwner field in the request body to transfer its ownership. Only the current owner or the main admin can transfer ownership. With the admin-access query parameter set to true and the settings:objects:admin permission, you can act on objects you don't own. A 204 response confirms the transfer.
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 | Transfer | The JSON body of the request. Contains the new owner of the object. | body | Required |
TransferOwnershipRequest object| Element | Type | Description | Required |
|---|---|---|---|
| newOwner | Identity | - | 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 |
This is a model of the request body, showing the possible elements. It has to be adjusted for usage in an actual request.
{"newOwner": {"type": "user","id": "string"}}
| Code | Description |
|---|---|
| 204 | Success. |
| 404 | - |
| 429 | - |
| 503 | - |
| 4XX | - |
| 5XX | - |