• Home
  • Dynatrace API
  • Environment
  • Settings
  • Objects
  • PUT an object

Settings API - PUT an object

Updates the specified settings object.

The request consumes and produces an application/json payload.

PUTManaged https://{your-domain}/e/{your-environment-id}/api/v2/settings/objects/{objectId}
SaaS https://{your-environment-id}.live.dynatrace.com/api/v2/settings/objects/{objectId}
Environment ActiveGate https://{your-activegate-domain}/e/{your-environment-id}/api/v2/settings/objects/{objectId}

Authentication

To execute this request, you need an access token with Write settings (settings.write) scope. To learn how to obtain and use it, see Tokens and authentication.

Parameters

ParameterTypeDescriptionInRequired
objectIdstring

The ID of the required settings object.

pathrequired
bodySettingsObjectUpdate

The JSON body of the request. Contains updated parameters of the settings object.

bodyoptional

Request body objects

The SettingsObjectUpdate object

An update of a settings object.

ElementTypeDescription
schemaVersionstring

The version of the schema on which the object is based.

Can be null.

updateTokenstring

The update token of the object. You can use it to detect simultaneous modifications by different users.

It is 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.

If omitted on update/deletion, the operation overrides the current value or deletes it without any checks.

Can be null.

valueSettingsValue

The value of the setting.

It defines the actual values of settings' parameters.

The actual content depends on the object's schema.

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.

json
{ "schemaVersion": "1.0.0", "updateToken": "Y2ktaGdyb3VwLTEyMythZjhjOThlOS0wN2I0LTMyMGEtOTQzNi02NTEyMmVlNWY4NGQ=", "value": { "autoMonitoring": true } }

Response

Response codes

CodeTypeDescription
200SettingsObjectResponse

Success

400SettingsObjectResponse

Failed. Schema validation failed.

403ErrorEnvelope

Failed. Forbidden.

404SettingsObjectResponse

Failed. The requested resource doesn't exist.

409SettingsObjectResponse

Failed. Conflicting resource.

Response body objects

The SettingsObjectResponse object

The response to a creation- or update-request.

ElementTypeDescription
invalidValueSettingsValue

The value of the setting.

It defines the actual values of settings' parameters.

The actual content depends on the object's schema.

Can be null.

codeinteger

The HTTP status code for the object.

errorError-

Can be null.

objectIdstring

For a successful request, the ID of the created or modified settings object.

Can be null.

The Error object

ElementTypeDescription
constraintViolationsConstraintViolation[]

A list of constraint violations

Can be null.

messagestring

The error message

Can be null.

codeinteger

The HTTP status code

Can be null.

The ConstraintViolation object

A list of constraint violations

ElementTypeDescription
parameterLocationstring-
The element can hold these values
  • PATH
  • PAYLOAD_BODY
  • QUERY

Can be null.

locationstring-

Can be null.

messagestring-

Can be null.

pathstring-

Can be null.

Response body JSON model

json
{ "invalidValue": { "autoMonitoring": true }, "code": 1, "error": { "constraintViolations": [ { "parameterLocation": "PATH", "location": "string", "message": "string", "path": "string" } ], "message": "string", "code": 1 }, "objectId": "Y2ktaGdyb3VwLTEyMythZjhjOThlOS0wN2I0LTMyMGEtOTQzNi02NTEyMmVlNWY4NGQ=" }