Skip to main content
POST /{tenantAlias} returns an array of event objects. The body selects the events, and pagination selects the page. The path is relative to the base URL https://queryapis.grainql.com/v1/api/query.

Request

{tenantAlias} is the tenant alias that the dashboard shows, not the tenant UUID. Each object in filterSet has three required fields: Read Filters for the operators and property paths. The pagination object has two optional fields:

Example

Response:

Response fields

Paging

Paging is by offset.
  1. Send offset 0 and a size.
  2. Add size to offset, then send the request again.
  3. Repeat until a response holds fewer events than size.
An empty array means that the previous page was the last page.

Rules for the client

  1. Send after and before on every request. A date range limits the data that the server scans.
  2. Set event when you want one event name. It is faster than a filter on eventName.
  3. Do not page through events to count them. Read Count events.
  4. When the order matters, sort by eventTs on the client.
  5. If the API returns 429, wait Retry-After seconds, then retry one time. Read Query API for the rate limits and the error table.

Limits