Skip to content

:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.

1.8 KB
Raw Blame
{
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "properties": {
        "default_value": {
            "description": "Default value used when a query references this variable."
        },
        "is_multi": {
            "description": "Whether a List variable accepts multiple selected values.",
            "type": "boolean"
        },
        "name": {
            "description": "Human-readable name for the SQL variable.",
            "maxLength": 400,
            "type": "string"
        },
        "type": {
            "description": "Variable type. Controls how the value is rendered and substituted in HogQL.\n\n* `String` - String\n* `Number` - Number\n* `Boolean` - Boolean\n* `List` - List\n* `Date` - Date",
            "enum": ["String", "Number", "Boolean", "List", "Date"],
            "type": "string"
        },
        "values": {
            "description": "Allowed values for List variables. Null for other variable types."
        },
        "values_query": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "description": "HogQL query whose first result column supplies the allowed values for a List variable. An optional second column supplies display labels."
        },
        "values_query_connection_id": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "description": "ID of the external data source connection values_query runs against. Null runs it against PostHog."
        }
    },
    "required": ["name", "type"],
    "type": "object"
}