PatchedUser
{
"type": "object",
"properties": {
"team": {
"$ref": "#/components/schemas/TeamBasic"
},
"uuid": {
"type": "string",
"format": "uuid",
"readOnly": true
},
"email": {
"type": "string",
"title": "Email address",
"format": "email",
"maxLength": 254
},
"is_staff": {
"type": "boolean",
"title": "Staff status",
"description": "Designates whether the user can log into this admin site."
},
"password": {
"type": "string",
"maxLength": 128,
"writeOnly": true
},
"last_name": {
"type": "string",
"maxLength": 150
},
"first_name": {
"type": "string",
"maxLength": 150
},
"theme_mode": {
"oneOf": [
{
"$ref": "#/components/schemas/ThemeModeEnum"
},
{
"$ref": "#/components/schemas/BlankEnum"
},
{
"$ref": "#/components/schemas/NullEnum"
}
],
"nullable": true
},
"date_joined": {
"type": "string",
"format": "date-time",
"readOnly": true
},
"distinct_id": {
"type": "string",
"nullable": true,
"maxLength": 200
},
"email_opt_in": {
"type": "boolean",
"nullable": true
},
"has_password": {
"type": "boolean",
"readOnly": true
},
"organization": {
"$ref": "#/components/schemas/Organization"
},
"toolbar_mode": {
"oneOf": [
{
"$ref": "#/components/schemas/ToolbarModeEnum"
},
{
"$ref": "#/components/schemas/BlankEnum"
},
{
"$ref": "#/components/schemas/NullEnum"
}
],
"nullable": true
},
"organizations": {
"type": "array",
"items": {
"$ref": "#/components/schemas/OrganizationBasic"
},
"readOnly": true
},
"pending_email": {
"type": "string",
"title": "Pending email address awaiting verification",
"format": "email",
"nullable": true,
"maxLength": 254
},
"anonymize_data": {
"type": "boolean",
"nullable": true
},
"is_2fa_enabled": {
"type": "boolean",
"readOnly": true
},
"has_social_auth": {
"type": "boolean",
"readOnly": true
},
"is_impersonated": {
"type": "boolean",
"nullable": true,
"readOnly": true
},
"current_password": {
"type": "string",
"writeOnly": true
},
"set_current_team": {
"type": "string",
"writeOnly": true
},
"is_email_verified": {
"type": "boolean",
"nullable": true
},
"events_column_config": {},
"notification_settings": {
"type": "object",
"additionalProperties": {}
},
"scene_personalisation": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ScenePersonalisationBasic"
},
"readOnly": true
},
"set_current_organization": {
"type": "string",
"writeOnly": true
},
"has_seen_product_intro_for": {
"nullable": true
}
},
"x-konfig-properties": {
"team": {
"readOnly": true
},
"organization": {
"readOnly": true
}
}
}
PathCleaningFilter
{
"type": "object",
"title": "PathCleaningFilter",
"properties": {
"alias": {
"type": "string",
"title": "Alias",
"default": null,
"nullable": true
},
"regex": {
"type": "string",
"title": "Regex",
"default": null,
"nullable": true
}
}
}
PathType
{
"enum": [
"$pageview",
"$screen",
"custom_event",
"hogql"
],
"type": "string",
"title": "PathType"
}
PathsFilter
{
"type": "object",
"title": "PathsFilter",
"properties": {
"endPoint": {
"type": "string",
"title": "Endpoint",
"default": null,
"nullable": true
},
"edgeLimit": {
"type": "integer",
"title": "Edgelimit",
"default": null,
"nullable": true
},
"stepLimit": {
"type": "integer",
"title": "Steplimit",
"default": null,
"nullable": true
},
"pathEndKey": {
"type": "string",
"title": "Pathendkey",
"default": null,
"nullable": true,
"description": "Relevant only within actors query"
},
"startPoint": {
"type": "string",
"title": "Startpoint",
"default": null,
"nullable": true
},
"pathStartKey": {
"type": "string",
"title": "Pathstartkey",
"default": null,
"nullable": true,
"description": "Relevant only within actors query"
},
"excludeEvents": {
"type": "array",
"items": {
"type": "string"
},
"title": "Excludeevents",
"default": null,
"nullable": true
},
"maxEdgeWeight": {
"type": "integer",
"title": "Maxedgeweight",
"default": null,
"nullable": true
},
"minEdgeWeight": {
"type": "integer",
"title": "Minedgeweight",
"default": null,
"nullable": true
},
"pathGroupings": {
"type": "array",
"items": {
"type": "string"
},
"title": "Pathgroupings",
"default": null,
"nullable": true
},
"pathDropoffKey": {
"type": "string",
"title": "Pathdropoffkey",
"default": null,
"nullable": true,
"description": "Relevant only within actors query"
},
"pathReplacements": {
"type": "boolean",
"title": "Pathreplacements",
"default": null,
"nullable": true
},
"includeEventTypes": {
"type": "array",
"items": {
"$ref": "#/components/schemas/PathType"
},
"title": "Includeeventtypes",
"default": null,
"nullable": true
},
"pathsHogQLExpression": {
"type": "string",
"title": "Pathshogqlexpression",
"default": null,
"nullable": true
},
"localPathCleaningFilters": {
"type": "array",
"items": {
"$ref": "#/components/schemas/PathCleaningFilter"
},
"title": "Localpathcleaningfilters",
"default": null,
"nullable": true
}
}
}
PathsQuery
{
"type": "object",
"title": "PathsQuery",
"required": [
"pathsFilter"
],
"properties": {
"kind": {
"const": "PathsQuery",
"title": "Kind",
"default": "PathsQuery"
},
"response": {
"$ref": "#/components/schemas/PathsQueryResponseNullable"
},
"dateRange": {
"$ref": "#/components/schemas/DateRangeNullable"
},
"properties": {
"anyOf": [
{
"type": "array",
"items": {
"anyOf": [
{
"$ref": "#/components/schemas/EventPropertyFilter"
},
{
"$ref": "#/components/schemas/PersonPropertyFilter"
},
{
"$ref": "#/components/schemas/ElementPropertyFilter"
},
{
"$ref": "#/components/schemas/SessionPropertyFilter"
},
{
"$ref": "#/components/schemas/CohortPropertyFilter"
},
{
"$ref": "#/components/schemas/RecordingDurationFilter"
},
{
"$ref": "#/components/schemas/GroupPropertyFilter"
},
{
"$ref": "#/components/schemas/FeaturePropertyFilter"
},
{
"$ref": "#/components/schemas/HogQLPropertyFilter"
},
{
"$ref": "#/components/schemas/EmptyPropertyFilter"
},
{
"$ref": "#/components/schemas/DataWarehousePropertyFilter"
},
{
"$ref": "#/components/schemas/DataWarehousePersonPropertyFilter"
}
]
}
},
{
"$ref": "#/components/schemas/PropertyGroupFilter"
}
],
"title": "Properties",
"default": null,
"nullable": true,
"description": "Property filters for all series"
},
"pathsFilter": {
"$ref": "#/components/schemas/PathsFilter"
},
"samplingFactor": {
"type": "number",
"title": "Samplingfactor",
"default": null,
"nullable": true,
"description": "Sampling rate"
},
"funnelPathsFilter": {
"$ref": "#/components/schemas/FunnelPathsFilterNullable"
},
"filterTestAccounts": {
"type": "boolean",
"title": "Filtertestaccounts",
"default": null,
"nullable": true,
"description": "Exclude internal and test users by applying the respective filters"
},
"aggregation_group_type_index": {
"type": "integer",
"title": "Aggregation Group Type Index",
"default": null,
"nullable": true,
"description": "Groups aggregation"
}
},
"x-konfig-properties": {
"pathsFilter": {
"description": "Properties specific to the paths insight"
}
}
}
PathsQueryResponse
{
"type": "object",
"title": "PathsQueryResponse",
"required": [
"results"
],
"properties": {
"hogql": {
"type": "string",
"title": "Hogql",
"default": null,
"nullable": true
},
"results": {
"type": "array",
"items": {
"type": "object"
},
"title": "Results"
},
"timings": {
"type": "array",
"items": {
"$ref": "#/components/schemas/QueryTiming"
},
"title": "Timings",
"default": null,
"nullable": true
},
"is_cached": {
"type": "boolean",
"title": "Is Cached",
"default": null,
"nullable": true
},
"last_refresh": {
"type": "string",
"title": "Last Refresh",
"default": null,
"nullable": true
},
"next_allowed_client_refresh": {
"type": "string",
"title": "Next Allowed Client Refresh",
"default": null,
"nullable": true
}
}
}
PathsQueryResponseNullable
{
"type": "object",
"title": "PathsQueryResponse",
"default": null,
"nullable": true,
"required": [
"results"
],
"properties": {
"hogql": {
"type": "string",
"title": "Hogql",
"default": null,
"nullable": true
},
"results": {
"type": "array",
"items": {
"type": "object"
},
"title": "Results"
},
"timings": {
"type": "array",
"items": {
"$ref": "#/components/schemas/QueryTiming"
},
"title": "Timings",
"default": null,
"nullable": true
},
"is_cached": {
"type": "boolean",
"title": "Is Cached",
"default": null,
"nullable": true
},
"last_refresh": {
"type": "string",
"title": "Last Refresh",
"default": null,
"nullable": true
},
"next_allowed_client_refresh": {
"type": "string",
"title": "Next Allowed Client Refresh",
"default": null,
"nullable": true
}
}
}
Person
{
"type": "object",
"required": [
"created_at",
"distinct_ids",
"id",
"name",
"uuid"
],
"properties": {
"id": {
"type": "integer",
"readOnly": true
},
"name": {
"type": "string",
"readOnly": true
},
"uuid": {
"type": "string",
"format": "uuid",
"readOnly": true
},
"created_at": {
"type": "string",
"format": "date-time",
"readOnly": true
},
"properties": {},
"distinct_ids": {
"type": "array",
"items": {
"type": "string"
},
"readOnly": true
}
}
}
PersonNullable
{
"type": "object",
"default": null,
"nullable": true,
"required": [
"created_at",
"distinct_ids",
"id",
"name",
"uuid"
],
"properties": {
"id": {
"type": "integer",
"readOnly": true
},
"name": {
"type": "string",
"readOnly": true
},
"uuid": {
"type": "string",
"format": "uuid",
"readOnly": true
},
"created_at": {
"type": "string",
"format": "date-time",
"readOnly": true
},
"properties": {},
"distinct_ids": {
"type": "array",
"items": {
"type": "string"
},
"readOnly": true
}
}
}
PersonPropertyFilter
{
"type": "object",
"title": "PersonPropertyFilter",
"required": [
"key",
"operator"
],
"properties": {
"key": {
"type": "string",
"title": "Key"
},
"type": {
"const": "person",
"title": "Type",
"default": "person",
"description": "Person properties"
},
"label": {
"type": "string",
"title": "Label",
"default": null,
"nullable": true
},
"value": {
"anyOf": [
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "string"
},
{
"type": "number"
}
]
}
}
],
"title": "Value",
"default": null,
"nullable": true
},
"operator": {
"$ref": "#/components/schemas/PropertyOperator"
}
}
}
PersonsArgMaxVersion
{
"enum": [
"auto",
"v1",
"v2"
],
"type": "string",
"title": "PersonsArgMaxVersion"
}
PersonsArgMaxVersionNullable
{
"enum": [
"auto",
"v1",
"v2"
],
"type": "string",
"title": "PersonsArgMaxVersion",
"default": null,
"nullable": true
}
PersonsNode
{
"type": "object",
"title": "PersonsNode",
"properties": {
"kind": {
"const": "PersonsNode",
"title": "Kind",
"default": "PersonsNode"
},
"limit": {
"type": "integer",
"title": "Limit",
"default": null,
"nullable": true
},
"cohort": {
"type": "integer",
"title": "Cohort",
"default": null,
"nullable": true
},
"offset": {
"type": "integer",
"title": "Offset",
"default": null,
"nullable": true
},
"search": {
"type": "string",
"title": "Search",
"default": null,
"nullable": true
},
"response": {
"type": "object",
"title": "Response",
"default": null,
"nullable": true,
"description": "Cached query response"
},
"distinctId": {
"type": "string",
"title": "Distinctid",
"default": null,
"nullable": true
},
"properties": {
"type": "array",
"items": {
"anyOf": [
{
"$ref": "#/components/schemas/EventPropertyFilter"
},
{
"$ref": "#/components/schemas/PersonPropertyFilter"
},
{
"$ref": "#/components/schemas/ElementPropertyFilter"
},
{
"$ref": "#/components/schemas/SessionPropertyFilter"
},
{
"$ref": "#/components/schemas/CohortPropertyFilter"
},
{
"$ref": "#/components/schemas/RecordingDurationFilter"
},
{
"$ref": "#/components/schemas/GroupPropertyFilter"
},
{
"$ref": "#/components/schemas/FeaturePropertyFilter"
},
{
"$ref": "#/components/schemas/HogQLPropertyFilter"
},
{
"$ref": "#/components/schemas/EmptyPropertyFilter"
},
{
"$ref": "#/components/schemas/DataWarehousePropertyFilter"
},
{
"$ref": "#/components/schemas/DataWarehousePersonPropertyFilter"
}
]
},
"title": "Properties",
"default": null,
"nullable": true,
"description": "Properties configurable in the interface"
},
"fixedProperties": {
"type": "array",
"items": {
"anyOf": [
{
"$ref": "#/components/schemas/EventPropertyFilter"
},
{
"$ref": "#/components/schemas/PersonPropertyFilter"
},
{
"$ref": "#/components/schemas/ElementPropertyFilter"
},
{
"$ref": "#/components/schemas/SessionPropertyFilter"
},
{
"$ref": "#/components/schemas/CohortPropertyFilter"
},
{
"$ref": "#/components/schemas/RecordingDurationFilter"
},
{
"$ref": "#/components/schemas/GroupPropertyFilter"
},
{
"$ref": "#/components/schemas/FeaturePropertyFilter"
},
{
"$ref": "#/components/schemas/HogQLPropertyFilter"
},
{
"$ref": "#/components/schemas/EmptyPropertyFilter"
},
{
"$ref": "#/components/schemas/DataWarehousePropertyFilter"
},
{
"$ref": "#/components/schemas/DataWarehousePersonPropertyFilter"
}
]
},
"title": "Fixedproperties",
"default": null,
"nullable": true,
"description": "Fixed properties in the query, can't be edited in the interface (e.g. scoping down by person)"
}
}
}
PersonsOnEventsMode
{
"enum": [
"disabled",
"person_id_no_override_properties_on_events",
"person_id_override_properties_on_events",
"person_id_override_properties_joined"
],
"type": "string",
"title": "PersonsOnEventsMode"
}
PersonsOnEventsModeNullable
{
"enum": [
"disabled",
"person_id_no_override_properties_on_events",
"person_id_override_properties_on_events",
"person_id_override_properties_joined"
],
"type": "string",
"title": "PersonsOnEventsMode",
"default": null,
"nullable": true
}
Plugin
{
"type": "object",
"required": [
"id",
"latest_tag",
"organization_id",
"organization_name",
"url"
],
"properties": {
"id": {
"type": "integer",
"readOnly": true
},
"tag": {
"type": "string",
"nullable": true,
"maxLength": 200
},
"url": {
"type": "string",
"nullable": true,
"readOnly": true
},
"icon": {
"type": "string",
"nullable": true,
"maxLength": 800
},
"name": {
"type": "string",
"nullable": true,
"maxLength": 200
},
"metrics": {
"nullable": true
},
"is_global": {
"type": "boolean"
},
"latest_tag": {
"type": "string",
"nullable": true,
"readOnly": true
},
"description": {
"type": "string",
"nullable": true
},
"plugin_type": {
"oneOf": [
{
"$ref": "#/components/schemas/PluginTypeEnum"
},
{
"$ref": "#/components/schemas/BlankEnum"
},
{
"$ref": "#/components/schemas/NullEnum"
}
],
"nullable": true
},
"public_jobs": {
"nullable": true
},
"capabilities": {},
"config_schema": {},
"organization_id": {
"type": "string",
"format": "uuid",
"readOnly": true
},
"organization_name": {
"type": "string",
"readOnly": true
}
}
}
PluginConfig
{
"type": "object",
"required": [
"config",
"created_at",
"delivery_rate_24h",
"error",
"id",
"order",
"plugin",
"plugin_info",
"team_id",
"updated_at"
],
"properties": {
"id": {
"type": "integer",
"readOnly": true
},
"name": {
"type": "string",
"nullable": true,
"maxLength": 400
},
"error": {
"type": "string",
"readOnly": true
},
"order": {
"type": "integer",
"maximum": 2147483647,
"minimum": -2147483648
},
"config": {
"type": "string",
"readOnly": true
},
"plugin": {
"type": "integer"
},
"deleted": {
"type": "boolean",
"nullable": true
},
"enabled": {
"type": "boolean"
},
"team_id": {
"type": "integer",
"nullable": true,
"readOnly": true
},
"created_at": {
"type": "string",
"format": "date-time",
"readOnly": true
},
"updated_at": {
"type": "string",
"format": "date-time",
"readOnly": true
},
"description": {
"type": "string",
"nullable": true,
"maxLength": 1000
},
"plugin_info": {
"type": "string",
"readOnly": true
},
"delivery_rate_24h": {
"type": "string",
"readOnly": true
}
}
}
PluginLogEntry
{
"type": "object",
"required": [
"id",
"instance_id",
"message",
"plugin_config_id",
"plugin_id",
"source",
"team_id",
"timestamp",
"type"
],
"properties": {
"id": {
"type": "string",
"format": "uuid"
},
"type": {
"$ref": "#/components/schemas/PluginLogEntryTypeEnum"
},
"source": {
"$ref": "#/components/schemas/SourceEnum"
},
"message": {
"type": "string"
},
"team_id": {
"type": "integer"
},
"plugin_id": {
"type": "integer"
},
"timestamp": {
"type": "string",
"format": "date-time"
},
"instance_id": {
"type": "string",
"format": "uuid"
},
"plugin_config_id": {
"type": "integer"
}
}
}
PluginLogEntryTypeEnum
{
"enum": [
"DEBUG",
"LOG",
"INFO",
"WARN",
"ERROR"
],
"type": "string",
"description": "* `DEBUG` - DEBUG\n* `LOG` - LOG\n* `INFO` - INFO\n* `WARN` - WARN\n* `ERROR` - ERROR"
}
PluginTypeEnum
{
"enum": [
"local",
"custom",
"repository",
"source"
],
"type": "string",
"description": "* `local` - local\n* `custom` - custom\n* `repository` - repository\n* `source` - source"
}
PluginsAccessLevelEnum
{
"enum": [
0,
3,
6,
9
],
"type": "integer",
"description": "* `0` - none\n* `3` - config\n* `6` - install\n* `9` - root"
}
Property
{
"type": "object",
"required": [
"values"
],
"properties": {
"type": {
"$ref": "#/components/schemas/PropertyTypeEnum"
},
"values": {
"type": "array",
"items": {
"$ref": "#/components/schemas/PropertyItem"
}
}
},
"x-konfig-properties": {
"type": {
"default": "AND",
"description": "\n You can use a simplified version:\n```json\n{\n \"properties\": [\n {\n \"key\": \"email\",\n \"value\": \"x@y.com\",\n \"operator\": \"exact\",\n \"type\": \"event\"\n }\n ]\n}\n```\n\nOr you can create more complicated queries with AND and OR:\n```json\n{\n \"properties\": {\n \"type\": \"AND\",\n \"values\": [\n {\n \"type\": \"OR\",\n \"values\": [\n {\"key\": \"email\", ...},\n {\"key\": \"email\", ...}\n ]\n },\n {\n \"type\": \"AND\",\n \"values\": [\n {\"key\": \"email\", ...},\n {\"key\": \"email\", ...}\n ]\n }\n ]\n ]\n}\n```\n\n\n* `AND` - AND\n* `OR` - OR"
}
}
}
PropertyGroupFilter
{
"type": "object",
"title": "PropertyGroupFilter",
"required": [
"type",
"values"
],
"properties": {
"type": {
"$ref": "#/components/schemas/FilterLogicalOperator"
},
"values": {
"type": "array",
"items": {
"$ref": "#/components/schemas/PropertyGroupFilterValue"
},
"title": "Values"
}
}
}
PropertyGroupFilterValue
{
"type": "object",
"title": "PropertyGroupFilterValue",
"required": [
"type",
"values"
],
"properties": {
"type": {
"$ref": "#/components/schemas/FilterLogicalOperator"
},
"values": {
"type": "array",
"items": {
"anyOf": [
{
"$ref": "#/components/schemas/PropertyGroupFilterValue"
},
{
"$ref": "#/components/schemas/EventPropertyFilter"
},
{
"$ref": "#/components/schemas/PersonPropertyFilter"
},
{
"$ref": "#/components/schemas/ElementPropertyFilter"
},
{
"$ref": "#/components/schemas/SessionPropertyFilter"
},
{
"$ref": "#/components/schemas/CohortPropertyFilter"
},
{
"$ref": "#/components/schemas/RecordingDurationFilter"
},
{
"$ref": "#/components/schemas/GroupPropertyFilter"
},
{
"$ref": "#/components/schemas/FeaturePropertyFilter"
},
{
"$ref": "#/components/schemas/HogQLPropertyFilter"
},
{
"$ref": "#/components/schemas/EmptyPropertyFilter"
},
{
"$ref": "#/components/schemas/DataWarehousePropertyFilter"
},
{
"$ref": "#/components/schemas/DataWarehousePersonPropertyFilter"
}
]
},
"title": "Values"
}
}
}
PropertyItem
{
"type": "object",
"required": [
"key",
"value"
],
"properties": {
"key": {
"type": "string",
"description": "Key of the property you're filtering on. For example `email` or `$current_url`"
},
"type": {
"oneOf": [
{
"$ref": "#/components/schemas/PropertyItemTypeEnum"
},
{
"$ref": "#/components/schemas/BlankEnum"
}
],
"default": "event"
},
"value": {
"type": "string",
"description": "Value of your filter. For example `test@example.com` or `https://example.com/test/`. Can be an array for an OR query, like `[\"test@example.com\",\"ok@example.com\"]`"
},
"operator": {
"oneOf": [
{
"$ref": "#/components/schemas/OperatorEnum"
},
{
"$ref": "#/components/schemas/BlankEnum"
},
{
"$ref": "#/components/schemas/NullEnum"
}
],
"default": "exact",
"nullable": true
}
}
}
PropertyItemTypeEnum
{
"enum": [
"event",
"feature",
"person",
"cohort",
"element",
"static-cohort",
"precalculated-cohort",
"group",
"recording",
"behavioral",
"session",
"hogql",
"data_warehouse",
"data_warehouse_person_property"
],
"type": "string",
"description": "* `event` - event\n* `feature` - feature\n* `person` - person\n* `cohort` - cohort\n* `element` - element\n* `static-cohort` - static-cohort\n* `precalculated-cohort` - precalculated-cohort\n* `group` - group\n* `recording` - recording\n* `behavioral` - behavioral\n* `session` - session\n* `hogql` - hogql\n* `data_warehouse` - data_warehouse\n* `data_warehouse_person_property` - data_warehouse_person_property"
}
PropertyMathType
{
"enum": [
"avg",
"sum",
"min",
"max",
"median",
"p90",
"p95",
"p99"
],
"type": "string",
"title": "PropertyMathType"
}
PropertyOperator
{
"enum": [
"exact",
"is_not",
"icontains",
"not_icontains",
"regex",
"not_regex",
"gt",
"gte",
"lt",
"lte",
"is_set",
"is_not_set",
"is_date_exact",
"is_date_before",
"is_date_after",
"between",
"not_between",
"min",
"max"
],
"type": "string",
"title": "PropertyOperator"
}
PropertyTypeEnum
{
"enum": [
"AND",
"OR"
],
"type": "string",
"description": "* `AND` - AND\n* `OR` - OR"
}
QueryRequest
{
"type": "object",
"title": "QueryRequest",
"required": [
"query"
],
"properties": {
"async": {
"type": "boolean",
"title": "Async",
"default": null,
"example": true,
"nullable": true,
"x-examples": [
true
],
"description": "(Experimental) Whether to run the query asynchronously. Defaults to False. If True, the `id` of the query can be used to check the status and to cancel it."
},
"query": {
"oneOf": [
{
"$ref": "#/components/schemas/EventsNode"
},
{
"$ref": "#/components/schemas/ActionsNode"
},
{
"$ref": "#/components/schemas/PersonsNode"
},
{
"$ref": "#/components/schemas/DataWarehouseNode"
},
{
"$ref": "#/components/schemas/TimeToSeeDataSessionsQuery"
},
{
"$ref": "#/components/schemas/EventsQuery"
},
{
"$ref": "#/components/schemas/ActorsQuery"
},
{
"$ref": "#/components/schemas/InsightActorsQuery"
},
{
"$ref": "#/components/schemas/InsightActorsQueryOptions"
},
{
"$ref": "#/components/schemas/SessionsTimelineQuery"
},
{
"$ref": "#/components/schemas/HogQLQuery"
},
{
"$ref": "#/components/schemas/HogQLMetadata"
},
{
"$ref": "#/components/schemas/HogQLAutocomplete"
},
{
"$ref": "#/components/schemas/WebOverviewQuery"
},
{
"$ref": "#/components/schemas/WebStatsTableQuery"
},
{
"$ref": "#/components/schemas/WebTopClicksQuery"
},
{
"$ref": "#/components/schemas/DataVisualizationNode"
},
{
"$ref": "#/components/schemas/DataTableNode"
},
{
"$ref": "#/components/schemas/SavedInsightNode"
},
{
"$ref": "#/components/schemas/InsightVizNode"
},
{
"$ref": "#/components/schemas/TrendsQuery"
},
{
"$ref": "#/components/schemas/FunnelsQuery"
},
{
"$ref": "#/components/schemas/RetentionQuery"
},
{
"$ref": "#/components/schemas/PathsQuery"
},
{
"$ref": "#/components/schemas/StickinessQuery"
},
{
"$ref": "#/components/schemas/LifecycleQuery"
},
{
"$ref": "#/components/schemas/FunnelCorrelationQuery"
},
{
"$ref": "#/components/schemas/DatabaseSchemaQuery"
}
],
"title": "Query",
"description": "Submit a JSON string representing a query for PostHog data analysis, for example a HogQL query.\n\nExample payload:\n\n```\n\n{\"query\": {\"kind\": \"HogQLQuery\", \"query\": \"select * from events limit 100\"}}\n\n```\n\nFor more details on HogQL queries, see the [PostHog HogQL documentation](/docs/hogql#api-access).",
"discriminator": {
"mapping": {
"EventsNode": "#/components/schemas/EventsNode",
"HogQLQuery": "#/components/schemas/HogQLQuery",
"PathsQuery": "#/components/schemas/PathsQuery",
"ActionsNode": "#/components/schemas/ActionsNode",
"ActorsQuery": "#/components/schemas/ActorsQuery",
"EventsQuery": "#/components/schemas/EventsQuery",
"PersonsNode": "#/components/schemas/PersonsNode",
"TrendsQuery": "#/components/schemas/TrendsQuery",
"FunnelsQuery": "#/components/schemas/FunnelsQuery",
"DataTableNode": "#/components/schemas/DataTableNode",
"HogQLMetadata": "#/components/schemas/HogQLMetadata",
"InsightVizNode": "#/components/schemas/InsightVizNode",
"LifecycleQuery": "#/components/schemas/LifecycleQuery",
"RetentionQuery": "#/components/schemas/RetentionQuery",
"StickinessQuery": "#/components/schemas/StickinessQuery",
"SavedInsightNode": "#/components/schemas/SavedInsightNode",
"WebOverviewQuery": "#/components/schemas/WebOverviewQuery",
"DataWarehouseNode": "#/components/schemas/DataWarehouseNode",
"HogQLAutocomplete": "#/components/schemas/HogQLAutocomplete",
"WebTopClicksQuery": "#/components/schemas/WebTopClicksQuery",
"InsightActorsQuery": "#/components/schemas/InsightActorsQuery",
"WebStatsTableQuery": "#/components/schemas/WebStatsTableQuery",
"DatabaseSchemaQuery": "#/components/schemas/DatabaseSchemaQuery",
"DataVisualizationNode": "#/components/schemas/DataVisualizationNode",
"SessionsTimelineQuery": "#/components/schemas/SessionsTimelineQuery",
"FunnelCorrelationQuery": "#/components/schemas/FunnelCorrelationQuery",
"InsightActorsQueryOptions": "#/components/schemas/InsightActorsQueryOptions",
"TimeToSeeDataSessionsQuery": "#/components/schemas/TimeToSeeDataSessionsQuery"
},
"propertyName": "kind"
}
},
"refresh": {
"type": "boolean",
"title": "Refresh",
"default": null,
"nullable": true
},
"client_query_id": {
"type": "string",
"title": "Client Query Id",
"default": null,
"nullable": true,
"description": "Client provided query ID. Can be used to retrieve the status or cancel the query."
}
}
}
QueryResponseAlternative
{
"anyOf": [
{
"$ref": "#/components/schemas/QueryResponseAlternative1"
},
{
"type": "object"
},
{
"$ref": "#/components/schemas/QueryResponseAlternative2"
},
{
"$ref": "#/components/schemas/QueryResponseAlternative3"
},
{
"$ref": "#/components/schemas/QueryResponseAlternative4"
},
{
"$ref": "#/components/schemas/QueryResponseAlternative5"
},
{
"$ref": "#/components/schemas/QueryResponseAlternative6"
},
{
"$ref": "#/components/schemas/QueryResponseAlternative7"
},
{
"$ref": "#/components/schemas/QueryResponseAlternative8"
},
{
"$ref": "#/components/schemas/QueryResponseAlternative9"
},
{
"$ref": "#/components/schemas/QueryResponseAlternative10"
},
{
"$ref": "#/components/schemas/QueryResponseAlternative11"
},
{
"$ref": "#/components/schemas/QueryResponseAlternative12"
},
{
"$ref": "#/components/schemas/QueryResponseAlternative13"
},
{
"$ref": "#/components/schemas/QueryResponseAlternative14"
},
{
"$ref": "#/components/schemas/QueryResponseAlternative17"
},
{
"type": "object",
"additionalProperties": {
"type": "array",
"items": {
"$ref": "#/components/schemas/DatabaseSchemaQueryResponseField"
}
}
}
],
"title": "QueryResponseAlternative"
}
QueryResponseAlternative1
{
"type": "object",
"title": "QueryResponseAlternative1",
"required": [
"results"
],
"properties": {
"next": {
"type": "string",
"title": "Next",
"default": null,
"nullable": true
},
"results": {
"type": "array",
"items": {
"$ref": "#/components/schemas/EventType"
},
"title": "Results"
}
}
}
QueryResponseAlternative10
{
"type": "object",
"title": "QueryResponseAlternative10",
"required": [
"results"
],
"properties": {
"hogql": {
"type": "string",
"title": "Hogql",
"default": null,
"nullable": true
},
"results": {
"type": "array",
"items": {
"$ref": "#/components/schemas/WebOverviewItem"
},
"title": "Results"
},
"timings": {
"type": "array",
"items": {
"$ref": "#/components/schemas/QueryTiming"
},
"title": "Timings",
"default": null,
"nullable": true
},
"is_cached": {
"type": "boolean",
"title": "Is Cached",
"default": null,
"nullable": true
},
"last_refresh": {
"type": "string",
"title": "Last Refresh",
"default": null,
"nullable": true
},
"samplingRate": {
"$ref": "#/components/schemas/SamplingRateNullable"
},
"next_allowed_client_refresh": {
"type": "string",
"title": "Next Allowed Client Refresh",
"default": null,
"nullable": true
}
}
}
QueryResponseAlternative11
{
"type": "object",
"title": "QueryResponseAlternative11",
"required": [
"results"
],
"properties": {
"hogql": {
"type": "string",
"title": "Hogql",
"default": null,
"nullable": true
},
"limit": {
"type": "integer",
"title": "Limit",
"default": null,
"nullable": true
},
"types": {
"type": "array",
"items": {},
"title": "Types",
"default": null,
"nullable": true
},
"offset": {
"type": "integer",
"title": "Offset",
"default": null,
"nullable": true
},
"columns": {
"type": "array",
"items": {},
"title": "Columns",
"default": null,
"nullable": true
},
"hasMore": {
"type": "boolean",
"title": "Hasmore",
"default": null,
"nullable": true
},
"results": {
"type": "array",
"items": {},
"title": "Results"
},
"timings": {
"type": "array",
"items": {
"$ref": "#/components/schemas/QueryTiming"
},
"title": "Timings",
"default": null,
"nullable": true
},
"is_cached": {
"type": "boolean",
"title": "Is Cached",
"default": null,
"nullable": true
},
"last_refresh": {
"type": "string",
"title": "Last Refresh",
"default": null,
"nullable": true
},
"samplingRate": {
"$ref": "#/components/schemas/SamplingRateNullable"
},
"next_allowed_client_refresh": {
"type": "string",
"title": "Next Allowed Client Refresh",
"default": null,
"nullable": true
}
}
}
QueryResponseAlternative12
{
"type": "object",
"title": "QueryResponseAlternative12",
"required": [
"results"
],
"properties": {
"hogql": {
"type": "string",
"title": "Hogql",
"default": null,
"nullable": true
},
"types": {
"type": "array",
"items": {},
"title": "Types",
"default": null,
"nullable": true
},
"columns": {
"type": "array",
"items": {},
"title": "Columns",
"default": null,
"nullable": true
},
"results": {
"type": "array",
"items": {},
"title": "Results"
},
"timings": {
"type": "array",
"items": {
"$ref": "#/components/schemas/QueryTiming"
},
"title": "Timings",
"default": null,
"nullable": true
},
"is_cached": {
"type": "boolean",
"title": "Is Cached",
"default": null,
"nullable": true
},
"last_refresh": {
"type": "string",
"title": "Last Refresh",
"default": null,
"nullable": true
},
"samplingRate": {
"$ref": "#/components/schemas/SamplingRateNullable"
},
"next_allowed_client_refresh": {
"type": "string",
"title": "Next Allowed Client Refresh",
"default": null,
"nullable": true
}
}
}
QueryResponseAlternative13
{
"type": "object",
"title": "QueryResponseAlternative13",
"required": [
"results"
],
"properties": {
"hogql": {
"type": "string",
"title": "Hogql",
"default": null,
"nullable": true
},
"results": {
"type": "array",
"items": {
"type": "object"
},
"title": "Results"
},
"timings": {
"type": "array",
"items": {
"$ref": "#/components/schemas/QueryTiming"
},
"title": "Timings",
"default": null,
"nullable": true
},
"is_cached": {
"type": "boolean",
"title": "Is Cached",
"default": null,
"nullable": true
},
"last_refresh": {
"type": "string",
"title": "Last Refresh",
"default": null,
"nullable": true
},
"next_allowed_client_refresh": {
"type": "string",
"title": "Next Allowed Client Refresh",
"default": null,
"nullable": true
}
}
}
QueryResponseAlternative14
{
"type": "object",
"title": "QueryResponseAlternative14",
"required": [
"results"
],
"properties": {
"hogql": {
"type": "string",
"title": "Hogql",
"default": null,
"nullable": true
},
"results": {
"type": "array",
"items": {
"$ref": "#/components/schemas/RetentionResult"
},
"title": "Results"
},
"timings": {
"type": "array",
"items": {
"$ref": "#/components/schemas/QueryTiming"
},
"title": "Timings",
"default": null,
"nullable": true
},
"is_cached": {
"type": "boolean",
"title": "Is Cached",
"default": null,
"nullable": true
},
"last_refresh": {
"type": "string",
"title": "Last Refresh",
"default": null,
"nullable": true
},
"next_allowed_client_refresh": {
"type": "string",
"title": "Next Allowed Client Refresh",
"default": null,
"nullable": true
}
}
}
QueryResponseAlternative17
{
"type": "object",
"title": "QueryResponseAlternative17",
"required": [
"results"
],
"properties": {
"hogql": {
"type": "string",
"title": "Hogql",
"default": null,
"nullable": true
},
"limit": {
"type": "integer",
"title": "Limit",
"default": null,
"nullable": true
},
"types": {
"type": "array",
"items": {},
"title": "Types",
"default": null,
"nullable": true
},
"offset": {
"type": "integer",
"title": "Offset",
"default": null,
"nullable": true
},
"columns": {
"type": "array",
"items": {},
"title": "Columns",
"default": null,
"nullable": true
},
"hasMore": {
"type": "boolean",
"title": "Hasmore",
"default": null,
"nullable": true
},
"results": {
"$ref": "#/components/schemas/FunnelCorrelationResult"
},
"timings": {
"type": "array",
"items": {
"$ref": "#/components/schemas/QueryTiming"
},
"title": "Timings",
"default": null,
"nullable": true
}
}
}
QueryResponseAlternative2
{
"type": "object",
"title": "QueryResponseAlternative2",
"required": [
"results"
],
"properties": {
"results": {
"type": "array",
"items": {
"type": "object"
},
"title": "Results"
}
}
}
QueryResponseAlternative3
{
"type": "object",
"title": "QueryResponseAlternative3",
"required": [
"columns",
"hogql",
"results",
"types"
],
"properties": {
"hogql": {
"type": "string",
"title": "Hogql"
},
"limit": {
"type": "integer",
"title": "Limit",
"default": null,
"nullable": true
},
"types": {
"type": "array",
"items": {
"type": "string"
},
"title": "Types"
},
"offset": {
"type": "integer",
"title": "Offset",
"default": null,
"nullable": true
},
"columns": {
"type": "array",
"items": {},
"title": "Columns"
},
"hasMore": {
"type": "boolean",
"title": "Hasmore",
"default": null,
"nullable": true
},
"results": {
"type": "array",
"items": {
"type": "array",
"items": {}
},
"title": "Results"
},
"timings": {
"type": "array",
"items": {
"$ref": "#/components/schemas/QueryTiming"
},
"title": "Timings",
"default": null,
"nullable": true
}
}
}
QueryResponseAlternative4
{
"type": "object",
"title": "QueryResponseAlternative4",
"required": [
"columns",
"hogql",
"limit",
"offset",
"results",
"types"
],
"properties": {
"hogql": {
"type": "string",
"title": "Hogql"
},
"limit": {
"type": "integer",
"title": "Limit"
},
"types": {
"type": "array",
"items": {
"type": "string"
},
"title": "Types"
},
"offset": {
"type": "integer",
"title": "Offset"
},
"columns": {
"type": "array",
"items": {},
"title": "Columns"
},
"hasMore": {
"type": "boolean",
"title": "Hasmore",
"default": null,
"nullable": true
},
"results": {
"type": "array",
"items": {
"type": "array",
"items": {}
},
"title": "Results"
},
"timings": {
"type": "array",
"items": {
"$ref": "#/components/schemas/QueryTiming"
},
"title": "Timings",
"default": null,
"nullable": true
},
"missing_actors_count": {
"type": "integer",
"title": "Missing Actors Count",
"default": null,
"nullable": true
}
}
}
QueryResponseAlternative5
{
"type": "object",
"title": "QueryResponseAlternative5",
"properties": {
"day": {
"type": "array",
"items": {
"$ref": "#/components/schemas/DayItem"
},
"title": "Day",
"default": null,
"nullable": true
},
"series": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Series"
},
"title": "Series",
"default": null,
"nullable": true
},
"status": {
"type": "array",
"items": {
"$ref": "#/components/schemas/StatusItem"
},
"title": "Status",
"default": null,
"nullable": true
},
"compare": {
"type": "array",
"items": {
"$ref": "#/components/schemas/CompareItem"
},
"title": "Compare",
"default": null,
"nullable": true
},
"interval": {
"type": "array",
"items": {
"$ref": "#/components/schemas/IntervalItem"
},
"title": "Interval",
"default": null,
"nullable": true
},
"breakdown": {
"type": "array",
"items": {
"$ref": "#/components/schemas/BreakdownItem"
},
"title": "Breakdown",
"default": null,
"nullable": true
}
}
}
QueryResponseAlternative6
{
"type": "object",
"title": "QueryResponseAlternative6",
"required": [
"results"
],
"properties": {
"hogql": {
"type": "string",
"title": "Hogql",
"default": null,
"nullable": true
},
"hasMore": {
"type": "boolean",
"title": "Hasmore",
"default": null,
"nullable": true
},
"results": {
"type": "array",
"items": {
"$ref": "#/components/schemas/TimelineEntry"
},
"title": "Results"
},
"timings": {
"type": "array",
"items": {
"$ref": "#/components/schemas/QueryTiming"
},
"title": "Timings",
"default": null,
"nullable": true
}
}
}
QueryResponseAlternative7
{
"type": "object",
"title": "QueryResponseAlternative7",
"properties": {
"error": {
"type": "string",
"title": "Error",
"default": null,
"nullable": true,
"description": "Query error. Returned only if 'explain' is true. Throws an error otherwise."
},
"hogql": {
"type": "string",
"title": "Hogql",
"default": null,
"nullable": true,
"description": "Generated HogQL query"
},
"limit": {
"type": "integer",
"title": "Limit",
"default": null,
"nullable": true
},
"query": {
"type": "string",
"title": "Query",
"default": null,
"nullable": true,
"description": "Input query string"
},
"types": {
"type": "array",
"items": {},
"title": "Types",
"default": null,
"nullable": true,
"description": "Types of returned columns"
},
"offset": {
"type": "integer",
"title": "Offset",
"default": null,
"nullable": true
},
"columns": {
"type": "array",
"items": {},
"title": "Columns",
"default": null,
"nullable": true,
"description": "Returned columns"
},
"explain": {
"type": "array",
"items": {
"type": "string"
},
"title": "Explain",
"default": null,
"nullable": true,
"description": "Query explanation output"
},
"hasMore": {
"type": "boolean",
"title": "Hasmore",
"default": null,
"nullable": true
},
"results": {
"type": "array",
"items": {},
"title": "Results",
"default": null,
"nullable": true,
"description": "Query results"
},
"timings": {
"type": "array",
"items": {
"$ref": "#/components/schemas/QueryTiming"
},
"title": "Timings",
"default": null,
"nullable": true,
"description": "Measured timings for different parts of the query generation process"
},
"metadata": {
"$ref": "#/components/schemas/HogQLMetadataResponseNullable"
},
"modifiers": {
"$ref": "#/components/schemas/HogQLQueryModifiersNullable"
},
"clickhouse": {
"type": "string",
"title": "Clickhouse",
"default": null,
"nullable": true,
"description": "Executed ClickHouse query"
}
}
}
QueryResponseAlternative8
{
"type": "object",
"title": "QueryResponseAlternative8",
"required": [
"errors",
"notices",
"warnings"
],
"properties": {
"errors": {
"type": "array",
"items": {
"$ref": "#/components/schemas/HogQLNotice"
},
"title": "Errors"
},
"isValid": {
"type": "boolean",
"title": "Isvalid",
"default": null,
"nullable": true
},
"notices": {
"type": "array",
"items": {
"$ref": "#/components/schemas/HogQLNotice"
},
"title": "Notices"
},
"warnings": {
"type": "array",
"items": {
"$ref": "#/components/schemas/HogQLNotice"
},
"title": "Warnings"
},
"inputExpr": {
"type": "string",
"title": "Inputexpr",
"default": null,
"nullable": true
},
"inputSelect": {
"type": "string",
"title": "Inputselect",
"default": null,
"nullable": true
},
"isValidView": {
"type": "boolean",
"title": "Isvalidview",
"default": null,
"nullable": true
}
}
}
QueryResponseAlternative9
{
"type": "object",
"title": "QueryResponseAlternative9",
"required": [
"incomplete_list",
"suggestions"
],
"properties": {
"timings": {
"type": "array",
"items": {
"$ref": "#/components/schemas/QueryTiming"
},
"title": "Timings",
"default": null,
"nullable": true,
"description": "Measured timings for different parts of the query generation process"
},
"suggestions": {
"type": "array",
"items": {
"$ref": "#/components/schemas/AutocompleteCompletionItem"
},
"title": "Suggestions"
},
"incomplete_list": {
"type": "boolean",
"title": "Incomplete List",
"description": "Whether or not the suggestions returned are complete"
}
}
}
QueryTiming
{
"type": "object",
"title": "QueryTiming",
"required": [
"k",
"t"
],
"properties": {
"k": {
"type": "string",
"title": "K",
"description": "Key. Shortened to 'k' to save on data."
},
"t": {
"type": "number",
"title": "T",
"description": "Time in seconds. Shortened to 't' to save on data."
}
}
}
RecordingDurationFilter
{
"type": "object",
"title": "RecordingDurationFilter",
"required": [
"operator",
"value"
],
"properties": {
"key": {
"const": "duration",
"title": "Key",
"default": "duration"
},
"type": {
"const": "recording",
"title": "Type",
"default": "recording"
},
"label": {
"type": "string",
"title": "Label",
"default": null,
"nullable": true
},
"value": {
"type": "number",
"title": "Value"
},
"operator": {
"$ref": "#/components/schemas/PropertyOperator"
}
}
}
Response
{
"type": "object",
"title": "Response",
"required": [
"results"
],
"properties": {
"next": {
"type": "string",
"title": "Next",
"default": null,
"nullable": true
},
"results": {
"type": "array",
"items": {
"$ref": "#/components/schemas/EventType"
},
"title": "Results"
}
}
}
ResponseNullable
{
"type": "object",
"title": "Response",
"default": null,
"nullable": true,
"required": [
"results"
],
"properties": {
"next": {
"type": "string",
"title": "Next",
"default": null,
"nullable": true
},
"results": {
"type": "array",
"items": {
"$ref": "#/components/schemas/EventType"
},
"title": "Results"
}
},
"description": "Return a limited set of data"
}