Environments-13
For instructions on how to authenticate to use this endpoint, see API overview.
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.
Endpoints
GET | |
GET | |
GET | |
GET | |
POST | |
GET | |
GET | |
GET | |
POST | |
GET |
List all environments events
Required API key scopes
query:readPath parameters
- project_idstring
Project ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/.
Query parameters
- afterstring
Only return events with a timestamp after this time.
- beforestring
Only return events with a timestamp before this time.
- distinct_idinteger
Filter list by distinct id.
- eventstring
Filter list by event. For example
user sign upor$pageview. - formatstringOne of:
"csv""json" - limitinteger
The maximum number of results to return
- offsetinteger
The initial index from which to return the results.
- person_idinteger
Filter list by person id.
- propertiesarray
Filter events by event property, person property, cohort, groups and more.
- selectarray
(Experimental) JSON-serialized array of HogQL expressions to return
- wherearray
(Experimental) JSON-serialized array of HogQL expressions that must pass
Response
Example request
GET /api /environments /:project_id /eventsExample response
Status 200
List all environments events
Required API key scopes
query:readPath parameters
- project_idstring
Project ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/.
Query parameters
- afterstring
Only return events with a timestamp after this time.
- beforestring
Only return events with a timestamp before this time.
- distinct_idinteger
Filter list by distinct id.
- eventstring
Filter list by event. For example
user sign upor$pageview. - formatstringOne of:
"csv""json" - limitinteger
The maximum number of results to return
- offsetinteger
The initial index from which to return the results.
- person_idinteger
Filter list by person id.
- propertiesarray
Filter events by event property, person property, cohort, groups and more.
- selectarray
(Experimental) JSON-serialized array of HogQL expressions to return
- wherearray
(Experimental) JSON-serialized array of HogQL expressions that must pass
Response
Example request
GET /api /environments /:project_id /eventsExample response
Status 200
Retrieve environments events
Required API key scopes
query:readPath parameters
- idstring
- project_idstring
Project ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/.
Query parameters
- formatstringOne of:
"csv""json"
Response
Example request
GET /api /environments /:project_id /events /:idExample response
Status 200
Retrieve environments events
Required API key scopes
query:readPath parameters
- idstring
- project_idstring
Project ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/.
Query parameters
- formatstringOne of:
"csv""json"
Response
Example request
GET /api /environments /:project_id /events /:idExample response
Status 200
Retrieve environments events values
Required API key scopes
query:readPath parameters
- project_idstring
Project ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/.
Query parameters
- formatstringOne of:
"csv""json"
Example request
GET /api /environments /:project_id /events /valuesExample response
Status 200 No response body
Retrieve environments events values
Required API key scopes
query:readPath parameters
- project_idstring
Project ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/.
Query parameters
- formatstringOne of:
"csv""json"
Example request
GET /api /environments /:project_id /events /valuesExample response
Status 200 No response body
List all environments exports
Required API key scopes
export:readPath parameters
- project_idstring
Project ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/.
Query parameters
- limitinteger
Number of results to return per page.
- offsetinteger
The initial index from which to return the results.
Response
Example request
GET /api /environments /:project_id /exportsExample response
Status 200
List all environments exports
Required API key scopes
export:readPath parameters
- project_idstring
Project ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/.
Query parameters
- limitinteger
Number of results to return per page.
- offsetinteger
The initial index from which to return the results.
Response
Example request
GET /api /environments /:project_id /exportsExample response
Status 200
Create environments exports
Required API key scopes
export:writePath parameters
- project_idstring
Project ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/.
Request parameters
- dashboardinteger
- insightinteger
- export_format
- export_context
Response
Example request
POST /api /environments /:project_id /exportsExample response
Status 201
Create environments exports
Required API key scopes
export:writePath parameters
- project_idstring
Project ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/.
Request parameters
- dashboardinteger
- insightinteger
- export_format
- export_context
Response
Example request
POST /api /environments /:project_id /exportsExample response
Status 201
Retrieve environments exports
Required API key scopes
export:readPath parameters
- idinteger
A unique integer value identifying this exported asset.
- project_idstring
Project ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/.
Response
Example request
GET /api /environments /:project_id /exports /:idExample response
Status 200
Retrieve environments exports
Required API key scopes
export:readPath parameters
- idinteger
A unique integer value identifying this exported asset.
- project_idstring
Project ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/.
Response
Example request
GET /api /environments /:project_id /exports /:idExample response
Status 200
Retrieve environments exports content
Required API key scopes
export:readPath parameters
- idinteger
A unique integer value identifying this exported asset.
- project_idstring
Project ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/.
Example request
GET /api /environments /:project_id /exports /:id /contentExample response
Status 200 No response body
Retrieve environments exports content
Required API key scopes
export:readPath parameters
- idinteger
A unique integer value identifying this exported asset.
- project_idstring
Project ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/.
Example request
GET /api /environments /:project_id /exports /:id /contentExample response
Status 200 No response body
List all environments file system
Required API key scopes
file_system:readPath parameters
- project_idstring
Project ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/.
Query parameters
- limitinteger
Number of results to return per page.
- offsetinteger
The initial index from which to return the results.
- searchstring
A search term.
Response
Example request
GET /api /environments /:project_id /file_systemExample response
Status 200
List all environments file system
Required API key scopes
file_system:readPath parameters
- project_idstring
Project ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/.
Query parameters
- limitinteger
Number of results to return per page.
- offsetinteger
The initial index from which to return the results.
- searchstring
A search term.
Response
Example request
GET /api /environments /:project_id /file_systemExample response
Status 200
Create environments file system
Required API key scopes
file_system:writePath parameters
- project_idstring
Project ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/.
Request parameters
- pathstring
- typestring
- refstring
- hrefstring
- meta
- shortcutboolean
Response
Example request
POST /api /environments /:project_id /file_systemExample response
Status 201
Create environments file system
Required API key scopes
file_system:writePath parameters
- project_idstring
Project ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/.
Request parameters
- pathstring
- typestring
- refstring
- hrefstring
- meta
- shortcutboolean
Response
Example request
POST /api /environments /:project_id /file_systemExample response
Status 201
Retrieve environments file system
Required API key scopes
file_system:readPath parameters
- idstring
A UUID string identifying this file system.
- project_idstring
Project ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/.
Response
Example request
GET /api /environments /:project_id /file_system /:idExample response
Status 200
Retrieve environments file system
Required API key scopes
file_system:readPath parameters
- idstring
A UUID string identifying this file system.
- project_idstring
Project ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/.
Response
Example request
GET /api /environments /:project_id /file_system /:id