CDPGuidesSupport

Query Events

Search, inspect, and export event occurrences through the Ours Privacy Platform API.

Use Query Events to search event occurrences with date, event, visitor, source, session, page, and property filters. JSON-encode the input object in the query string. Continue through results with pagination.nextCursor while hasMore is true.

The list returns event summaries and can include raw event or visitor properties. Use occurrence lookup to inspect an individual event or export up to 100 rows as CSV or JSON.

GET/rest/v1/query-events

GET
/rest/v1/query-events
AuthorizationBearer <token>

Ours Privacy API key

In: header

Query Parameters

input*string

Query Events filters and projection. JSON-encode input in the REST query string.

limit?integer
cursor?string

Cursor from the previous page.

Length1 <= length <= 2000
includeCount?boolean

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/rest/v1/query-events?input=%7B%22version%22%3A1%2C%22from%22%3A%222026-11-01%22%2C%22to%22%3A%222026-11-17%22%2C%22include%22%3A%5B%7B%22eventNames%22%3A%5B%22Purchase%22%5D%7D%5D%7D"
{  "rows": [    {      "cursor": "string",      "timestamp": "2019-08-24T14:15:22Z",      "eventName": "string",      "visitorId": "string",      "distinctId": "string",      "sourceId": "string",      "sourceName": "string",      "sourceType": "string",      "isTestEvent": true,      "isBot": true,      "sessionId": "string",      "pagePath": "string",      "email": "string",      "eventProperties": {},      "visitorProperties": {},      "columns": [        {          "property": "string",          "path": [            "string"          ],          "type": "STRING",          "value": "string"        }      ]    }  ],  "matchedCount": 0,  "pagination": {    "hasMore": true,    "nextCursor": "string"  },  "freshness": {    "coverageWatermark": "2019-08-24T14:15:22Z",    "coverageStatus": "UNKNOWN",    "syncCursor": "2019-08-24T14:15:22Z",    "syncCompletedAt": "2019-08-24T14:15:22Z"  }}

GET/rest/v1/query-events/capabilities

GET
/rest/v1/query-events/capabilities
AuthorizationBearer <token>

Ours Privacy API key

In: header

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/rest/v1/query-events/capabilities"
{  "version": 1,  "defaultPageSize": 1,  "maxPageSize": 250,  "maxDateRangeDays": 366,  "maxSelections": 10,  "maxColumns": 20,  "maxExportRows": 100,  "supportsVerifiedCoverageWatermark": true}

GET/rest/v1/query-events/query-catalog

GET
/rest/v1/query-events/query-catalog
AuthorizationBearer <token>

Ours Privacy API key

In: header

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/rest/v1/query-events/query-catalog"
{  "version": 1,  "entries": [    {      "id": "string",      "label": "string",      "type": "string",      "operators": [        "string"      ],      "scope": "string",      "provider": "string",      "missingBehavior": "string",      "requiresPath": true,      "allowedTypes": [        "string"      ]    }  ],  "limitations": [    "string"  ]}

GET/rest/v1/query-events/property-suggestions

GET
/rest/v1/query-events/property-suggestions
AuthorizationBearer <token>

Ours Privacy API key

In: header

Query Parameters

eventName?string

Optional exact event name to scope the suggestions.

Length1 <= length <= 1000
sourceId?string

Optional exact source identifier to scope the suggestions.

Length1 <= length <= 200

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/rest/v1/query-events/property-suggestions"
{  "entities": [    {      "property": "event.properties",      "path": [        "string"      ],      "type": "string"    }  ],  "sampled": true,  "from": "2019-08-24T14:15:22Z",  "to": "2019-08-24T14:15:22Z"}

GET/rest/v1/query-events/event-names

GET
/rest/v1/query-events/event-names
AuthorizationBearer <token>

Ours Privacy API key

In: header

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/rest/v1/query-events/event-names"
{  "entities": [    {      "name": "string"    }  ],  "sampled": true,  "from": "2019-08-24T14:15:22Z",  "to": "2019-08-24T14:15:22Z"}

GET/rest/v1/query-events/occurrence

GET
/rest/v1/query-events/occurrence
AuthorizationBearer <token>

Ours Privacy API key

In: header

Query Parameters

input*string

The same filters used to obtain the event cursor. JSON-encode input in the REST query string.

cursor*string

Cursor from the page containing this event.

Length1 <= length <= 2000

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/rest/v1/query-events/occurrence?input=%7B%22version%22%3A1%2C%22from%22%3A%222026-11-01%22%2C%22to%22%3A%222026-11-17%22%2C%22include%22%3A%5B%7B%22eventNames%22%3A%5B%22Purchase%22%5D%7D%5D%7D&cursor=string"
{  "cursor": "string",  "timestamp": "2019-08-24T14:15:22Z",  "eventName": "string",  "visitorId": "string",  "distinctId": "string",  "sourceId": "string",  "sourceName": "string",  "sourceType": "string",  "isTestEvent": true,  "isBot": true,  "sessionId": "string",  "pagePath": "string",  "email": "string",  "eventProperties": {},  "visitorProperties": {},  "columns": [    {      "property": "string",      "path": [        "string"      ],      "type": "STRING",      "value": "string"    }  ]}

GET/rest/v1/query-events/export

GET
/rest/v1/query-events/export
AuthorizationBearer <token>

Ours Privacy API key

In: header

Query Parameters

input*string

Query Events filters and projection. JSON-encode input in the REST query string.

format*string

Export encoding.

Value in

  • "CSV"
  • "JSON"
cursor?string

Start after this event cursor.

Length1 <= length <= 2000
limit?integer

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/rest/v1/query-events/export?input=%7B%22version%22%3A1%2C%22from%22%3A%222026-11-01%22%2C%22to%22%3A%222026-11-17%22%2C%22include%22%3A%5B%7B%22eventNames%22%3A%5B%22Purchase%22%5D%7D%5D%7D&format=CSV"
{  "content": "string",  "rowCount": 0,  "format": "CSV",  "pagination": {    "hasMore": true,    "nextCursor": "string"  }}

Next Steps

How is this guide?