Filters
A filter chooses events. The same language serves every place EventWolf picks events: a history read, a live tail, a subscription, and a replay. An empty filter matches every event.
Clauses
An event matches when it meets every clause the filter has. Where a clause takes a list, any value in the list matches.
| Clause | Matches |
|---|---|
types |
The event’s type: exact; with a trailing .*, every type below it, so request.* matches request.created but not request; or * for every type. |
sources |
The event’s source: exact, or a prefix with one trailing *, such as /support/*. |
refs |
Any of its references, each { type, id }, or { type } for every reference of that type. |
workspace |
Its workspace extension, exactly. |
subject |
Its subject, exactly. |
extensions |
Each named extension’s value, or any of a list of values, such as { "severity": ["high", "urgent"] }. |
where |
The value at each data path, or any of a list of values, such as { "assignee.id": "u_ana" }. |
A filter is checked when it is saved or sent, and an invalid one is refused. A path or extension an event doesn’t have never matches, so a filter fails closed. Each value matches by exact equality, such as a status or an ID, and a list matches any of its values.
In a query string
A history read and a live tail take the filter as query parameters, such as GET /v1/events/events?types=request.*&ref=request:r_9&where[assignee.id]=u_ana:
typesandsources: comma-separated, such astypes=request.created,request.resolved.ref:type:id, or a type alone. Repeat it for any of several.workspaceandsubject: one value each.ext[<name>]andwhere[<path>]: a value, or comma-separated values.trueandfalseare booleans. Decimal numbers such as-2and0.5are numbers. Forms such as01and1e3stay strings.
A subscription, a replay, and a subscription test take the filter as JSON, in filter.
Limits
typesandsourceshold at most 50 patterns each, andrefsat most 20.wherenames at most 10 data paths.- A list of values holds at most 100.
Where to act on it
- The EventWolf quickstart reads a history by reference and tests a filter.
- List events, Stream events, and Test a subscription.