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.

10.2 KB
Raw Blame
{
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "properties": {
        "dateRange": {
            "description": "Date range for sampled exception events. Defaults to the last 7 days.",
            "properties": {
                "date_from": {
                    "description": "Start of the date range as an ISO timestamp or relative date such as -7d. Defaults to -7d.",
                    "type": "string"
                },
                "date_to": {
                    "anyOf": [
                        {
                            "type": "string"
                        },
                        {
                            "type": "null"
                        }
                    ],
                    "description": "End of the date range as an ISO timestamp or relative date. Defaults to now when omitted."
                }
            },
            "type": "object"
        },
        "filterGroup": {
            "description": "Advanced flat AND property filters applied to sampled events. HogQL filters are rejected.",
            "items": {
                "properties": {
                    "key": {
                        "description": "Key of the property you're filtering on. For example `email` or `$current_url`",
                        "type": "string"
                    },
                    "operator": {
                        "anyOf": [
                            {
                                "description": "* `exact` - exact\n* `is_not` - is_not\n* `icontains` - icontains\n* `not_icontains` - not_icontains\n* `starts_with` - starts_with\n* `not_starts_with` - not_starts_with\n* `ends_with` - ends_with\n* `not_ends_with` - not_ends_with\n* `regex` - regex\n* `not_regex` - not_regex\n* `gt` - gt\n* `lt` - lt\n* `gte` - gte\n* `lte` - lte\n* `is_set` - is_set\n* `is_not_set` - is_not_set\n* `is_date_exact` - is_date_exact\n* `is_date_after` - is_date_after\n* `is_date_before` - is_date_before\n* `in` - in\n* `not_in` - not_in",
                                "enum": [
                                    "exact",
                                    "is_not",
                                    "icontains",
                                    "not_icontains",
                                    "starts_with",
                                    "not_starts_with",
                                    "ends_with",
                                    "not_ends_with",
                                    "regex",
                                    "not_regex",
                                    "gt",
                                    "lt",
                                    "gte",
                                    "lte",
                                    "is_set",
                                    "is_not_set",
                                    "is_date_exact",
                                    "is_date_after",
                                    "is_date_before",
                                    "in",
                                    "not_in"
                                ],
                                "type": "string"
                            },
                            {
                                "enum": [""],
                                "type": "string"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": "exact"
                    },
                    "type": {
                        "anyOf": [
                            {
                                "description": "* `event` - event\n* `event_metadata` - event_metadata\n* `feature` - feature\n* `person` - person\n* `person_metadata` - person_metadata\n* `cohort` - cohort\n* `element` - element\n* `static-cohort` - static-cohort\n* `dynamic-cohort` - dynamic-cohort\n* `precalculated-cohort` - precalculated-cohort\n* `group` - group\n* `recording` - recording\n* `log_entry` - log_entry\n* `behavioral` - behavioral\n* `session` - session\n* `hogql` - hogql\n* `data_warehouse` - data_warehouse\n* `data_warehouse_person_property` - data_warehouse_person_property\n* `error_tracking_issue` - error_tracking_issue\n* `log` - log\n* `log_attribute` - log_attribute\n* `log_resource_attribute` - log_resource_attribute\n* `metric_attribute` - metric_attribute\n* `span` - span\n* `span_attribute` - span_attribute\n* `span_resource_attribute` - span_resource_attribute\n* `revenue_analytics` - revenue_analytics\n* `account_custom_property` - account_custom_property\n* `flag` - flag\n* `workflow_variable` - workflow_variable",
                                "enum": [
                                    "event",
                                    "event_metadata",
                                    "feature",
                                    "person",
                                    "person_metadata",
                                    "cohort",
                                    "element",
                                    "static-cohort",
                                    "dynamic-cohort",
                                    "precalculated-cohort",
                                    "group",
                                    "recording",
                                    "log_entry",
                                    "behavioral",
                                    "session",
                                    "hogql",
                                    "data_warehouse",
                                    "data_warehouse_person_property",
                                    "error_tracking_issue",
                                    "log",
                                    "log_attribute",
                                    "log_resource_attribute",
                                    "metric_attribute",
                                    "span",
                                    "span_attribute",
                                    "span_resource_attribute",
                                    "revenue_analytics",
                                    "account_custom_property",
                                    "flag",
                                    "workflow_variable"
                                ],
                                "type": "string"
                            },
                            {
                                "enum": [""],
                                "type": "string"
                            }
                        ],
                        "default": "event"
                    },
                    "value": {
                        "anyOf": [
                            {
                                "type": "string"
                            },
                            {
                                "type": "number"
                            },
                            {
                                "type": "boolean"
                            },
                            {
                                "items": {
                                    "anyOf": [
                                        {
                                            "type": "string"
                                        },
                                        {
                                            "type": "number"
                                        }
                                    ]
                                },
                                "type": "array"
                            }
                        ],
                        "description": "Value of your filter. For example `[email protected]` or `https://example.com/test/`. Can be an array for an OR query, like `[\"[email protected]\",\"[email protected]\"]`"
                    }
                },
                "required": ["key", "value"],
                "type": "object"
            },
            "type": "array"
        },
        "filterTestAccounts": {
            "default": true,
            "description": "When true, exclude internal/test account data from results. Defaults to true.",
            "type": "boolean"
        },
        "include": {
            "description": "Context groups to return. Defaults to exception, environment, navigation, and correlation. Request stacktrace for frames, code_variables for captured and SDK-masked frame variables, release for release metadata, or diagnostics for ingestion errors. code_variables implies stacktrace.",
            "items": {
                "description": "* `exception` - exception\n* `stacktrace` - stacktrace\n* `code_variables` - code_variables\n* `environment` - environment\n* `release` - release\n* `navigation` - navigation\n* `correlation` - correlation\n* `diagnostics` - diagnostics",
                "enum": [
                    "exception",
                    "stacktrace",
                    "code_variables",
                    "environment",
                    "release",
                    "navigation",
                    "correlation",
                    "diagnostics"
                ],
                "type": "string"
            },
            "type": "array"
        },
        "issueId": {
            "description": "Error tracking issue ID.",
            "type": "string"
        },
        "limit": {
            "default": 1,
            "description": "Page size.",
            "maximum": 20,
            "minimum": 1,
            "type": "number"
        },
        "offset": {
            "default": 0,
            "description": "Pagination offset.",
            "minimum": 0,
            "type": "number"
        },
        "onlyAppFrames": {
            "default": true,
            "description": "When true, include only stack frames marked in_app. Defaults to true.",
            "type": "boolean"
        },
        "orderDirection": {
            "default": "DESC",
            "description": "Timestamp sort direction. Defaults to DESC.\n\n* `ASC` - ASC\n* `DESC` - DESC",
            "enum": ["ASC", "DESC"],
            "type": "string"
        },
        "searchQuery": {
            "description": "Search exception types, exception values, and current URL among sampled events.",
            "maxLength": 500,
            "type": "string"
        }
    },
    "required": ["issueId"],
    "type": "object"
}