Endpoints
For instructions on how to authenticate to use this endpoint, see API overview.
Endpoints
GET | |
POST | |
GET | |
PATCH | |
DELETE | |
GET | |
GET | |
POST | |
GET | |
GET | |
POST | |
GET | |
POST | |
GET |
Retrieve environments endpoints
Required API key scopes
endpoint:readPath parameters
- project_idstring
Example request
GET /api /environments /:project_id /endpointsExample response
Status 200 No response body
Create environments endpoints
Create a new endpoint
Required API key scopes
endpoint:writePath parameters
- project_idstring
Request parameters
- cache_age_secondsnumber
- derived_from_insightstring
- descriptionstring
- is_activeboolean
- is_materializedboolean
- namestring
- query
- sync_frequency
Example request
POST /api /environments /:project_id /endpointsExample response
Status 201 No response body
Retrieve environments endpoints retrieve
Retrieve an endpoint.
Required API key scopes
endpoint:readPath parameters
- namestring
- project_idstring
Example request
GET /api /environments /:project_id /endpoints /:nameExample response
Status 200 No response body
Update environments endpoints
Path parameters
- namestring
- project_idstring
Example request
PATCH /api /environments /:project_id /endpoints /:nameExample response
Status 200 No response body
Delete environments endpoints
Delete an endpoint and clean up materialized query.
Required API key scopes
endpoint:writePath parameters
- namestring
- project_idstring
Example request
DELETE /api /environments /:project_id /endpoints /:nameExample response
Status 204 No response body
Retrieve environments endpoints materialization status
Get materialization status for an endpoint.
Path parameters
- namestring
- project_idstring
Example request
GET /api /environments /:project_id /endpoints /:name /materialization_statusExample response
Status 200 No response body
Retrieve environments endpoints run
Execute endpoint with optional materialization. Supports version parameter, runs latest version if not set.
Required API key scopes
endpoint:readPath parameters
- namestring
- project_idstring
Example request
GET /api /environments /:project_id /endpoints /:name /runExample response
Status 200 No response body
Create environments endpoints run
Execute endpoint with optional materialization. Supports version parameter, runs latest version if not set.
Required API key scopes
endpoint:readPath parameters
- namestring
- project_idstring
Request parameters
- client_query_idstring
- filters_override
- query_overrideobject
- refreshDefault:
blocking - variablesobject
Example request
POST /api /environments /:project_id /endpoints /:name /runExample response
Status 200 No response body
Retrieve environments endpoints versions
List all versions for an endpoint.
Required API key scopes
endpoint:readPath parameters
- namestring
- project_idstring
Example request
GET /api /environments /:project_id /endpoints /:name /versionsExample response
Status 200 No response body
Retrieve environments endpoints versions retrieve
Get details of a specific endpoint version.
Required API key scopes
endpoint:readPath parameters
- namestring
- project_idstring
- version_numberstring
Example request
GET /api /environments /:project_id /endpoints /:name /versions /:version_numberExample response
Status 200 No response body
Create environments endpoints last execution times
Get the last execution times in the past 6 months for multiple endpoints.
Path parameters
- project_idstring
Request parameters
- namesarray
Response
Example request
POST /api /environments /:project_id /endpoints /last_execution_timesExample response
Status 200
RESPONSE
Retrieve endpoints
Required API key scopes
endpoint:readPath parameters
- project_idstring
Example request
GET /api /projects /:project_id /endpointsExample response
Status 200 No response body
Retrieve endpoints
Required API key scopes
endpoint:readPath parameters
- project_idstring
Example request
GET /api /projects /:project_id /endpointsExample response
Status 200 No response body
Create endpoints
Create a new endpoint
Required API key scopes
endpoint:writePath parameters
- project_idstring
Request parameters
- cache_age_secondsnumber
- derived_from_insightstring
- descriptionstring
- is_activeboolean
- is_materializedboolean
- namestring
- query
- sync_frequency
Example request
POST /api /projects /:project_id /endpointsExample response
Status 201 No response body
Create endpoints
Create a new endpoint
Required API key scopes
endpoint:writePath parameters
- project_idstring
Request parameters
- cache_age_secondsnumber
- derived_from_insightstring
- descriptionstring
- is_activeboolean
- is_materializedboolean
- namestring
- query
- sync_frequency
Example request
POST /api /projects /:project_id /endpointsExample response
Status 201 No response body
Retrieve endpoints retrieve
Retrieve an endpoint.
Required API key scopes
endpoint:readPath parameters
- namestring
- project_idstring
Example request
GET /api /projects /:project_id /endpoints /:nameExample response
Status 200 No response body
Retrieve endpoints retrieve
Retrieve an endpoint.
Required API key scopes
endpoint:readPath parameters
- namestring
- project_idstring
Example request
GET /api /projects /:project_id /endpoints /:nameExample response
Status 200 No response body
PostHog is an all-in-one developer platform for building successful products. We provide product analytics, web analytics, session replay, error tracking, feature flags, experiments, surveys, LLM analytics, data warehouse, CDP, and an AI product assistant to help debug your code, ship features faster, and keep all your usage and customer data in one stack.