Filters and Search
How to filter and search data using the PortierX API.
Work in progress
We are actively working on our API. The documentation and implementation described here may not yet be fully aligned.
Filtering
Filtering consists of two types:
- Horizontal Filtering (WHERE Clause) - Used to filter rows based on conditions.
- Vertical Filtering (Select Fields) - Used to specify which fields to return.
Horizontal Filtering Operators
By default, all records are included. To filter rows based on conditions, use the following operators in the query string:
Supported operators are:
| Operator | Description | Example |
|---|---|---|
| Equality and Inclusion | ||
eq | Exact match | ?field=eq.value |
neq | Excludes values | ?field=neq.value |
in | Match against multiple values | ?field=in.(value1,value2,value3) |
is | Check for NULL values | ?field=is.null |
| Numerical Comparison | ||
gt | Greater than | ?field=gt.value |
lt | Less than | ?field=lt.value |
gte | Greater than or equal | ?field=gte.value |
lte | Less than or equal | ?field=lte.value |
| Pattern Matching | ||
like | Pattern matching (case-sensitive) | ?field=like.*substring* |
ilike | Pattern matching (case-insensitive) | ?field=ilike.*substring* |
Vertical Filtering
By default, all fields are returned. To specify which fields to return, use the select parameter:
This ensures only the requested fields (id, name, and status) are included in the response.
Searching
To perform a search, use the search keyword in the query string:
The search functionality is case-insensitive and scans across multiple fields relevant to the resource.