POST
/
event
/
search
Search events with filtering and pagination
curl --request POST \
  --url https://demo.enneo.ai/api/mind/event/search \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/x-www-form-urlencoded' \
  --data 'filters=[{"key":"e.status","comparator":"in","values":["open","closed"]},{"key":"e.createdAt","comparator":"between","from":"2023-01-01","to":"2023-12-31"},{"key":"q","comparator":"equal","value":"abc"}]'
{
  "events": [
    {
      "id": 123,
      "type": "AutoProcessEmail",
      "status": "closed",
      "createdAt": "2023-05-15T10:30:00Z",
      "processedAt": "2023-05-15T10:31:00Z",
      "duration": 60000,
      "ticketId": 456,
      "contractId": "CONTR123",
      "successLabel": "Success",
      "outcome": "Email was processed successfully",
      "details": [
        {
          "label": "Email Subject",
          "value": "Support Request"
        }
      ],
      "showToUser": true
    }
  ],
  "pagination": {
    "total": 150,
    "offset": 0,
    "limit": 20
  }
}

Authorizations

Authorization
string
header
required

JWT-based authentication

Query Parameters

offset
integer
default:0

Pagination offset

limit
integer
default:20

Number of items to return (max 100)

Required range: x <= 100
orderByField
enum<string>
default:e.createdAt

Field to sort by (only indexed fields are supported)

Available options:
e.id,
e.type,
e.subType,
e.contractId,
e.ticketId,
e.status,
e.createdAt
orderByDirection
enum<string>
default:desc

Sort direction

Available options:
asc,
desc
includeTraces
boolean
default:true

Whether to include event traces in the response

Body

application/x-www-form-urlencoded
filters
string

JSON string containing filters for searching events (will be parsed with json_decode). Supported filter fields (indexed fields only): e.id, e.type, e.subType, e.contractId, e.ticketId, e.status, e.createdAt Note: e.subType can only be used in combination with e.type due to the way the database is indexed. Supported comparators: - "=" (equals) - "!=" (not equals) - ">" (greater than) - "<" (less than) - ">=" (greater than or equal) - "<=" (less than or equal) - "in" (in list, use with 'values' array) - "between" (between range, use with 'from' and 'to') Special key 'q': - A filter with key 'q' will search across all JSON data fields (data, outcome, hookOutcome) - Example: {"key":"q","comparator":"equal","value":"abc"} searches for "abc" in all JSON fields - Must be used with at least one other non-LIKE filter (e.g. status, id, date) - An exception will be thrown if used without other non-LIKE filters - The 'value' parameter is required Special date values for date comparisons: - "CURRENT_TIME" - Current time - "CURRENT_DATE" - Current date - "-1 DAY" - Yesterday - "1 DAY" - Tomorrow - "-1 HOUR" - One hour ago - "1 HOUR" - One hour from now

Response

Successful operation

events
object[]
pagination
object