Update an existing Dynatrace settings object with new values with the Settings API, using optimistic locking to detect simultaneous changes.
| PUT | SaaS | https://{your-environment-id}.apps.dynatrace.com/platform/settings/v1/objects/{object-id} |
You use the object-id path parameter to choose a settings object and send its new values in the request body. The required optimistic-locking-version query parameter must match the stored version, which detects simultaneous changes. To change a secret property, send its new value unmasked; to keep it, send the current masked value.
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 |
| optimistic-locking-version | string | The version of the object for optimistic locking. You can use it to detect simultaneous modifications by different users. It's generated upon retrieval (GET requests). If set on update (PUT request) or deletion, the update/deletion will be allowed only if there wasn't any change between the retrieval and the update. | query | 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 |
| validate-only | boolean | If | query | Optional |
| body | Settings | The JSON body of the request. Contains the updated parameters of the settings object. | body | Required |
SettingsObjectUpdate objectAn update of a settings object.
| Element | Type | Description | Required |
|---|---|---|---|
| value | Settings | The value of the setting. It defines the actual values of settings' parameters. The actual content depends on the object's schema. | Required |
| insertPosition | string | -The element can hold these values
| Optional |
| insertNeighbor | string | The position of the new object based on the objectId of the neighbor. Only for insertPosition | Optional |
| schemaVersion | string | The version of the schema on which the object is based. | Optional |
| externalId | string | External identifier for the object being updated | Optional |
SettingsValue objectThe value of the setting.
It defines the actual values of settings' parameters.
The actual content depends on the object's schema.
This is a model of the request body, showing the possible elements. It has to be adjusted for usage in an actual request.
{"value": {"autoMonitoring": true},"insertPosition": "first","insertNeighbor": "Y2ktaGdyb3VwLTEyMythZjhjOThlOS0wN2I0LTMyMGEtOTQzNi02NTEyMmVlNWY4NGQ=","schemaVersion": "1.0.0","externalId": "string"}
| Code | Type | Description |
|---|---|---|
| 200 | Settings | Success. |
| 204 | - | Success. No validation errors. |
| 400 | - | - |
| 403 | - | - |
| 404 | - | - |
| 409 | - | - |
| 429 | - | - |
| 503 | - | - |
| 4XX | - | - |
| 5XX | - | - |
SettingsUpdateResponse objectThe response to an update request.
| Element | Type | Description |
|---|---|---|
| version | string | The version of the object for optimistic locking. You can use it to detect simultaneous modifications by different users. It's generated upon retrieval (GET requests). If set on update (PUT request) or deletion, the update/deletion will be allowed only if there wasn't any change between the retrieval and the update. |
{"version": "Y2ktaGdyb3VwLTEyMythZjhjOThlOS0wN2I0LTMyMGEtOTQzNi02NTEyMmVlNWY4NGQ="}