Validate a Dynatrace settings property value with a custom validator using the Settings API before you save the settings object it belongs to.
| POST | SaaS | https://{your-environment-id}.apps.dynatrace.com/platform/settings/v1/values/{schema-id}:validate-property |
You use the schema-id path parameter and the required validator-id query parameter to validate one property value with a custom validator of the schema. The optional scope and schema-version query parameters set the context. Typical usage is validating user input in a settings editor while the user types.
To execute this request, you need a platform token or OAuth access token with settings:schemas:read scope. To learn how to obtain and use it, see Tokens and authentication.
| Parameter | Type | Description | In | Required |
|---|---|---|---|---|
| schema-id | string | The ID of the schema. | path | Required |
| scope | string | The ID of the scope. | query | Optional |
| validator-id | string | The identifier of the validator. | query | Required |
| schema-version | string | Version of the schema. | query | Optional |
| body | Custom | The JSON body of the request. Contains the settings object to be validated. | body | Required |
CustomPropertyValidationRequest objectThe request payload for a custom validation of a single property value.
| Element | Type | Description | Required |
|---|---|---|---|
| path | string | The path of the property being validated. | Optional |
| intValue | integer | The property value. | Optional |
| floatValue | number | The property value. | Optional |
| stringValue | string | The property value. | Optional |
| booleanValue | boolean | The property value. | Optional |
| arrayValue | - | The property value. | Optional |
This is a model of the request body, showing the possible elements. It has to be adjusted for usage in an actual request.
{"path": "string","intValue": 1,"floatValue": 1,"stringValue": "string","booleanValue": true,"arrayValue": [{}]}
| Code | Type | Description |
|---|---|---|
| 200 | Validation | Validated. Details in the response body. |
| 404 | - | - |
| 429 | - | - |
| 503 | - | - |
| 4XX | - | - |
| 5XX | - | - |
ValidationResponse object| Element | Type | Description |
|---|---|---|
| valid | boolean | - |
| message | string | - |
| constraintViolations | Violation | - |
ViolationResponse object| Element | Type | Description |
|---|---|---|
| message | string | - |
| path | string | - |
{"valid": true,"message": "string","constraintViolations": [{"message": "string","path": "string"}]}