Skip to content

Filter Syntax Documentation#

This document describes the filter syntax used in the API for filtering query results. The filter syntax allows you to create complex queries to find exactly the data you need.

Basic Syntax#

The filter syntax follows a simple pattern:

field operator value

For example:

name EQ John
status NE deleted
age GT 18

Multiple conditions can be combined using AND or OR connectives:

field1 operator1 value1 AND field2 operator2 value2
field1 operator1 value1 OR field2 operator2 value2

For example:

status EQ active AND age GT 18
status EQ pending OR status EQ processing

Nested Properties#

You can filter on nested properties using dot notation to access fields within related objects:

relationships.objectId EQ 630f793d5e87014d50ffa457
user.profile.age GT 18
address.city EQ 'New York'

This is particularly useful when: - Filtering on related entity properties - Accessing nested object fields - Querying through relationship references

For example:

// Filter users by their department name
department.name EQ 'Engineering'

// Filter orders by customer's country
customer.address.country EQ 'USA'

// Filter tasks by project status
project.status EQ 'Active'

Note: When using nested properties: - The dot notation (.) is used to access nested fields - All parts of the path must exist for the filter to match - The same operators can be used with nested properties as with regular fields

Supported Operators#

The following operators are available for filtering:

Comparison Operators#

Operator Description Example Works with
EQ Equals name EQ John All types
NE Not equals status NE deleted All types
GT Greater than age GT 18 Numbers, Dates, Times
GTE Greater than or equals price GTE 100 Numbers, Dates, Times
LT Less than quantity LT 10 Numbers, Dates, Times
LTE Less than or equals stock LTE 5 Numbers, Dates, Times

Text Operators#

Operator Description Example Works with
SW Starts with name SW Jo Strings
EW Ends with email EW @example.com Strings
MATCH Matches a regular expression phone MATCH ^\+[0-9]+$ Strings
CO Contains description CO important Strings
NC Not contains message NC error Strings

List Operators#

Operator Description Example Works with
IN In (list of values) status IN [active,pending] All types
NIN Not in (list of values) category NIN [archived,deleted] All types

Special Operators#

Operator Description Example Works with
RANGE Value is within a range (inclusive) price RANGE [10,100] Numbers, Dates, Times
EMPTY Field is empty notes EMPTY All types
NEMPTY Field is not empty description NEMPTY All types
ISME Field is current user assignedTo ISME User references
NISME Field is not current user createdBy NISME User references

Examples#

Simple Queries#

name EQ John Doe
status EQ active
age GT 18

Multiple Conditions#

status EQ active AND age GT 18 AND country EQ US
status EQ pending OR status EQ processing

List Values#

category IN [electronics,clothing,books]
status NIN [archived,deleted]

Range Values#

price RANGE [10,100]
date RANGE [2023-01-01,2023-12-31]

Empty/Non-empty Checks#

description NEMPTY AND notes EMPTY

User-specific Filters#

assignedTo ISME OR createdBy ISME

Notes#

  1. String values should be enclosed in single quotes
  2. List values should be enclosed in square brackets and comma-separated
  3. Range values should be enclosed in square brackets with two comma-separated values
  4. The default connective is AND if not specified
  5. Field names are case-sensitive and should match the entity's field names
  6. Date/time values should be in ISO 8601 format