Validate one rule or template expression before saving metadata.
using System.Net.Http.Headers;var client = new HttpClient();var request = new HttpRequestMessage{ Method = HttpMethod.Post, RequestUri = new Uri("https://example.com/api/workspace/admin/entity-definitions/example/rule-expressions/validate"), Content = new StringContent("{ \"ExpressionType\": 0, \"ContextType\": 0, \"EntityDefinitionTableId\": \"example\", \"Value\": \"example\", \"PendingRootFieldKey\": \"example\", \"PendingRootFieldType\": 0, \"PendingRootAllowMultiple\": true, \"PendingRootReferenceToEntityDefinitionId\": \"example\" }") { Headers = { ContentType = new MediaTypeHeaderValue("application/json") } }};using (var response = await client.SendAsync(request)){ response.EnsureSuccessStatusCode(); var body = await response.Content.ReadAsStringAsync(); Console.WriteLine(body);}const url = 'https://example.com/api/workspace/admin/entity-definitions/example/rule-expressions/validate';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"ExpressionType":0,"ContextType":0,"EntityDefinitionTableId":"example","Value":"example","PendingRootFieldKey":"example","PendingRootFieldType":0,"PendingRootAllowMultiple":true,"PendingRootReferenceToEntityDefinitionId":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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.
Authorizations
Section titled “Authorizations”- None
Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Query Parameters
Section titled “Query Parameters”Optional access token for clients that cannot set Authorization headers. Prefer Authorization: Bearer <token> when possible.
Request Body
Section titled “Request Body”Request payload used to validate a Moltaro rule expression before saving metadata.
object
Target table identifier for field behavior expressions.
Raw expression value to validate.
Unsaved root field key that should be treated as available during field-behavior validation.
Whether the unsaved root field stores multiple values.
Reference target definition for an unsaved root reference field.
Request payload used to validate a Moltaro rule expression before saving metadata.
object
Target table identifier for field behavior expressions.
Raw expression value to validate.
Unsaved root field key that should be treated as available during field-behavior validation.
Whether the unsaved root field stores multiple values.
Reference target definition for an unsaved root reference field.
Request payload used to validate a Moltaro rule expression before saving metadata.
object
Target table identifier for field behavior expressions.
Raw expression value to validate.
Unsaved root field key that should be treated as available during field-behavior validation.
Whether the unsaved root field stores multiple values.
Reference target definition for an unsaved root reference field.
Responses
Section titled “Responses”OK
object
Validation result for a Moltaro rule expression.
object
Whether the submitted expression is valid in the requested context.
Validation errors when the expression is invalid.
One validation error returned for a Moltaro rule expression.
object
Localized validation message.
Resolved field path that failed validation when available.
Offending token when available.
Stable validation code.
Zero-based start offset in the submitted expression when available.
Zero-based end offset in the submitted expression when available.
object
object
object
object
Example
{ "Errors": [ { "Type": 0, "Severity": 0 } ], "Warnings": [ { "Type": 0, "Severity": 0 } ]}Bad Request
object
Validation result for a Moltaro rule expression.
object
Whether the submitted expression is valid in the requested context.
Validation errors when the expression is invalid.
One validation error returned for a Moltaro rule expression.
object
Localized validation message.
Resolved field path that failed validation when available.
Offending token when available.
Stable validation code.
Zero-based start offset in the submitted expression when available.
Zero-based end offset in the submitted expression when available.
object
object
object
object
Example
{ "Errors": [ { "Type": 0, "Severity": 0 } ], "Warnings": [ { "Type": 0, "Severity": 0 } ]}Forbidden
object
Examplegenerated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example"}Not Found
object
Validation result for a Moltaro rule expression.
object
Whether the submitted expression is valid in the requested context.
Validation errors when the expression is invalid.
One validation error returned for a Moltaro rule expression.
object
Localized validation message.
Resolved field path that failed validation when available.
Offending token when available.
Stable validation code.
Zero-based start offset in the submitted expression when available.
Zero-based end offset in the submitted expression when available.
object
object
object
object
Example
{ "Errors": [ { "Type": 0, "Severity": 0 } ], "Warnings": [ { "Type": 0, "Severity": 0 } ]}