Skip to content

Filter Operators

Filters are JSON objects passed to search endpoints. They compose with and, or, and not to form arbitrarily complex queries.

Top-level operators for filtering thogits.

OperatorFormatDescription
search{"search": "text"}Full-text search on name + description (case-insensitive)
name{"name": <TextFilter>}Filter on thogit name
description{"description": <TextFilter>}Filter on description
has_tag{"has_tag": "TagName"} or {"has_tag": "ULID"}Tag presence check (by name or ID)
field predicate{"TagName.field": <FieldFilter>}Field value check using dot notation
reference traversal{"Tag.ref->Target.field": <op>}Follow a reference field, filter the target’s field
and{"and": [f1, f2, ...]}All conditions must match
or{"or": [f1, f2, ...]}Any condition can match
not{"not": <filter>}Negation
{ "search": "schema validation" }

Matches thogits whose name or description contains “schema validation”.


Used with name and description fields on both ThogitFilter and TagFilter.

OperatorFormatDescription
eq{"eq": "text"}Exact string match
neq{"neq": "text"}Not equal to
gt{"gt": "text"}Lexicographically greater than
gte{"gte": "text"}Lexicographically greater than or equal
lt{"lt": "text"}Lexicographically less than
lte{"lte": "text"}Lexicographically less than or equal
regex{"regex": "^pattern$"}ECMAScript regular expression match
// Thogits whose name equals exactly "Sprint 12"
{ "name": { "eq": "Sprint 12" } }
// Thogits whose name matches a regex
{ "name": { "regex": "^2024-" } }
// Thogits whose description matches a regex
{ "description": { "regex": "^\\[DRAFT\\]" } }

Used in field predicates ("TagName.field": <FieldFilter>). The available operators depend on the field’s schema type.

A bare value (not wrapped in an operator object) is shorthand for eq:

ValueEquivalentApplicable types
"text"{"eq": "text"}String, Select
42{"eq": 42}Number
true{"eq": true}Boolean
null{"exists": false}All types
// These are equivalent:
{ "Project.priority": 3 }
{ "Project.priority": { "eq": 3 } }
OperatorFormatDescription
eq{"eq": value}Equal to
neq{"neq": value}Not equal to
gt{"gt": value}Greater than
gte{"gte": value}Greater than or equal
lt{"lt": value}Less than
lte{"lte": value}Less than or equal

Works with: String (lexicographic), Number, Date, Select/MultiSelect (ordinal by variant position)

// Numbers
{ "Project.story_points": { "gt": 5 } }
// Dates
{ "Project.due_date": { "lt": "2024-12-31" } }
// Date range (combine with and)
{ "and": [
{ "Project.due_date": { "gte": "2024-01-01" } },
{ "Project.due_date": { "lte": "2024-12-31" } }
]}
// Select ordinal comparison (by position in variants array)
{ "Project.status": { "gte": "InProgress" } }
OperatorFormatDescription
regex{"regex": "pattern"}ECMAScript regular expression match

Works with: String, Select (matches variant name), MultiSelect (matches any variant name)

{ "Project.name": { "regex": "^API-" } }
OperatorFormatDescription
exists{"exists": true}Field value is present and not null
exists{"exists": false}Field value is null or missing

Works with: All field types

// Thogits where due_date is set
{ "Project.due_date": { "exists": true } }
// Thogits where due_date is not set (equivalent to bare null)
{ "Project.due_date": { "exists": false } }
{ "Project.due_date": null }
OperatorFormatDescription
in{"in": [v1, v2, ...]}Value is one of the given values

Works with: String, Number, Select (matches variant name), MultiSelect (matches any variant name)

{ "Project.story_points": { "in": [1, 2, 3, 5, 8] } }
OperatorStringNumberBooleanDateReferenceSelectMultiSelect
eqYesYesYesYesYes (name)Yes (name)
neqYesYesYesYesYes (name)Yes (name)
gt / gteYesYesYesYes (ordinal)Yes (ordinal)
lt / lteYesYesYesYes (ordinal)Yes (ordinal)
regexYesYes (name)Yes (name)
inYesYesYes (name)Yes (name)
existsYesYesYesYesYesYesYes

Used to filter tags (e.g., in tag search endpoints).

OperatorFormatDescription
search{"search": "text"}Full-text search on tag name + description
name{"name": <TextFilter>}Filter on tag name (uses TextFilter operators)
description{"description": <TextFilter>}Filter on tag description
and{"and": [f1, f2, ...]}All conditions must match
or{"or": [f1, f2, ...]}Any condition can match
not{"not": <filter>}Negation
// Tags whose name equals "project"
{ "name": { "eq": "project" } }
// Tags with "tracker" in name or description
{ "search": "tracker" }
// Combine filters
{ "and": [
{ "name": { "regex": "^Project" } },
{ "not": { "name": { "eq": "Project Archive" } } }
]}

All filter types support and, or, and not for arbitrary nesting.

CombinatorBehavior
andAll child filters must match. Short-circuits on first failure.
orAt least one child filter must match. Short-circuits on first success.
notInverts the child filter.
{
"and": [
{ "has_tag": "Task" },
{ "not": { "Task.status": { "eq": "Done" } } },
{ "or": [
{ "Task.priority": { "gte": 3 } },
{ "Task.labels": { "in": ["Urgent"] } }
]}
]
}