insight_variables

get/api/projects/{project_id}/insight_variables/{id}/

Request

  • Base URL: https://us.posthog.com
  • URL: https://us.posthog.com/api/projects/{project_id}/insight_variables/{id}/
  • Auth: HTTP bearer

Path parameters

idstring uuid required

A UUID string identifying this insight variable.

project_idstring required

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

Response

idstring uuid required

UUID of the SQL variable.

namestring required

Human-readable name for the SQL variable.

type'String' | 'Number' | 'Boolean' | 'List' | 'Date' required
  • String - String
  • Number - Number
  • Boolean - Boolean
  • List - List
  • Date - Date
default_valueunknown
created_byinteger nullable required

ID of the user who created the SQL variable.

created_atstring date-time required

Timestamp when the SQL variable was created.

code_namestring nullable required

Generated code-safe name used in HogQL as {variables.code_name}. Derived from name.

valuesunknown
is_multiboolean

Whether a List variable accepts multiple selected values.

values_querystring nullable

HogQL query whose first result column supplies the allowed values for a List variable. An optional second column supplies display labels.

values_query_connection_idstring nullable

ID of the external data source connection values_query runs against. Null runs it against PostHog.

Changes

No recorded changes to this operation across all 1 revision of this API.