Creates a new settings object or validates the provided settings object.
The request consumes and produces an application/json
payload.
POST | ManagedDynatrace for Government | https://{your-domain}/e/{your-environment-id}/api/v2/settings/objects |
Environment and Cluster ActiveGate (default port 9999) | https://{your-activegate-domain}:9999/e/{your-environment-id}/api/v2/settings/objects |
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.
Parameter | Type | Description | In | Required |
---|---|---|---|---|
validateOnly | boolean | If | query | optional |
adminAccess | 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 |
body | Settings | The JSON body of the request. Contains the settings objects. | body | optional |
RequestBody
objectSettingsObjectCreate
objectConfiguration of a new settings object.
Element | Type | Description | Required |
---|---|---|---|
externalId | string | External identifier for the object being created | optional |
insertAfter | string | The position of the new object. The new object will be added after the specified one. If If set to an empty string, the new object will be placed in the first position. Only applicable for objects based on schemas with ordered objects (schema's | optional |
objectId | string | The ID of the settings object that should be replaced. Only applicable if an external identifier is provided. | optional |
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 that the object targets. For more details, please see Dynatrace Documentation. | required |
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 |
AnyValue
objectA schema representing an arbitrary value type.
This is a model of the request body, showing the possible elements. It has to be adjusted for usage in an actual request.
[{"externalId": "string","insertAfter": "Y2ktaGdyb3VwLTEyMythZjhjOThlOS0wN2I0LTMyMGEtOTQzNi02NTEyMmVlNWY4NGQ=","objectId": "Y2ktaGdyb3VwLTEyMythZjhjOThlOS0wN2I0LTMyMGEtOTQzNi02NTEyMmVlNWY4NGQ=","schemaId": "builtin:container.built-in-monitoring-rule","schemaVersion": "1.0.0","scope": "HOST-D3A3C5A146830A79","value": "string"}]
Code | Type | Description |
---|---|---|
200 | Settings | Success |
207 | Settings | Multi-status: different objects in the payload resulted in different statuses. |
400 | Settings | Failed. Schema validation failed. |
403 | Error | Failed. Forbidden. |
404 | Settings | Failed. The requested resource doesn't exist. |
409 | Settings | Failed. Conflicting resource. |
4XX | Error | Client side error. |
5XX | Error | Server side error. |
ResponseBody
objectSettingsObjectResponse
objectThe response to a creation- or update-request.
Element | Type | Description |
---|---|---|
code | integer | The HTTP status code for the object. |
error | 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. |
Error
objectElement | Type | Description |
---|---|---|
code | integer | The HTTP status code |
constraintViolations | Constraint | A list of constraint violations |
message | string | The error message |
ConstraintViolation
objectA list of constraint violations
Element | Type | Description |
---|---|---|
location | string | - |
message | string | - |
parameterLocation | string | -
|
path | string | - |
AnyValue
objectA schema representing an arbitrary value type.
[{"code": 1,"error": {"code": 1,"constraintViolations": [{"location": "string","message": "string","parameterLocation": "HEADER","path": "string"}],"message": "string"},"invalidValue": "string","objectId": "Y2ktaGdyb3VwLTEyMythZjhjOThlOS0wN2I0LTMyMGEtOTQzNi02NTEyMmVlNWY4NGQ="}]