Exto
API Status
  • Introduction
  • Architecture
    • Microservice Architecture
    • Security
  • Release Cycle
  • Integration
    • Best Practices
    • Endpoints
    • Response Format
    • Error
    • Data Formats
    • Data API
      • Generate API Key
      • API
      • ID/Access Token
      • Azure API Gateway
      • Filter Master Record/Custom Module Records
  • Installation
    • Installing Exto on Kubernetes
      • Prerequisite
      • Installing Exto
        • Setup
        • Configuration
        • Installation
        • Purging
      • Tips and Tricks
        • AKS to use existing storage account
        • AKS with Application Gateway Ingress Controller
        • AKS Private Cluster
Powered by GitBook
On this page
  • API Example for Master Record
  • API Example for Module Record
  • Filter Syntax
  • Supported Operators and Examples
  • Combining AND and OR Conditions
  • Examples of Filter Usage
  • Important Notes
  • Common Use Cases
  • Summary

Was this helpful?

  1. Integration
  2. Data API

Filter Master Record/Custom Module Records

The filter query parameter allows you to retrieve specific records by applying conditional expressions on fields. It supports filtering on numeric, string, date, and primitive fields using various operators. The filter supports AND and OR logical operators to create complex queries. When filtering on DATE fields, you must pass the localTimeZone query parameter. Without this, the system may not return the correct records because of timezone differences in date comparison. localTimeZone must be in IANA timezone format (Example: America/Los_Angeles)

API Example for Master Record

GET /api/v1/master-record/{masterName}?pageSize=1000&page=1&filter=serial_number:eq:1234

API Example for Module Record

GET /api/v1/module-record/{moduleName}?pageSize=1000&page=1&filter=number2:gt:2:and:email_id:cn:john

Filter Syntax

fieldName:fieldType:operator:value
  • fieldName: Field to filter on.

  • fieldType: Supported field types: NUMBER, STRING, DATE PRIMITIVE

  • operator: Comparison operator (explained below).

  • value: Value to compare against.

Combining Conditions with:

  • AND

  • OR

number1:eq:6:and:number2:eq:1:or:contact:eq:1234

Translates to: (number1 = 6 AND number2 = 1) OR (contact = 1234)

Supported Operators and Examples

Data Type
Operator
Meaning/Usage
Example

NUMBER

eq

Equals

number_field:eq:1234

NUMBER

ne

Not Equals

number_field:ne:4

NUMBER

ge

Greater than or equal

number_field:ge:2

NUMBER

gt

Greater than

number_field:gt:2

NUMBER

le

Less than or equal

number_field:le:2

NUMBER

lt

Less than

number_field:lt:2

NUMBER

eq:null

Field is blank

number_field:eq:null

NUMBER

ne:null

Field is not blank

number_field:ne:null

STRING

eq

Equals

email_id:eq:abc@xyz.com

STRING

cn

Contains

email_id:cn:m

STRING

sw

Starts With

email_id:sw:d

STRING

ew

Ends With

email_id:ew:m

STRING

nc

Does Not Contain

email_id:nc:com

STRING

eq:null

Field is blank

email_id:eq:null

STRING

ne:null

Field is not blank

email_id:ne:null

PRIMITIVE

ne

Not Equals

addition:ne:0

DATE

eq

Equals (format: yyyy-MM-dd)

createdDate:eq:2024-03-22 &localTimeZone=America/Los_Angeles

DATE

ne

Not Equals

createdDate:ne:2024-03-22&localTimeZone=America/Los_Angeles

DATE

gt

After Date

createdDate:gt:2024-01-01&localTimeZone=America/Los_Angeles

DATE

lt

Before Date

createdDate:lt:2024-03-01&localTimeZone=America/Los_Angeles

DATE

ge

On or After Date

createdDate:ge:2024-02-01&localTimeZone=America/Los_Angeles

DATE

le

On or Before Date

createdDate:le:2024-03-31&localTimeZone=America/Los_Angeles

Combining AND and OR Conditions

Logic Type
Symbol
Example
Meaning

AND

and

number_field_1:eq:6:and:number_field_2:eq:1

Both conditions must be true

OR

or

number_field_1:eq:6:or:number_field_2:eq:1

Either conditions can be true

Examples of Filter Usage

Example 1 - AND Condition

number_field_1:eq:6:and:number_field_2:eq:1

Records where number_field_1 = 6 AND number_field_2 = 1


Example 2 - OR Condition

number_field_1:eq:2124:or:contact:eq:896543

Records where number_field_1 = 2124 OR contact = 896543


Example 3 - in Operator (Multiple Values)

number_field_1:in:2|10|15

Records where number_field_1 is 2, 10, or 15


Example 4 - Date Comparison

createdDate:ge:2024-03-01:and:createdDate:le:2024-03-31&localTimeZone=America/Los_Angeles

Records created between March 1, 2024, and March 31, 2024


Example 5 - Null and Not Null Checks

number_field_1:eq:null

Records where number_field_1 is blank

email_id:ne:null

Records where email_id is not blank

Important Notes

  • filter is optional but powerful for targeted queries

  • Use the correct fieldType as per your data model

  • in: operator values must be separated by | (pipe symbol)

  • Date format must be YYYY-MM-DD

  • Supports up to 1,000 records per request

Common Use Cases

Scenario
Example Filter

Get approved records

status:eq:Approved

Filter by serial number

serial_number:eq:1234

Filter by multiple number values

number_field_1:in:2

Filter by date range

createdDate:ge:2024-03-01:and:createdDate:le:2024-03-31

Check for blank number

number_field_1:eq:null

Match text containing a string

email_id:cn:m

Multiple conditions with AND/OR

number_field_1:eq:10:and:number_field_2:eq:20 number_field_1:eq:10:or:number_field_2:eq:20

Summary

The filter parameter provides a flexible querying mechanism with:

  • Support for AND and OR conditions

  • Numeric, String, Primitive, and Date field filtering

  • Range filtering, null checks, and list matching (in)

  • Easy filtering by date ranges for audit or time-based queries

PreviousAzure API GatewayNextInstalling Exto on Kubernetes

Last updated 1 month ago

Was this helpful?