PostHog · Schema

EndpointRunRequest

A/B TestingAnalyticsFeature FlagsOpen SourceProduct AnalyticsSession Recording

Properties

Name Type Description
client_query_id string Client provided query ID. Can be used to retrieve the status or cancel the query.
debug boolean Whether to include debug information (such as the executed HogQL) in the response.
filters_override object
limit integer Maximum number of results to return. If not provided, returns all results.
offset integer Number of results to skip. Must be used together with limit. Only supported for HogQL endpoints.
refresh object
variables object 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 (refere
version integer Specific endpoint version to execute. If not provided, the latest version is used.
View JSON Schema on GitHub

JSON Schema

posthog-endpointrunrequest-schema.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "#/components/schemas/EndpointRunRequest",
  "title": "EndpointRunRequest",
  "additionalProperties": false,
  "properties": {
    "client_query_id": {
      "default": null,
      "description": "Client provided query ID. Can be used to retrieve the status or cancel the query.",
      "title": "Client Query Id",
      "type": "string",
      "nullable": true
    },
    "debug": {
      "default": false,
      "description": "Whether to include debug information (such as the executed HogQL) in the response.",
      "title": "Debug",
      "type": "boolean",
      "nullable": true
    },
    "filters_override": {
      "default": null,
      "allOf": [
        {
          "$ref": "#/components/schemas/DashboardFilter"
        }
      ],
      "nullable": true
    },
    "limit": {
      "default": null,
      "description": "Maximum number of results to return. If not provided, returns all results.",
      "title": "Limit",
      "type": "integer",
      "nullable": true
    },
    "offset": {
      "default": null,
      "description": "Number of results to skip. Must be used together with limit. Only supported for HogQL endpoints.",
      "title": "Offset",
      "type": "integer",
      "nullable": true
    },
    "refresh": {
      "default": "cache",
      "allOf": [
        {
          "$ref": "#/components/schemas/EndpointRefreshMode"
        }
      ],
      "nullable": true
    },
    "variables": {
      "default": null,
      "description": "Variables to parameterize the endpoint query. The key is the variable name and the value is the variable value.\n\nFor HogQL endpoints:   Keys must match a variable `code_name` defined in the query (referenced as `{variables.code_name}`).   Example: `{\"event_name\": \"$pageview\"}`\n\nFor 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\"}`\n\nFor 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.\n\nUnknown variable names will return a 400 error.",
      "title": "Variables",
      "additionalProperties": true,
      "type": "object",
      "nullable": true
    },
    "version": {
      "default": null,
      "description": "Specific endpoint version to execute. If not provided, the latest version is used.",
      "title": "Version",
      "type": "integer",
      "nullable": true
    }
  },
  "type": "object"
}