Validate one validation-rule 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/validation-rules/validate-expression"), Content = new StringContent("{ \"Expression\": \"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/validation-rules/validate-expression';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"Expression":"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/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.
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”Validate one entity validation-rule expression before saving metadata.
object
Boolean validation expression.
Examplegenerated
{ "Expression": "example"}Validate one entity validation-rule expression before saving metadata.
object
Boolean validation expression.
Examplegenerated
{ "Expression": "example"}Validate one entity validation-rule expression before saving metadata.
object
Boolean validation expression.
Examplegenerated
{ "Expression": "example"}Responses
Section titled “Responses”OK
object
Validation-rule expression validation result.
object
Whether the expression is valid.
Validation diagnostics.
Validation-rule expression diagnostic.
object
Request field that produced the error.
Localized diagnostic message.
Resolved field path that failed validation when available.
Offending token when available.
Stable diagnostic 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-rule expression validation result.
object
Whether the expression is valid.
Validation diagnostics.
Validation-rule expression diagnostic.
object
Request field that produced the error.
Localized diagnostic message.
Resolved field path that failed validation when available.
Offending token when available.
Stable diagnostic 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-rule expression validation result.
object
Whether the expression is valid.
Validation diagnostics.
Validation-rule expression diagnostic.
object
Request field that produced the error.
Localized diagnostic message.
Resolved field path that failed validation when available.
Offending token when available.
Stable diagnostic 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 } ]}