Skip to content

Validate one rule or template expression before saving metadata.

POST
/api/workspace/admin/entity-definitions/{entityDefinitionId}/rule-expressions/validate
curl --request POST \
--url https://example.com/api/workspace/admin/entity-definitions/example/rule-expressions/validate \
--header 'Content-Type: application/json' \
--data '{ "ExpressionType": 0, "ContextType": 0, "EntityDefinitionTableId": "example", "Value": "example", "PendingRootFieldKey": "example", "PendingRootFieldType": 0, "PendingRootAllowMultiple": true, "PendingRootReferenceToEntityDefinitionId": "example" }'

Checks field behavior, presentation, and statement expressions without saving anything and returns structured errors with token positions. Expression syntax: expression language reference.

  • None
entityDefinitionId
required
string
access_token
string

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

Request payload used to validate a Moltaro rule expression before saving metadata.

object
ExpressionType
integer format: int32
Allowed values: 0 1
ContextType
integer format: int32
Allowed values: 0 1 2 3
EntityDefinitionTableId

Target table identifier for field behavior expressions.

string
nullable
Value

Raw expression value to validate.

string
nullable
PendingRootFieldKey

Unsaved root field key that should be treated as available during field-behavior validation.

string
nullable
PendingRootFieldType
integer format: int32
Allowed values: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
PendingRootAllowMultiple

Whether the unsaved root field stores multiple values.

boolean
nullable
PendingRootReferenceToEntityDefinitionId

Reference target definition for an unsaved root reference field.

string
nullable

OK

Media typeapplication/json
object
Data

Validation result for a Moltaro rule expression.

object
IsValid

Whether the submitted expression is valid in the requested context.

boolean
Errors

Validation errors when the expression is invalid.

Array<object>
nullable

One validation error returned for a Moltaro rule expression.

object
Message

Localized validation message.

string
nullable
FieldPath

Resolved field path that failed validation when available.

string
nullable
Token

Offending token when available.

string
nullable
Code

Stable validation 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 result for a Moltaro rule expression.

object
IsValid

Whether the submitted expression is valid in the requested context.

boolean
Errors

Validation errors when the expression is invalid.

Array<object>
nullable

One validation error returned for a Moltaro rule expression.

object
Message

Localized validation message.

string
nullable
FieldPath

Resolved field path that failed validation when available.

string
nullable
Token

Offending token when available.

string
nullable
Code

Stable validation 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 result for a Moltaro rule expression.

object
IsValid

Whether the submitted expression is valid in the requested context.

boolean
Errors

Validation errors when the expression is invalid.

Array<object>
nullable

One validation error returned for a Moltaro rule expression.

object
Message

Localized validation message.

string
nullable
FieldPath

Resolved field path that failed validation when available.

string
nullable
Token

Offending token when available.

string
nullable
Code

Stable validation 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
}
]
}