Create a new Dynatrace settings object with the Settings API, or validate the submitted object without saving it by setting validate-only to true.
| POST | SaaS | https://{your-environment-id}.apps.dynatrace.com/platform/settings/v1/objects |
You use this operation to create a settings object from the values in the request body. Set the validate-only query parameter to true to only validate the submitted object without saving it, for example in a CI check. 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 |
|---|---|---|---|---|
| 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 settings object. | body | Required |
SettingsObjectCreate objectConfiguration of a new settings object.
| Element | Type | Description | Required |
|---|---|---|---|
| schemaId | string | The schema on which the object is based. | Required |
| schemaVersion | string | The version of the schema on which the object is based. | Optional |
| scope | string | The scope of the settings object. | Required |
| externalId | string | External id for upserts. | Optional |
| 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 |
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.
{"schemaId": "jira-connection","schemaVersion": "1.0","scope": "environment","externalId": "myExternalId","value": {"autoMonitoring": true},"insertPosition": "first","insertNeighbor": "Y2ktaGdyb3VwLTEyMythZjhjOThlOS0wN2I0LTMyMGEtOTQzNi02NTEyMmVlNWY4NGQ="}
| Code | Type | Description |
|---|---|---|
| 200 | Settings | Existing object successfully updated. |
| 201 | Settings | Created. |
| 204 | - | Success. No validation errors. |
| 400 | - | - |
| 403 | - | - |
| 404 | - | - |
| 409 | - | - |
| 429 | - | - |
| 503 | - | - |
| 4XX | - | - |
| 5XX | - | - |
SettingsObjectResponse objectThe response to a creation request. Only contains the ID and version, not the full object.
| Element | Type | Description |
|---|---|---|
| objectId | string | The ID of the created settings object. |
| 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. |
{"objectId": "Y2ktaGdyb3VwLTEyMythZjhjOThlOS0wN2I0LTMyMGEtOTQzNi02NTEyMmVlNWY4NGQ=","version": "Y2ktaGdyb3VwLTEyMythZjhjOThlOS0wN2I0LTMyMGEtOTQzNi02NTEyMmVlNWY4NGQ="}