List Event Filters
Paginated list of the tenant's event filters, with search by name — summary only, without the definition tree.
GET /api/event-criterias
Returns a paginated list of the tenant's event filters, with an optional search by name. Each element is a summary: the base resource plus the condition count — it does not include the definition tree.
Auth: Required — event-criteria:view permission
This endpoint does not return queryBlocks, only conditionCount. To get the
full definition of a filter use
GET /:id.
Query Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
page | number | 1 | Page number (integer, minimum 1). |
per_page | number | 25 | Items per page (integer, minimum 1, maximum 100). |
search | string | - | Filters by name (partial match, case-insensitive). Does not search in description. |
The order is fixed: descending by creation date (createdAt), most recent
first.
Example
curl "https://api.reten.ai/api/event-criterias?search=factura&per_page=25" \
-H "Authorization: Bearer <token>" \
-H "x-tenant-id: <tenant-id>" \
-H "x-project-id: <project-id>"import axios from 'axios';
const response = await axios.get(
'https://api.reten.ai/api/event-criterias',
{
headers: { Authorization: 'Bearer <token>', 'x-tenant-id': '<tenant-id>', 'x-project-id': '<project-id>' },
params: { search: 'factura', per_page: 25 },
},
);
const { data, pagination } = response.data;Response 200 OK
Wraps the results in PaginatedResponseDto<T>. Each element of data uses
camelCase; the pagination fields use snake_case.
{
"data": [
{
"id": "6d2a9c41-7e35-48b0-b1c9-0f8e7d6c5b4a",
"projectId": "3f6c2b1a-8d4e-4f7a-9b2c-5e1d0a7f6c34",
"name": "Proyecto Food Service",
"description": "Ventas facturadas con al menos una línea de categoría Food Service u HORECA",
"isActive": true,
"ownerId": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
"updatedBy": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
"createdAt": "2026-07-15T14:32:07.481Z",
"updatedAt": "2026-07-15T14:32:07.481Z",
"conditionCount": 2
},
{
"id": "9f3a1c22-4b7e-4c31-9a8d-2f5e6b7c8d90",
"projectId": "3f6c2b1a-8d4e-4f7a-9b2c-5e1d0a7f6c34",
"name": "Venta oficial — solo facturada",
"description": null,
"isActive": true,
"ownerId": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
"updatedBy": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
"createdAt": "2026-07-10T09:12:44.005Z",
"updatedAt": "2026-07-10T09:12:44.005Z",
"conditionCount": 1
}
],
"pagination": {
"page": 1,
"per_page": 25,
"total": 2,
"total_pages": 1,
"has_next": false,
"has_previous": false
}
}Element Fields
| Field | Type | Description |
|---|---|---|
id | string (UUID) | Filter identifier. |
projectId | string (UUID) | Project the filter belongs to. |
name | string | Filter name. |
description | string | null | Description; null if none. |
isActive | boolean | Always true: no endpoint modifies it. |
ownerId | string (UUID) | Creating user. |
updatedBy | string (UUID) | Last user who edited it. |
createdAt | string (ISO 8601) | Creation date. |
updatedAt | string (ISO 8601) | Last update date. |
conditionCount | number | Number of conditions in the filter (see below). |
What conditionCount counts
It is the sum of the leaves of the where of all query blocks: each leaf counts
1, no matter what type it is.
- A column leaf (
predicate) counts 1. - A record leaf (
recordPredicate) counts 1, even if itssubWherehas several sub-filters: it is one condition, not the sum of its parts. - A related table leaf (
semiJoinPredicate) counts 1, for the same reason. AND/ORgroups do not count: they are traversed to reach the leaves.
A filter with status = 'Facturada' and a record filter over attributes with
two sub-filters has conditionCount: 2.
conditionCount measures the definition tree, which is what whoever builds it
sees. It does not measure the size of any serialization of the filter.
Pagination Fields
| Field | Type | Description |
|---|---|---|
page | number | Current page. |
per_page | number | Items per page. |
total | number | Total count of filters matching the search. |
total_pages | number | ceil(total / per_page). |
has_next | boolean | true if there is a next page. |
has_previous | boolean | true if there is a previous page. |
Error Responses
| Status | Description |
|---|---|
400 | Invalid parameter (per_page greater than 100, page less than 1, unknown property). |
401 | Missing or invalid Authorization: Bearer. |
403 | The user does not have the event-criteria:view permission, or the x-tenant-id is not authorized. |