Zum Hauptinhalt springen
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/json' \
  --data '
{
  "filters": [
    {
      "key": "channel",
      "comparator": "in",
      "values": [
        "email"
      ],
      "value": 1609459200,
      "from": 1609459200,
      "to": 1612051200
    }
  ]
}
'
{
  "events": [
    {
      "id": 123,
      "status": "open",
      "user": {
        "id": 123,
        "firstName": "<string>",
        "lastName": "<string>",
        "email": "<string>",
        "phone": "<string>"
      },
      "createdAt": "2023-11-07T05:31:56Z",
      "activity": "<string>",
      "details": [
        {
          "label": "<string>",
          "value": "<string>",
          "type": "<string>",
          "url": "<string>"
        }
      ],
      "tabs": [
        {
          "key": "<string>",
          "label": "<string>"
        }
      ],
      "eventTraces": [
        {}
      ]
    }
  ],
  "pagination": {
    "total": 123,
    "offset": 123,
    "limit": 123
  }
}

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)

Erforderlicher Bereich: x <= 100
orderByField
enum<string>
default:e.createdAt

Field to sort by (only indexed fields are supported)

Verfügbare Optionen:
e.id,
e.type,
e.subType,
e.contractId,
e.ticketId,
e.status,
e.createdAt,
e.createdBy
orderByDirection
enum<string>
default:desc

Sort direction

Verfügbare Optionen:
asc,
desc
includeTraces
boolean
default:true

Whether to include event traces in the response

Body

application/json

Filters for searching events

filters
object[]

Array of filter objects for searching events. Supported filter fields (indexed fields only): e.id, e.type, e.subType, e.contractId, e.ticketId, e.status, e.createdAt, e.createdBy 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