Filter Syntax
oikapi uses function-based filter syntax in URL query parameters.
GET /api/apps/{app}/tables/{table}/records?filter=eq(status,'active')Comparison operators
Section titled “Comparison operators”| Operator | Description | Example |
|---|---|---|
eq | Equal | eq(status,'active') |
ne | Not equal | ne(status,'canceled') |
gt | Greater than | gt(budget,5000) |
gte | Greater or equal | gte(priority,3) |
lt | Less than | lt(due_date,'2025-12-31') |
lte | Less or equal | lte(budget,100000) |
like | Pattern match (case-sensitive) | like(name,'%acme%') |
ilike | Pattern match (case-insensitive) | ilike(name,'%acme%') |
contains | Substring (case-insensitive) | contains(name,'acme') |
not_contains | Does not contain substring | not_contains(name,'test') |
starts_with | Starts with (case-insensitive) | starts_with(name,'acme') |
ends_with | Ends with (case-insensitive) | ends_with(name,'inc') |
in | In set | in(status,['active','draft']) |
not_in | Not in set | not_in(status,['canceled']) |
between | Range | between(budget,1000,5000) |
is_null | Is null | is_null(deleted_at) |
is_not_null | Is not null | is_not_null(assigned_to) |
Aliases: isnull for is_null, isnotnull or not_null for is_not_null.
Logical operators
Section titled “Logical operators”Combine conditions with and, or, and not:
# AND?filter=and(eq(status,'active'),gt(budget,5000))
# OR?filter=or(eq(priority,'high'),eq(priority,'critical'))
# NOT?filter=not(eq(status,'canceled'))
# Nested?filter=or( eq(priority,'high'), and( eq(status,'open'), lt(due_date,'2025-12-31') ))Array operators
Section titled “Array operators”| Operator | Description | Example |
|---|---|---|
array_contains | Array includes value | array_contains(tags,'urgent') |
array_overlaps | Arrays share any element | array_overlaps(tags,['urgent','bug']) |
array_empty | Array is empty | array_empty(tags) |
array_not_empty | Array is not empty | array_not_empty(tags) |
Date operators
Section titled “Date operators”| Operator | Description | Example |
|---|---|---|
date_after_days_ago | Within last N days | date_after_days_ago(created_at,7) |
date_before_days_ago | Older than N days | date_before_days_ago(created_at,30) |
date_in_range | Within a named range | date_in_range(due_date,'this_month') |
date_in_range takes a named-range keyword as its second argument. Valid keywords: today, yesterday, this_week, last_week, this_month, last_month, this_quarter, last_quarter, this_year, last_year.
- String values must be quoted:
eq(status,'active') - Numeric values are unquoted:
gt(budget,5000) - Date values are strings:
lt(due_date,'2025-12-31') - Use
containsfor case-insensitive text searches - Combine
is_null/is_not_nullto filter on optional fields