Settings API - POST an object

Creates a new settings object or validates the provided settings object.

The request consumes and produces an application/json payload.

Early Adopter

This request is an Early Adopter release and may be changed in non-compatible way.

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

Authentication

To execute this request, you need the Write settings (settings.write) permission assigned to your API token. To learn how to obtain and use it, see Tokens and authentication.

Parameters

Parameter Type Description In Required
validateOnly boolean

If true, the request runs only validation of the submitted settings objects, without saving them.

query optional
body

The JSON body of the request. Contains the settings objects.

body optional

Body format

The SettingsObjectCreate object

Configuration of a new settings object.

Element Type Description Required
schemaVersion string

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

optional
insertAfter string

The position of the new object. The new object will be added after the specified one.

If null, the new object will be placed in the last position.

If set to empty string, the new 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
scope string

The scope that the object targets.

required
schemaId string

The schema on which the object is based.

required
value SettingsValue required

The SettingsValue object

The value of the setting.

It defines the actual values of settings' parameters.

The actual content depends on the object's schema.

Response

Response codes

Code Description
200

Success

207

Multi-status: different objects in the payload resulted in different statuses.

400

Failed. Schema validation failed.

404

Failed. The requested resource doesn't exist.

409

Failed. Conflicting resource.

Response body

The SettingsObjectResponse object

The response to a creation- or update-request.

Element Type Description
invalidValue SettingsValue
objectId string

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

code integer

The HTTP status code for the object.

error Error

The Error object

Element Type Description
constraintViolations ConstraintViolation[]

A list of constraint violations

message string

The error message

code integer

The HTTP status code

The ConstraintViolation object

A list of constraint violations

Element Type Description
parameterLocation string
location string
message string
path string

The SettingsValue object

The value of the setting.

It defines the actual values of settings' parameters.

The actual content depends on the object's schema.

Element Type Description