Raw schema
{
"type": "object",
"properties": {
"table_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"columns": {
"minItems": 1,
"maxItems": 20,
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 128,
"pattern": "^[A-Za-z_][A-Za-z0-9_]*$"
}
},
"filters": {
"default": [],
"maxItems": 8,
"type": "array",
"items": {
"type": "object",
"properties": {
"column": {
"type": "string",
"minLength": 1,
"maxLength": 128,
"pattern": "^[A-Za-z_][A-Za-z0-9_]*$"
},
"operator": {
"type": "string",
"enum": [
"eq",
"neq",
"in",
"gt",
"gte",
"lt",
"lte",
"is_null",
"is_not_null"
]
},
"value": {
"anyOf": [
{
"anyOf": [
{
"type": "string",
"maxLength": 2048
},
{
"type": "number"
},
{
"type": "boolean"
},
{
"type": "null"
}
]
},
{
"minItems": 1,
"maxItems": 20,
"type": "array",
"items": {
"anyOf": [
{
"type": "string",
"maxLength": 2048
},
{
"type": "number"
},
{
"type": "boolean"
},
{
"type": "null"
}
]
}
}
]
}
},
"required": [
"column",
"operator"
],
"additionalProperties": false
}
},
"order_by": {
"default": [],
"maxItems": 2,
"type": "array",
"items": {
"type": "object",
"properties": {
"column": {
"type": "string",
"minLength": 1,
"maxLength": 128,
"pattern": "^[A-Za-z_][A-Za-z0-9_]*$"
},
"direction": {
"type": "string",
"enum": [
"asc",
"desc"
]
}
},
"required": [
"column",
"direction"
],
"additionalProperties": false
}
},
"aggregates": {
"default": [],
"maxItems": 4,
"type": "array",
"items": {
"type": "object",
"properties": {
"function": {
"type": "string",
"enum": [
"count",
"min",
"max",
"sum",
"avg"
]
},
"column": {
"type": "string",
"minLength": 1,
"maxLength": 128,
"pattern": "^[A-Za-z_][A-Za-z0-9_]*$"
},
"as": {
"type": "string",
"minLength": 1,
"maxLength": 128,
"pattern": "^[A-Za-z_][A-Za-z0-9_]*$"
}
},
"required": [
"function"
],
"additionalProperties": false
}
},
"limit": {
"default": 25,
"type": "integer",
"minimum": 1,
"maximum": 100
}
},
"required": [
"table_id",
"columns"
],
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false
}