v7

latestOpenAPI 3.0.3raw.githubusercontent.com2026-08-013764062.2 MB
Features

Validate constraint

Validates a constraint definition. Checks whether the context field exists and whether the applied configuration is valid. Additional properties are not allowed on data objects that you send to this endpoint.

post/api/admin/constraints/validate

Request body

contextNamestring required

The name of the context field that this constraint should apply to.

operator'NOT_IN' | 'IN' | 'STR_ENDS_WITH' | 'STR_STARTS_WITH' | 'STR_CONTAINS' | 'NUM_EQ' | 'NUM_GT' | 'NUM_GTE' | 'NUM_LT' | 'NUM_LTE' | 'DATE_AFTER' | 'DATE_BEFORE' | 'SEMVER_EQ' | 'SEMVER_GT' | 'SEMVER_LT' | 'SEMVER_GTE' | 'SEMVER_LTE' | 'REGEX' required

The operator to use when evaluating this constraint. For more information about the various operators, refer to the strategy constraint operator documentation.

caseInsensitiveboolean

Whether the operator should be case sensitive or not. Defaults to false (being case sensitive).

invertedboolean

Whether the result should be negated or not. If true, will turn a true result into a false result and vice versa.

valuesstring[]

The context values that should be used for constraint evaluation. Use this property instead of value for properties that accept multiple values.

valuestring

The context value that should be used for constraint evaluation. Use this property instead of values for properties that only accept single values.

Example request

{
  "contextName": "appName",
  "operator": "IN",
  "values": [
    "my-app",
    "my-other-app"
  ],
  "value": "my-app"
}

Response

The constraint is valid