baasix_list_items
Retrieve items from any collection with advanced filtering, sorting, pagination, relations, and aggregation. Use operators like eq, contains, in, and geospatial to pinpoint data.
Instructions
Query items from a collection with powerful filtering, sorting, pagination, relations, and aggregation.
FILTER OPERATORS (50+):
Comparison: eq, neq, gt, gte, lt, lte
String: contains, icontains, startswith, endswith, like, ilike, regex
Null: isNull (true/false), empty (true/false)
List: in, nin, between, nbetween
Array: arraycontains, arraycontainsany, arraylength, arrayempty
JSONB: jsoncontains, jsonhaskey, jsonhasanykeys, jsonhasallkeys, jsonpath
Geospatial: dwithin, intersects, contains, within, overlaps
Logical: AND, OR, NOT
DYNAMIC VARIABLES:
$CURRENT_USER: Current user's ID
$NOW: Current timestamp
$NOW-DAYS_7: 7 days ago
$NOW+MONTHS_1: 1 month from now
FILTER EXAMPLES:
{"status": {"eq": "active"}}
{"AND": [{"price": {"gte": 10}}, {"price": {"lte": 100}}]}
{"tags": {"arraycontains": ["featured"]}}
{"author_Id": {"eq": "$CURRENT_USER"}}
{"category.name": {"eq": "Electronics"}} (relation filter)
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| page | No | Page number (default: 1) | |
| sort | No | Sort field and direction (e.g., "createdAt:desc", "name:asc") | |
| limit | No | Items per page (default: 10, use -1 for all) | |
| fields | No | Fields to return. Use ["*"] for all, ["*", "relation.*"] to include relations | |
| filter | No | Filter criteria using operators like eq, neq, gt, gte, lt, lte, contains, in, between, etc. | |
| search | No | Full-text search query | |
| groupBy | No | Fields to group by for aggregation | |
| aggregate | No | Aggregation functions: {alias: {function: "sum|avg|count|min|max", field: "fieldName"}} | |
| collection | Yes | Collection name | |
| searchFields | No | Fields to search in (e.g., ["name", "description"]) | |
| relConditions | No | Filter conditions for related records: {"reviews": {"approved": {"eq": true}}} |