Skip to main content
POST
Validate

Authorizations

Authorization
string
header
required

OAuth 2.0 Client Credentials flow. The tokenUrl shown is for the production environment. For other environments, replace prod with the target environment name (e.g., auth.staging.oleria.io for staging).

Body

application/json
query
string
required

The query string to validate and/or execute. Queries above the maximum length are rejected before parsing; real-world queries sit well below the bound.

Required string length: 1 - 100000
Example:

"SELECT account_id, mfa_status FROM oleria_account WHERE mfa_status = :status"

model
string
default:oleria_identity

Name of the semantic model to use for query resolution. Defaults to oleria_identity.

Example:

"oleria_identity"

dialect
enum<string>
default:trino

The SQL dialect used for parsing. Currently only trino is supported. Additional dialects may be added in future versions.

Available options:
trino
Example:

"trino"

format
enum<string>
default:json

Result format of the downloadable file, fixed at submission. json (default) delivers large results as JSON Lines (NDJSON); best for programmatic and AI consumers. csv produces a single comma-separated file with a header row and renders every value as text; best for spreadsheet export and tabular UIs. The inline rows preview is JSON either way (scalar values keep their type). Ignored by /v1/query/validate, which does not execute.

Available options:
json,
csv
Example:

"csv"

parameters
object

Named parameter values for query placeholders. Use :name syntax in the SQL query (e.g., :status, :created_after). Parameter names must match exactly (case-sensitive). Type coercion is automatic: strings are quoted, numbers and booleans are used as-is.

Example:

Response

Query passes validation rules and may proceed.

Result of evaluating the query against validation rules. result indicates whether the query may proceed. Denials return 422 with ErrorResponse.

result
enum<string>
required

Validation outcome. allowed = query passes all validation rules and may proceed.

Available options:
allowed