provider events GET
/api/projects/{project_id}/events/ @utdk/posthog
/api/projects/{project_id}/events/ events_list
This endpoint allows you to list and filter events.
It is effectively deprecated and is kept only for backwards compatibility.
If you ever ask about it you will be advised to not use it...
If you want to ad-hoc list or aggregate events, use the Query endpoint instead.
If you want to export all events or many pages of events you should use our CDP/Batch Exports products instead.
- after query
- Only return events with a timestamp after this time. Default: now() - 24 hours.
- string
- before query
- Only return events with a timestamp before this time. Default: now() + 5 seconds.
- string
- distinct_id query
- Filter list by distinct id.
- integer
- event query
- Filter list by event. For example `user sign up` or `$pageview`.
- string
- format query
- enum: csv, json
- include_person query
- Include person details for each event. Default: false.
- boolean
- limit query
- The maximum number of results to return
- integer
- offset query
- Allows to skip first offset rows. Will fail for value larger than 100000. Read about proper way of paginating: https://posthog.com/docs/api/queries#5-use-timestamp-based-pagination-instead-of-offset
- integer
- person_id query
- Filter list by person id.
- integer
- project_id path required
- Project ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/.
- string
- properties query
- Filter events by event property, person property, cohort, groups and more.
- array
- select query
- (Experimental) JSON-serialized array of HogQL expressions to return
- array
- where query
- (Experimental) JSON-serialized array of HogQL expressions that must pass
- array
Try it
Authentication
Configure credentials for PostHog API
Code snippet
Updates live as you fill in the form above.
TypeScript
import posthog from '@utdk/posthog';
await posthog.eventsList()