Settings API - PUT an object

Updates the specified settings object.

The request consumes and produces an application/json payload.

PUTSaaShttps://{your-environment-id}.live.dynatrace.com/api/v2/settings/objects/{objectId}
Environment ActiveGateCluster ActiveGatehttps://{your-activegate-domain}:9999/e/{your-environment-id}/api/v2/settings/objects/{objectId}

Authentication

To execute this request, you need an access token with settings.write scope.

To learn how to obtain and use it, see Tokens and authentication.

Parameters

Parameter
Type
Description
In
Required
objectId
string

The ID of the required settings object.

path
required
validateOnly
boolean

If true, the request runs only validation of the submitted settings object, without saving it.

query
optional
body

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

body
optional

Request body objects

The SettingsObjectUpdate object

An update of a settings object.

Element
Type
Description
Required
insertAfter
string

The position of the updated object. The new object will be moved behind the specified one.

insertAfter and insertBefore are evaluated together and only one of both can be set.

If null and insertBefore 'null', the existing object keeps the current position.

If set to empty string, the updated object will be placed in the first position.

Only applicable for objects based on schemas with ordered objects (schema's ordered parameter is set to true).

optional
insertBefore
string

The position of the updated object. The new object will be moved in front of the specified one.

insertAfter and insertBefore are evaluated together and only one of both can be set.

If null and insertAfter 'null', the existing object keeps the current position.

If set to empty string, the updated object will be placed in the last position.

Only applicable for objects based on schemas with ordered objects (schema's ordered parameter is set to true).

optional
schemaVersion
string

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

optional
updateToken
string

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.

optional
value
string

The value of the setting.

It defines the actual values of settings' parameters.

The actual content depends on the object's schema.

required

The AnyValue object

A schema representing an arbitrary value type.

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.

{
"insertAfter": "Y2ktaGdyb3VwLTEyMythZjhjOThlOS0wN2I0LTMyMGEtOTQzNi02NTEyMmVlNWY4NGQ=",
"insertBefore": "Y2ktaGdyb3VwLTEyMythZjhjOThlOS0wN2I0LTMyMGEtOTQzNi02NTEyMmVlNWY4NGQ=",
"schemaVersion": "1.0.0",
"updateToken": "Y2ktaGdyb3VwLTEyMythZjhjOThlOS0wN2I0LTMyMGEtOTQzNi02NTEyMmVlNWY4NGQ=",
"value": "string"
}

Response

Response codes

Code
Type
Description
400

Failed. Schema validation failed.

403

Failed. Forbidden.

404

Failed. The requested resource doesn't exist.

409

Failed. Conflicting resource.

4XX

Client side error.

5XX

Server side error.

Response body objects

The SettingsObjectResponse object

The response to a creation- or update-request.

Element
Type
Description
code
integer

The HTTP status code for the object.

error
-
invalidValue
string

The value of the setting.

It defines the actual values of settings' parameters.

The actual content depends on the object's schema.

objectId
string

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

The Error object

Element
Type
Description
code
integer

The HTTP status code

constraintViolations

A list of constraint violations

message
string

The error message

The ConstraintViolation object

A list of constraint violations

Element
Type
Description
location
string
-
message
string
-
parameterLocation
string
-
  • HEADER
  • PATH
  • PAYLOAD_BODY
  • QUERY
path
string
-

The AnyValue object

A schema representing an arbitrary value type.

Response body JSON model

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