Skip to main content
Filters are used anywhere you want ZangTable to select matching rows instead of working with every row in a table. The most common places are:
  • Listing records, for example “only active recipes” or “orders for customer 42”.
  • Bulk updating records, for example “archive every draft older than January 1”.
  • Bulk deleting records, for example “delete rows where deleted_at is already set”.
  • Creating exports that include only matching rows.

Shared validation

FieldRule
{project}Project slug / Project ID: ^[a-z0-9_-]+$, normalized to lowercase
{table} / {column} / {index}Names use ^[A-Za-z][A-Za-z0-9_]*$; some endpoints also accept numeric IDs where documented
column_typeINTEGER, REAL, TEXT, BLOB, ANY; omitted column types default to TEXT
Boolean-like fieldsbooleans, integer 1, or strings 1, true, yes, on count as true; other values count as false

Simple filter object

Use this when every condition is an exact match.
{"status":"active","owner_id":42}
Common usage:
curl "$BASE_URL/projects/$PROJECT/records/recipes?filters=%7B%22status%22%3A%22active%22%7D" \
  -H "Authorization: Bearer $ZANGTABLE_TOKEN"

Condition array

Use this when you need operators like greater-than, like, in, or null checks.
[
  {"column":"status","op":"=","value":"active"},
  {"column":"created_at","op":">=","value":"2026-01-01"},
  {"column":"tag","op":"in","value":["dinner","dessert"]},
  {"column":"deleted_at","op":"is_null"}
]
Supported operators: =, !=, >, >=, <, <=, like, in, is_null, not_null.

Bulk update example

curl -X PATCH "$BASE_URL/projects/$PROJECT/records/recipes" \
  -H "Authorization: Bearer $ZANGTABLE_TOKEN" \
  -H "Content-Type: application/json" \
  --data '{
    "data": {"status":"archived"},
    "where": [
      {"column":"status","op":"=","value":"draft"},
      {"column":"updated_at","op":"<","value":"2026-01-01"}
    ]
  }'
Use condition arrays for precise updates/deletes. Use the simple object format for everyday exact-match filtering.