Skip to Content
🎉 New release with new features and improvements! V0.0.2 Release →

Search Entities by Query

with this endpoint you can do search directly by from the url query parameters.

GET /api/entities/:entity?page=0&size=10&sort=createdAt:desc&filter=<field>:<operator>:<value>,<field>:<operator>:<value>,...

Parameters

ParameterTypeRequiredDefaultDescription
entitystringyes~The name of the entity to search
pagenumberno0The page number
sizenumberno10The page size
sortstringno~The sort by field (field:direction)
filterstringno~The filter by field (field:operator:value)

The filter parameter is a comma-separated list of filter conditions.

The query parameters are converted to a BSH Search object internally.

Response

{ "data": [ { "id": 1, "name": "John Doe", "email": "john.doe@example.com" }, { "id": 2, "name": "John Smith", "email": "john.smith@example.com" } ], "timestamp": 1234567890, "code": 200, "status": "OK", "meta": {}, "pagination": { "current": 1, "total": 18, "pages": 2, "first": true, "last": false } }