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

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

Only run validation but do not persist the object even if validation was successful

query optional
body

The requests for persisting settings values

body optional

Body format

The PersistObjectRequest object

A request to persist a settings object

Element Type Description Required
insertAfter string

Only considered if the setting has ordered objects. The objectId after which a new entry should be inserted. If undefined and the setting has ordered instances it will be appended in last position. If defined but empty the object will be placed as the first item.

optional
schemaVersion string

The schema version used to create this object. If omitted the latest known version is used

optional
scope string

The scope this value will be defined and persisted at

required
schemaId string

The schema for which the values are valid

required
value SettingsValue required

The SettingsValue object

A single value to be written to the settings. Its content depends on the schema defined for this type of setting.

Response

Response codes

Code Description
200

Success

207

Multi-Status, if not all requests resulted in the same status

400

Schema validation failed

404

Failed. The requested resource doesn't exist.

409

Conflicting resource

Response body

The SettingsObjectErrorResponse object

The response to a failed settings object request

Element Type Description
invalidValue SettingsValue
error Error
code integer

The HTTP Status code

The Error object

Element Type Description
constraintViolations ConstraintViolation[]
message string
code integer

The ConstraintViolation object

Element Type Description
parameterLocation string
location string
message string
path string

The SettingsValue object

A single value to be written to the settings. Its content depends on the schema defined for this type of setting.

Element Type Description

The SettingsObjectResponse object

The response to a successful settings object request

Element Type Description
objectId string

The identifier of the new settings object

code integer

The HTTP Status code