GET /v1/events/custom

Retrieves custom events. Supports filtering, sorting and paging.

Filtering

The filter parameter accepts a list of semicolon-separated filters in the form: {fieldName}{operator}{fieldValue} Filter terms within a single filter parameter are joined by a logical AND. Separate filter parameters are joined by a logical OR.

Supported filter fields
Field
identifyId
eventName
date
Operators
Operator Meaning
== Exact match
!= Not equal
< Less than
<= Less than or equal
> Greater than
>= Greater than or equal
~ Matches string, supports wildcard characters * and ?
!~ Not like, supports wildcard characters * and ?

Examples:

URI Results
GET /v1/events/custom?filter=identifyId==ABC123 Custom event matches for user with identifyId of 'ABC123'.

Sorting

The sort parameter accepts a list of semi-colon separated fields names, each with an optional dash to imply descending sort order.

Supported sort fields
Field
accountId
date

Examples:

URI Results
GET /v1/events/custom?sort=-date Matches sorted by date descending.

Query parameters

  • dateRangeEnd string

    Date range end

  • dateRangeStart string

    Date range start

  • filter array[string]

    Filters

  • pageSize integer(int32)

    Number of events per page

    Minimum value is 1, maximum value is 1000. Default value is 25.

  • scrollId string

    Used for fetching subsequent pages after the first one. Returned in response.scrollId

  • sort string

    Sort fields

Responses

  • 200 */*

    Success

    Hide response attributes Show response attributes object
    • customEvents array[object]

      Array of custom events

      Hide customEvents attributes Show customEvents attributes object

      Custom Event object

      • eventId string
      • identifyId string Required
      • propertyKey string Required
      • date integer(int64)
      • eventType string
      • sessionId string
      • userType string Required

        Values are LEAD, USER, VISITOR, or EMPTY_USER_TYPE.

      • accountId string
      • globalContext object
      • eventName string Required
      • attributes object
      • url string
      • referrer string
      • remoteHost string
    • totalHits integer(int64)

      Total number of records matching filters

    • scrollId string

      If passed on subsequent requests as the scrollId parameter, will fetch the next page

  • 400

    Bad request

  • 401

    Unauthorized or bad API Key

  • 429

    Rate limit exceeded

GET /v1/events/custom
curl \
 --request GET 'https://api.aptrinsic.com/v1/events/custom'
Response examples (200)
{
  "customEvents": [
    {
      "eventId": "string",
      "identifyId": "string",
      "propertyKey": "string",
      "date": 42,
      "eventType": "string",
      "sessionId": "string",
      "userType": "LEAD",
      "accountId": "string",
      "globalContext": {},
      "eventName": "string",
      "attributes": {},
      "url": "string",
      "referrer": "string",
      "remoteHost": "string"
    }
  ],
  "totalHits": 42,
  "scrollId": "string"
}