Download
Download the raw analytics data.
We delay the events by 10 minutes, which means the most recent event returned by the api actually occurred at least 10 minutes ago.
- Example request
curl -X POST 'https://developer.swapcard.com/event-admin/export/analytics' \
-H 'Content-Type: application/json' \
-H 'Authorization: <TOKEN>' \
-d '{
"event_ids": ["RXZlbnRfMQ==", "RXZlbnRfMg=="],
"time_gt": "Time interval" # ex: 2022-09-01T00:00:00.000Z,
"time_lt": "Time interval" # ex: 2022-10-01T00:00:00.000Z
}'
Request body |
---|
event_ids string arrayRequiredThe ids of events in which the action occurred. |
cursor stringStarting position for the consecutive calls. |
events string array The list of action types, see table bellow. |
group_ids string arrayThe list of event groups who triggered the action. |
user_ids string arrayThe list of users who triggered the action. |
exhibitor_ids string arrayThe list of exhibitors who triggered the action. |
time_gt stringRFC 3339 date time, after which timestamp the action occurred. |
time_lt stringRFC 3339 date time, after which timestamp the action occurred. |
limit integerMaximum amount of rows streamed, default is infinite. |
- Example response
{"cursor":"eyJFeGVtcGxlQ3Vyc29yIjogMX0=","time":"2020-09-04T15:00:17.737Z","event":"people_view_search","platform":"web-user","event_id":"RXZlbnRfMQ==","properties":{"query":"market","event_view_id":"RXZlbnRWaWV3XzA="},"user_id":"VXNlcl8w","group_ids":["RXZlbnRHcm91cF8w"]}
{"cursor":"eyJFeGVtcGxlQ3Vyc29yIjogMn0=","time":"2020-09-04T15:00:17.961Z","event":"exhibitor_show","platform":"android","event_id":"RXZlbnRfMQ==","properties":{},"user_id":"VXNlcl8x","group_ids":["RXZlbnRHcm91cF8w","RXZlbnRHcm91cF8x"],"exhibitor_ids":["RXhoaWJpdG9yXzA="],"with_exhibitor_ids":["RXhoaWJpdG9yXzE="]}
Response schema |
---|
cursor stringStream row cursor, use for consecutive call. When you call the endpoint with this cursor, it will return all consecutive rows. |
event stringAction name, see the documentation below. |
created_at stringRFC 3339 date time action timestamp. |
event_id stringIn which event the action was triggered. |
user_id stringNullableUser triggered the action. |
exhibitor_ids string arrayNullableWhat exhibitor the user belonged to when they triggered the action. |
group_ids string arrayNullableWhat group the user belonged to when they triggered the action. |
with_user_id stringNullableOnly in case of performing an action with another user, the interacted with user. |
with_exhibitor_ids string arrayNullableOnly in case of performing an action with another user, what exhibitor the interacted with user belonged to when the action was triggered. |
with_group_ids string arrayNullableOnly in case of performing an action with another user, what group the interacted with user belonged to when the action was triggered. |
body objectNullableAction meta information depending on the event type, see documentation below |