provider events GET /api/environments/{environment_id}/events/
@utdk/posthog /api/environments/{environment_id}/events/
environments_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
environment_id path required
Deprecated. Use /api/projects/{project_id}/ instead.
string
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
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
environmentsEventsList
GET/api/environments/{environment_id}/events/
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.

Parameters

required

Deprecated. Use /api/projects/{project_id}/ instead.

Only return events with a timestamp after this time. Default: now() - 24 hours.

Only return events with a timestamp before this time. Default: now() + 5 seconds.

Filter list by distinct id.

Filter list by event. For example `user sign up` or `$pageview`.

Include person details for each event. Default: false.

The maximum number of results to return

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

Filter list by person id.

Filter events by event property, person property, cohort, groups and more.

(Experimental) JSON-serialized array of HogQL expressions to return

(Experimental) JSON-serialized array of HogQL expressions that must pass

Configure credentials above to enable sending.

Code snippet
Updates live as you fill in the form above.

TypeScript

import posthog from '@utdk/posthog';

await posthog.environmentsEventsList()