Skip to main content
A filter is one condition that an event must meet. POST /{tenantAlias} and POST /count/{tenantAlias} take a filterSet array of filters. Every filter in the array must match. There is no OR.

Filter object

Operators

Property paths

Write the full path. plan does not match properties.user.plan.

Types of value

The JSON type of value must match the type of the property. A string value on a number property returns a type mismatch error. Read the error table on this page.

Examples

Three filters, all of which must match:
Several users, with IN:
Filter bodies for other tasks:

Errors

A bad filter returns an error body with one error string. Read Query API for the status codes.

Rules for the client

  1. Write the full property path. Use properties.user.plan, not plan.
  2. Send after and before with every filterSet. A date range limits the data that the server scans.
  3. Put the most selective filter first.
  4. Use one IN filter for several values of one property. Filters combine with AND, so two EQUALS filters on the same property match nothing.
  5. To test a filter, count with the filter and count without it, then compare the two numbers. Read Count events.
  6. Make sure that comparison is one of the ten operators before you send the request.