Query Parameters
All GET endpoints (list, by-id, count, pagedresult, custom routes) support a consistent set of query parameters for filtering, sorting, pagination, and eager loading of navigation properties.
Filtering
Syntax: filter[propertyName]=value — default operator is eq.
GET /api/products?filter[isActive]=true
GET /api/products?filter[name]=Laptop
GET /api/products?filter[categoryId]=1
Filter Operators
Syntax: filter[propertyName][operator]=value. Operator names are case-insensitive.
| Operator | Supported types | Description | Example |
|---|---|---|---|
eq | string, value types, Guid | Equal to | filter[name][eq]=Laptop |
neq | string, value types, Guid | Not equal to | filter[status][neq]=pending |
like | string only | Contains substring (case-insensitive) | filter[name][like]=key |
nlike | string only | Does not contain substring | filter[name][nlike]=old |
lt | value types (not Guid) | Less than | filter[price][lt]=100 |
lteq | value types (not Guid) | Less than or equal to | filter[price][lteq]=100 |
gt | value types (not Guid) | Greater than | filter[stock][gt]=0 |
gteq | value types (not Guid) | Greater than or equal to | filter[price][gteq]=50 |
in | string, value types, Guid | Value is in a JSON array | filter[categoryId][in]=[1,2,3] |
nin | string, value types, Guid | Value is not in a JSON array | filter[status][nin]=["pending","discontinued"] |
GET /api/products?filter[price][gteq]=50&filter[price][lteq]=100
GET /api/products?filter[name][like]=book
GET /api/products?filter[categoryId][in]=[1,2,5]
GET /api/products?filter[status][nin]=["pending","discontinued"]
in / nin on enum properties, both integer values ([0,1])
and case-insensitive string names (["Pending","Active"]) are accepted.
Sorting
Syntax: sort[propertyName]=asc|desc. Multiple sort fields are supported.
Descending values: desc, 1, descending. Everything else is treated as ascending.
GET /api/products?sort[price]=asc
GET /api/products?sort[name]=desc
GET /api/products?sort[price]=asc&sort[name]=desc
[Key] property descending.Pagination
| Parameter | Default | Description |
|---|---|---|
page |
1 |
Page number starting from 1. Non-numeric or zero values silently default to 1. |
pagesize |
— | Number of items per page. Non-numeric values are ignored. Clamped to MaxPageSize (default 1000). |
GET /api/products?page=1&pagesize=20
GET /api/products?filter[isActive]=true&sort[name]=asc&page=2&pagesize=10
page / pagesize on a regular GET request returns a flat array with Skip / Take applied. For a JSON envelope with metadata, use /pagedresult.PagedResult
Available only when .ExposePagedResult() is configured for the entity.
Returns a rich pagination envelope with metadata.
GET /api/products/pagedresult?page=2&pagesize=10
{
"items": [ ... ],
"page": 2,
"pageSize": 10,
"pageCount": 5,
"total": 47
}
| Field | Description |
|---|---|
items | Array of objects for the current page |
page | Current page number |
pageSize | Items per page |
pageCount | Total number of pages |
total | Total number of records matching the query |
Include (Navigation Properties)
Eagerly loads related entities. Equivalent to EF Core's Include().
Syntax: include=NavPropertyName1,NavPropertyName2
GET /api/products?include=Category
GET /api/products?filter[isActive]=true&include=Category
Count
Returns a plain integer count respecting all applied filters.
GET /api/products/count
GET /api/products/count?filter[isActive]=true
GET /api/products/count?filter[price][gt]=100&filter[stock][gt]=0
42
Compound Filters (AND / OR)
Flat syntax
All filter[...] parameters are collected into a single group.
The operator parameter controls how they are joined.
# Default AND — products containing "book" AND costing less than 50
GET /api/products?filter[name][like]=book&filter[price][lt]=50
# OR — products containing "laptop" OR "keyboard"
GET /api/products?filter[name][like]=laptop&filter[name][like]=keyboard&operator=or
| operator value | Logic |
|---|---|
| (not specified) | AND |
or | OR |
operator parameter is global for the entire request. It is not possible
to mix AND and OR for different fields using flat syntax. Use grouped syntax for mixed logic.
Grouped syntax
Filters are organised into numbered groups (filter[N][Property]).
Each group has its own operator[N]. Filters within a group are combined by
that group's operator; groups are always combined with AND.
filter[N][PropertyName]=value
filter[N][PropertyName][operator]=value
operator[N]=or # optional — use OR within group N; default is AND
GET /api/products?filter[0][name][like]=laptop&filter[0][name][like]=keyboard&operator[0]=or&filter[1][categoryId]=1
GET /api/products?filter[0][price][gteq]=100&filter[0][stock][gt]=50&operator[0]=or&filter[1][isActive]=true
| Rule | Description |
|---|---|
Group index N | A non-negative integer (0, 1, 2, …). Distinguishes groups from property names. |
| Within a group | Combined with operator[N] (AND by default, OR if operator[N]=or). |
| Between groups | Always combined with AND. |
| Flat + grouped | Flat filters form an implicit "default" group, controlled by the bare operator key. |
Endpoint Reference
Quick summary of all standard endpoints generated for a registered entity:
| Method | Route | Status codes |
|---|---|---|
| GET | /{route} | 200 |
| GET | /{route}/{id} | 200, 404 |
| POST | /{route} | 201, 400 |
| PUT | /{route}/{id} | 200, 400, 404 |
| PATCH | /{route}/{id} | 200, 400, 404 |
| DELETE | /{route}/{id} | 204, 400, 404 |
| GET | /{route}/count | 200 |
| GET | /{route}/pagedresult | 200 (when enabled) |
0) and
case-insensitive strings ("Pending").