Skip to content

Search Events

Use our search-events endpoint to search for specific events.

Request

POST https://api.logspot.io/search-events

Request body:

{
"event_name": "TicketPurchased",
"user_id": "[email protected]",
"start_date": "2021-11-04",
"end_date": "2021-11-10",
"cursor": "asdgWEQWEGJQwqejqweot-QEWGFJWEG",
"filter_groups": [
{
"filters": [
{
"field_name": "path",
"operator": "=",
"value": "/mobile-app"
}
]
}
]
}

Params:

  • event_name - allows you to search for events with provided name
  • user_id - allows you to search for events from specific user
  • start_date - allows you to search for events with start time greater or equal start_date (inclusive - start of the day 00:00)
  • end_date - allows you to search for events with end time lower or equal end_date (inclusive - end of the day 23:59)
  • cursor - a token needed for fetching the next page
  • filter_groups - event filtering conditions

Response

{
"cursor": "asdgWEQWEGJQwqejqweot-QEWGFJWEG",
"events": [
{
"id": "cc7d5997-875a-44b4-8d6d-a5f594a6f63d",
"name": "Pageview",
"notify": false,
"slug": "pageview",
"userId": "rba3091cd9afb7147ee88",
"project": "Logspot Home",
"createdAt": "2022-09-16T21:17:26.714Z",
"metadata": {},
"location_country": "UA",
"location_city": "",
"location_region": "",
"location_lon": "30.523",
"location_lat": "50.450",
"device": "desktop",
"os": "Linux",
"browser": "chrome",
"screen": "2560x1440",
"language": "en-US",
"referrer": null,
"url": "/",
"hostname": "logspot.io"
},
...
]
}

Pagination

We use cursor based pagination. For each request, you’ll get a cursor if there’ll be a next page with events to fetch.

For the first page you don’t need to provide a cursor. Following request will require providing a cursor from the last response.

Default page size is 100 events.