PostHog · Schema

TestHogRequest

A/B TestingAnalyticsFeature FlagsOpen SourceProduct AnalyticsSession Recording

Properties

Name Type Description
source string Hog source code to test. Must return a boolean (true = pass, false = fail) or null for N/A.
sample_count integer Number of recent $ai_generation events to test against (1–10, default 5).
allows_na boolean Whether the evaluation can return N/A for non-applicable generations.
conditions array Optional trigger conditions to filter which events are sampled.
View JSON Schema on GitHub

JSON Schema

posthog-testhogrequest-schema.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "#/components/schemas/TestHogRequest",
  "title": "TestHogRequest",
  "type": "object",
  "properties": {
    "source": {
      "type": "string",
      "description": "Hog source code to test. Must return a boolean (true = pass, false = fail) or null for N/A.",
      "minLength": 1
    },
    "sample_count": {
      "type": "integer",
      "maximum": 10,
      "minimum": 1,
      "default": 5,
      "description": "Number of recent $ai_generation events to test against (1\u201310, default 5)."
    },
    "allows_na": {
      "type": "boolean",
      "default": false,
      "description": "Whether the evaluation can return N/A for non-applicable generations."
    },
    "conditions": {
      "type": "array",
      "items": {
        "type": "object",
        "additionalProperties": true
      },
      "description": "Optional trigger conditions to filter which events are sampled."
    }
  },
  "required": [
    "source"
  ]
}