Skip to content

Validate one validation-rule expression before saving metadata.

POST
/api/workspace/admin/entity-definitions/{entityDefinitionId}/validation-rules/validate-expression
curl --request POST \
--url https://example.com/api/workspace/admin/entity-definitions/example/validation-rules/validate-expression \
--header 'Content-Type: application/json' \
--data '{ "Expression": "example" }'

Returns structured errors with token positions without saving anything. Expression syntax: validation rule expressions.

  • None
entityDefinitionId
required
string
access_token
string

Optional access token for clients that cannot set Authorization headers. Prefer Authorization: Bearer <token> when possible.

Validate one entity validation-rule expression before saving metadata.

object
Expression
required

Boolean validation expression.

string
Examplegenerated
{
"Expression": "example"
}

OK

Media typeapplication/json
object
Data

Validation-rule expression validation result.

object
Valid

Whether the expression is valid.

boolean
Errors

Validation diagnostics.

Array<object>
nullable

Validation-rule expression diagnostic.

object
Field

Request field that produced the error.

string
nullable
Message

Localized diagnostic message.

string
nullable
FieldPath

Resolved field path that failed validation when available.

string
nullable
Token

Offending token when available.

string
nullable
Code

Stable diagnostic code.

string
nullable
Start

Zero-based start offset in the submitted expression when available.

integer format: int32
nullable
End

Zero-based end offset in the submitted expression when available.

integer format: int32
nullable
Errors
Array<object>
nullable
object
Code
required
string
nullable
Message
required
string
nullable
Target
string
nullable
Field
string
nullable
Metadata
object
key
additional properties
string
nullable
Type
integer format: int32
Allowed values: 0 1 2
Severity
integer format: int32
Allowed values: 0 1 2
Warnings
Array<object>
nullable
object
Code
required
string
nullable
Message
required
string
nullable
Target
string
nullable
Field
string
nullable
Metadata
object
key
additional properties
string
nullable
Type
integer format: int32
Allowed values: 0 1 2
Severity
integer format: int32
Allowed values: 0 1 2
Success
boolean
Example
{
"Errors": [
{
"Type": 0,
"Severity": 0
}
],
"Warnings": [
{
"Type": 0,
"Severity": 0
}
]
}

Bad Request

Media typeapplication/json
object
Data

Validation-rule expression validation result.

object
Valid

Whether the expression is valid.

boolean
Errors

Validation diagnostics.

Array<object>
nullable

Validation-rule expression diagnostic.

object
Field

Request field that produced the error.

string
nullable
Message

Localized diagnostic message.

string
nullable
FieldPath

Resolved field path that failed validation when available.

string
nullable
Token

Offending token when available.

string
nullable
Code

Stable diagnostic code.

string
nullable
Start

Zero-based start offset in the submitted expression when available.

integer format: int32
nullable
End

Zero-based end offset in the submitted expression when available.

integer format: int32
nullable
Errors
Array<object>
nullable
object
Code
required
string
nullable
Message
required
string
nullable
Target
string
nullable
Field
string
nullable
Metadata
object
key
additional properties
string
nullable
Type
integer format: int32
Allowed values: 0 1 2
Severity
integer format: int32
Allowed values: 0 1 2
Warnings
Array<object>
nullable
object
Code
required
string
nullable
Message
required
string
nullable
Target
string
nullable
Field
string
nullable
Metadata
object
key
additional properties
string
nullable
Type
integer format: int32
Allowed values: 0 1 2
Severity
integer format: int32
Allowed values: 0 1 2
Success
boolean
Example
{
"Errors": [
{
"Type": 0,
"Severity": 0
}
],
"Warnings": [
{
"Type": 0,
"Severity": 0
}
]
}

Forbidden

Media typeapplication/json
object
type
string
nullable
title
string
nullable
status
integer format: int32
nullable
detail
string
nullable
instance
string
nullable
key
additional properties
Examplegenerated
{
"type": "example",
"title": "example",
"status": 1,
"detail": "example",
"instance": "example"
}

Not Found

Media typeapplication/json
object
Data

Validation-rule expression validation result.

object
Valid

Whether the expression is valid.

boolean
Errors

Validation diagnostics.

Array<object>
nullable

Validation-rule expression diagnostic.

object
Field

Request field that produced the error.

string
nullable
Message

Localized diagnostic message.

string
nullable
FieldPath

Resolved field path that failed validation when available.

string
nullable
Token

Offending token when available.

string
nullable
Code

Stable diagnostic code.

string
nullable
Start

Zero-based start offset in the submitted expression when available.

integer format: int32
nullable
End

Zero-based end offset in the submitted expression when available.

integer format: int32
nullable
Errors
Array<object>
nullable
object
Code
required
string
nullable
Message
required
string
nullable
Target
string
nullable
Field
string
nullable
Metadata
object
key
additional properties
string
nullable
Type
integer format: int32
Allowed values: 0 1 2
Severity
integer format: int32
Allowed values: 0 1 2
Warnings
Array<object>
nullable
object
Code
required
string
nullable
Message
required
string
nullable
Target
string
nullable
Field
string
nullable
Metadata
object
key
additional properties
string
nullable
Type
integer format: int32
Allowed values: 0 1 2
Severity
integer format: int32
Allowed values: 0 1 2
Success
boolean
Example
{
"Errors": [
{
"Type": 0,
"Severity": 0
}
],
"Warnings": [
{
"Type": 0,
"Severity": 0
}
]
}