Filter Operators
All filter operators are of the following format:
- Standard filter—For a standard filter, enter the filter parameter name followed by double underscore followed by operator name followed by equals sign followed by the value:
filterParameterName__operatorName=value
- Exact filter—For exact filter, it is not necessary to specify the double underscore followed by the exact operator name. Instead for exact operator, we can just specify parameter name followed by equals sign followed by the value:
filterParameterName=value
The following table lists the filter operators supported by Technopedia APIs:
| Filter Operator Name | Description | Format | Example |
|---|---|---|---|
| exact | Exact match | <Filter parameter>=<value> | cat_manufacturer_id=1234 |
| contains | Contains | <Filter parameter>__contains=<value> | manufacturer__contains=Micro |
| icontains | Case insensitive contains | <Filter parameter>__icontains=<value> | manufacturer__icontains=micro |
| startswith | Starts with | <Filter parameter>__startswith=<value> | manufacturer__startswith=Micro |
| istartswith | Case insensitive startswith | <Filter parameter>__istartswith=<value> | manufacturer__istartswith=Micro |
| endswith | Ends with | <Filter parameter>__endswith=<value> | manufacturer__endswith=obe |
| gt | Greater than | <Filter parameter>__gt=<value> | tier__gt=1 |
| lt | Less than | <Filter parameter>__lt=<value> | tier__lt=3 |
| isnull | Is Null | <Filter parameter>__isnull=<True or False> | patchlevel__isnull=False |