loading

Query

Retrieve data from table. Available tables can be found by querying the GET Tables endpoint of the Logs API.

path Parameters
accountId
required
string
table
required
string

Table to query

query Parameters
v
required
string

A date in YYYYMMDD format.

api_key
required
string

API Key associated with your App that has access to Logs endpoint.

Request Body schema: application/json

JSON object containing fields, pageSize, sorting and filters to be applied to request.

fields
Array of strings

Fields to return in request e.g. "fields":["eventTimestamp","accountId"].

This field is optional and will return all fields if no fields are specified. All fields can also be explicitly specified as follows: "fields" : ["*"]

pageSize
number

Maximum number of records to return in request e.g. "pageSize":100.

This field is optional and will be set to 50 records if no pageSize is specified. pageSize supports a max 1,000 records. If query returns greater than pageSize specified, additional records require pagination.

descending
boolean

Order of records are returned based on timestamp e.g. "descending": true.

This field is optional and will return records in ascending order if not specified.

filter
string

Filter to apply to request e.g. "filter": "eventTimestamp < '2022-03-10T12:23:23.800Z'"

Filter Operators supported by Logs API:

  • &&: Combines multiple filter operators together. Records returned must satisfy both filters.
    • Example: "filter": "searchTerm.containsAnyCase(’hello') && visitor.id == '3523168'"
  • ||: Combines multiple filter operators together. Records returned must satisfy either filter.
    • Example: "filter": "searchTerm.containsAnyCase(’hello') || visitor.id == '3523168'"
  • ==: Returns records where field equals value.
    • Example: searchTerm == ‘branches near me’
  • !=: Returns records where field does not equal value.
    • Example: searchTerm != ‘branches near me’
  • <: Returns records where field is less than value.
    • Example: "filter": "eventTimestamp < '2022-03-10T12:23:23.800Z'"
  • >: Returns records where field is greater than value.
    • Example: "filter": "eventTimestamp > '2022-03-10T12:23:23.800Z'"
  • <=: Returns records where field is less than or equal value.
    • Example: "filter": "eventTimestamp <= '2022-03-10T12:23:23.800Z'"
  • >=: Returns records where field is greater than or equal value.
    • Example: "filter": "eventTimestamp >= '2022-03-10T12:23:23.800Z'"
  • has: Returns records where field is not null.
    • Example: "filter": "has(visitor.id)"
  • !has: Returns records where field is null.
    • Example: "filter": "!has(visitor.id)"
  • in: Returns records where field equals value(s) in array.
    • Example: "filter": "searchTerm in ['bank holiday','branches near me']"
  • !in: Returns records where field does not equal value(s) in array.
    • Example: !(searchTerm in ['bank holiday','branches near me'])
  • {FIELD}.containsAnyCase: Returns records where value exists in string field.
    • Example: "filter": "searchTerm.containsAnyCase(’hello')"
  • !{FIELD}.containsAnyCase: Returns records where value does not exist in string field.
    • Example: "filter": "!searchTerm.containsAnyCase(’hello')"


This field is optional and will apply no filters if no filters are specified.

pageToken
string

Token for paginating queries which return more records than the pageSize specified e.g. "pageToken": "BeYwVgOhe_fEz9VhfSES4GPDt6jElk7AHN6plsP_TLXk27rlG0YyYc78AOI_oyILcw".

This is optional and should only be used when your query returns more records than your pageSize (indicated by the nextPageToken being returned in your response body.)

Responses

Request samples

Content type
application/json
{
  • "fields": [
    ],
  • "pageSize": 0,
  • "descending": true,
  • "filter": "string",
  • "pageToken": "string"
}

Response samples

Content type
application/json
{
  • "meta": {
    },
  • "response": {
    }
}