provider endpoints POST /api/projects/{project_id}/endpoints/{name}/run/
@utdk/posthog /api/projects/{project_id}/endpoints/{name}/run/
endpoints_run_create
Execute endpoint with optional materialization. Supports version parameter, runs latest version if not set.
name path required
string
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

Try it

Authentication
Configure credentials for PostHog API
endpointsRunCreate
POST/api/projects/{project_id}/endpoints/{name}/run/
Execute endpoint with optional materialization. Supports version parameter, runs latest version if not set.

Parameters

required
required

Project ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/.

Input

Client provided query ID. Can be used to retrieve the status or cancel the query.

Whether to include debug information (such as the executed HogQL) in the response.

Maximum number of results to return. If not provided, returns all results.

Number of results to skip. Must be used together with limit. Only supported for HogQL endpoints.

Variables to parameterize the endpoint query. The key is the variable name and the value is the variable value. For HogQL endpoints: Keys must match a variable `code_name` defined in the query (referenced as `{variables.code_name}`). Example: `{"event_name": "$pageview"}` For non-materialized insight endpoints (e.g. TrendsQuery): - `date_from` and `date_to` are built-in variables that filter the date range. Example: `{"date_from": "2024-01-01", "date_to": "2024-01-31"}` For materialized insight endpoints: - Use the breakdown property name as the key to filter by breakdown value. Example: `{"$browser": "Chrome"}` - `date_from`/`date_to` are not supported on materialized insight endpoints. Unknown variable names will return a 400 error.

Specific endpoint version to execute. If not provided, the latest version is used.

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.endpointsRunCreate({
  "client_query_id": "null",
  "debug": "false",
  "filters_override": "null",
  "limit": "null",
  "offset": "null",
  "refresh": "cache",
  "variables": "null",
  "version": "null"
})