PostHog · Schema

PatchedWebExperimentsAPI

Serializer for the exposed /api/web_experiments endpoint, to be used in posthog-js and for headless APIs.

A/B TestingAnalyticsFeature FlagsOpen SourceProduct AnalyticsSession Recording

Properties

Name Type Description
id integer
name string
created_at string
feature_flag_key string
variants object Variants for the web experiment. Example: { "control": { "transforms": [ { "text": "Here comes Superman!", "html": "", "selector": "#page > #body > .header h1" } ], "conditions": "None", "rollout_perc
View JSON Schema on GitHub

JSON Schema

posthog-patchedwebexperimentsapi-schema.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "#/components/schemas/PatchedWebExperimentsAPI",
  "title": "PatchedWebExperimentsAPI",
  "type": "object",
  "description": "Serializer for the exposed /api/web_experiments endpoint, to be used in posthog-js and for headless APIs.",
  "properties": {
    "id": {
      "type": "integer",
      "readOnly": true
    },
    "name": {
      "type": "string",
      "maxLength": 400
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    },
    "feature_flag_key": {
      "type": "string",
      "readOnly": true
    },
    "variants": {
      "description": "Variants for the web experiment. Example:\n\n        {\n            \"control\": {\n                \"transforms\": [\n                    {\n                        \"text\": \"Here comes Superman!\",\n                        \"html\": \"\",\n                        \"selector\": \"#page > #body > .header h1\"\n                    }\n                ],\n                \"conditions\": \"None\",\n                \"rollout_percentage\": 50\n            },\n        }"
    }
  }
}