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:

  1. Horizontal Filtering (WHERE Clause) - Used to filter rows based on conditions.
  2. 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:

# Syntax
GET https://api.portierx.com/v1/core/locking-system?field=operator.value
 
# Example
GET https://api.portierx.com/v1/core/locking-system?status=eq.active
GET https://api.portierx.com/v1/core/locking-system?status=eq.active&name=like.*office*
GET https://api.portierx.com/v1/core/locking-system?status=in.(active,in_review)&name=like.*office*

Supported operators are:

OperatorDescriptionExample
Equality and Inclusion
eqExact match?field=eq.value
neqExcludes values?field=neq.value
inMatch against multiple values?field=in.(value1,value2,value3)
isCheck for NULL values?field=is.null
Numerical Comparison
gtGreater than?field=gt.value
ltLess than?field=lt.value
gteGreater than or equal?field=gte.value
lteLess than or equal?field=lte.value
Pattern Matching
likePattern matching (case-sensitive)?field=like.*substring*
ilikePattern matching (case-insensitive)?field=ilike.*substring*

Vertical Filtering

By default, all fields are returned. To specify which fields to return, use the select parameter:

GET https://api.portierx.com/v1/core/locking-system?select=id,name,status

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:

GET https://api.portierx.com/v1/core/locking-system?search=keyword

The search functionality is case-insensitive and scans across multiple fields relevant to the resource.

On this page