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.

9.2 KB
Raw Blame
{
    "flags": [
        {
            "id": 1,
            "team_id": 99,
            "name": "Full feature flag with all optional fields",
            "key": "full-flag",
            "has_experiment": false,
            "filters": {
                "groups": [
                    {
                        "properties": [
                            {
                                "key": "email",
                                "value": "[email protected]",
                                "type": "person",
                                "operator": "exact"
                            }
                        ],
                        "rollout_percentage": 50,
                        "variant": null
                    }
                ],
                "multivariate": {
                    "variants": [
                        {"key": "control", "name": "Control", "rollout_percentage": 50},
                        {"key": "test", "name": "Test", "rollout_percentage": 50}
                    ]
                },
                "payloads": {"control": "payload-value"},
                "super_groups": [
                    {
                        "properties": [
                            {
                                "key": "$feature_enrollment/full-flag",
                                "type": "person",
                                "value": ["true"],
                                "operator": "exact"
                            }
                        ],
                        "rollout_percentage": null,
                        "variant": null
                    }
                ],
                "feature_enrollment": true,
                "holdout": {
                    "id": 42,
                    "exclusion_percentage": 10.0
                },
                "aggregation_group_type_index": null
            },
            "deleted": false,
            "active": true,
            "ensure_experience_continuity": true,
            "version": 3,
            "evaluation_runtime": "all",
            "bucketing_identifier": "device_id",
            "evaluation_contexts": ["docs-page", "marketing-site"]
        },
        {
            "id": 2,
            "team_id": 99,
            "name": "",
            "key": "minimal-flag",
            "has_experiment": false,
            "filters": {
                "groups": [
                    {
                        "properties": [],
                        "rollout_percentage": 100,
                        "variant": null
                    }
                ],
                "multivariate": null,
                "payloads": {}
            },
            "deleted": false,
            "active": true,
            "ensure_experience_continuity": false,
            "version": 1,
            "evaluation_runtime": "all",
            "bucketing_identifier": null,
            "evaluation_contexts": []
        },
        {
            "id": 3,
            "team_id": 99,
            "name": "Cohort flag",
            "key": "cohort-flag",
            "has_experiment": false,
            "filters": {
                "groups": [
                    {
                        "properties": [
                            {
                                "key": "id",
                                "value": 100,
                                "type": "cohort",
                                "operator": "in"
                            }
                        ],
                        "rollout_percentage": 100,
                        "variant": null
                    }
                ],
                "multivariate": null,
                "payloads": {}
            },
            "deleted": false,
            "active": true,
            "ensure_experience_continuity": false,
            "version": 1,
            "evaluation_runtime": "all",
            "bucketing_identifier": null,
            "evaluation_contexts": []
        },
        {
            "id": 4,
            "team_id": 99,
            "name": "Flag with dependency",
            "key": "dependent-flag",
            "has_experiment": false,
            "filters": {
                "groups": [
                    {
                        "properties": [
                            {
                                "key": "2",
                                "label": "minimal-flag",
                                "operator": "flag_evaluates_to",
                                "type": "flag",
                                "value": true
                            }
                        ],
                        "rollout_percentage": 100,
                        "variant": null
                    }
                ],
                "multivariate": null,
                "payloads": {}
            },
            "deleted": false,
            "active": true,
            "ensure_experience_continuity": false,
            "version": 2,
            "evaluation_runtime": "all",
            "bucketing_identifier": null,
            "evaluation_contexts": []
        },
        {
            "id": 5,
            "team_id": 99,
            "name": "Flag with missing dependency",
            "key": "missing-dep-flag",
            "has_experiment": false,
            "filters": {
                "groups": [
                    {
                        "properties": [
                            {
                                "key": "99999",
                                "label": "nonexistent-flag",
                                "operator": "flag_evaluates_to",
                                "type": "flag",
                                "value": true
                            }
                        ],
                        "rollout_percentage": 100,
                        "variant": null
                    }
                ],
                "multivariate": null,
                "payloads": {}
            },
            "deleted": false,
            "active": true,
            "ensure_experience_continuity": false,
            "version": 1,
            "evaluation_runtime": "all",
            "bucketing_identifier": null,
            "evaluation_contexts": []
        },
        {
            "id": 6,
            "team_id": 99,
            "name": "Referenced disabled flag",
            "key": "referenced-disabled-flag",
            "has_experiment": false,
            "filters": {
                "groups": []
            },
            "deleted": false,
            "active": false,
            "ensure_experience_continuity": false,
            "version": 1,
            "evaluation_runtime": "all",
            "bucketing_identifier": null,
            "evaluation_contexts": []
        },
        {
            "id": 7,
            "team_id": 99,
            "name": "Dependent on disabled flag",
            "key": "disabled-dependent-flag",
            "has_experiment": false,
            "filters": {
                "groups": [
                    {
                        "properties": [
                            {
                                "key": "6",
                                "label": "referenced-disabled-flag",
                                "operator": "flag_evaluates_to",
                                "type": "flag",
                                "value": false
                            }
                        ],
                        "rollout_percentage": 100,
                        "variant": null
                    }
                ],
                "multivariate": null,
                "payloads": {}
            },
            "deleted": false,
            "active": true,
            "ensure_experience_continuity": false,
            "version": 1,
            "evaluation_runtime": "all",
            "bucketing_identifier": null,
            "evaluation_contexts": []
        }
    ],
    "evaluation_metadata": {
        "dependency_stages": [
            [1, 2, 3, 5, 6],
            [4, 7]
        ],
        "flags_with_missing_deps": [5],
        "transitive_deps": {
            "1": [],
            "2": [],
            "3": [],
            "4": [2],
            "5": [],
            "6": [],
            "7": [6]
        }
    },
    "cohorts": [
        {
            "id": 100,
            "name": "Test Cohort",
            "description": "A test cohort for the contract fixture",
            "team_id": 99,
            "deleted": false,
            "filters": {"properties": {"type": "AND", "values": [{"type": "AND", "values": [{"key": "email", "value": "[email protected]", "type": "person", "operator": "exact"}]}]}},
            "query": null,
            "version": 1,
            "pending_version": null,
            "count": 42,
            "is_calculating": false,
            "is_static": false,
            "errors_calculating": 0,
            "groups": [],
            "created_by_id": 1,
            "cohort_type": null,
            "condition_type": {
                "person_properties": true,
                "behavioral": false,
                "lifecycle": false,
                "cohorts": false
            },
            "last_backfill_person_properties_at": "2024-01-15T12:00:00+00:00",
            "last_backfill_events_at": "2024-01-15T12:00:00+00:00",
            "last_realtime_cohort_calculation_at": "2024-01-15T12:00:00+00:00"
        }
    ]
}