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.

26.1 KB
Raw Blame
{
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "properties": {
        "description": {
            "anyOf": [
                {
                    "maxLength": 400,
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "description": "Optional description of what this holdout reserves and why."
        },
        "filters": {
            "description": "Non-empty list of release-condition groups defining the held-out population. Each element needs a `rollout_percentage` (0–100, may be fractional) — the EXCLUSION percentage. Do NOT set `variant` (the server manages it as `holdout-{id}`). Changing this cascades to every linked experiment's feature flag. Example: [{ \"rollout_percentage\": 10, \"properties\": [] }].",
            "items": {
                "properties": {
                    "aggregation_group_type_index": {
                        "anyOf": [
                            {
                                "type": "number"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "description": "Group type index for this condition set. None means person-level aggregation."
                    },
                    "properties": {
                        "description": "Property conditions for this release condition group.",
                        "items": {
                            "anyOf": [
                                {
                                    "properties": {
                                        "cohort_name": {
                                            "anyOf": [
                                                {
                                                    "type": "string"
                                                },
                                                {
                                                    "type": "null"
                                                }
                                            ],
                                            "description": "Resolved cohort name for cohort-type filters."
                                        },
                                        "group_type_index": {
                                            "anyOf": [
                                                {
                                                    "type": "number"
                                                },
                                                {
                                                    "type": "null"
                                                }
                                            ],
                                            "description": "Group type index a `group` filter reads properties from. Defaults to the condition set's `aggregation_group_type_index`."
                                        },
                                        "key": {
                                            "description": "Property key used in this feature flag condition.",
                                            "type": "string"
                                        },
                                        "operator": {
                                            "description": "Operator used to compare the property value.\n\n* `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* `gte` - gte\n* `lt` - lt\n* `lte` - lte",
                                            "enum": [
                                                "exact",
                                                "is_not",
                                                "icontains",
                                                "not_icontains",
                                                "starts_with",
                                                "not_starts_with",
                                                "ends_with",
                                                "not_ends_with",
                                                "regex",
                                                "not_regex",
                                                "gt",
                                                "gte",
                                                "lt",
                                                "lte"
                                            ],
                                            "type": "string"
                                        },
                                        "type": {
                                            "description": "Property filter type. Set it on every property. Use `group` with `group_type_index` to filter on a group's properties.\n\n* `cohort` - cohort\n* `person` - person\n* `group` - group",
                                            "enum": ["cohort", "person", "group"],
                                            "type": "string"
                                        },
                                        "value": {
                                            "description": "Comparison value for the property filter. Supports strings, numbers, booleans, and arrays."
                                        }
                                    },
                                    "required": ["key", "value", "operator"],
                                    "type": "object"
                                },
                                {
                                    "properties": {
                                        "cohort_name": {
                                            "anyOf": [
                                                {
                                                    "type": "string"
                                                },
                                                {
                                                    "type": "null"
                                                }
                                            ],
                                            "description": "Resolved cohort name for cohort-type filters."
                                        },
                                        "group_type_index": {
                                            "anyOf": [
                                                {
                                                    "type": "number"
                                                },
                                                {
                                                    "type": "null"
                                                }
                                            ],
                                            "description": "Group type index a `group` filter reads properties from. Defaults to the condition set's `aggregation_group_type_index`."
                                        },
                                        "key": {
                                            "description": "Property key used in this feature flag condition.",
                                            "type": "string"
                                        },
                                        "operator": {
                                            "description": "Existence operator.\n\n* `is_set` - is_set\n* `is_not_set` - is_not_set",
                                            "enum": ["is_set", "is_not_set"],
                                            "type": "string"
                                        },
                                        "type": {
                                            "description": "Property filter type. Set it on every property. Use `group` with `group_type_index` to filter on a group's properties.\n\n* `cohort` - cohort\n* `person` - person\n* `group` - group",
                                            "enum": ["cohort", "person", "group"],
                                            "type": "string"
                                        },
                                        "value": {
                                            "description": "Optional value. Runtime behavior determines whether this is ignored."
                                        }
                                    },
                                    "required": ["key", "operator"],
                                    "type": "object"
                                },
                                {
                                    "properties": {
                                        "cohort_name": {
                                            "anyOf": [
                                                {
                                                    "type": "string"
                                                },
                                                {
                                                    "type": "null"
                                                }
                                            ],
                                            "description": "Resolved cohort name for cohort-type filters."
                                        },
                                        "group_type_index": {
                                            "anyOf": [
                                                {
                                                    "type": "number"
                                                },
                                                {
                                                    "type": "null"
                                                }
                                            ],
                                            "description": "Group type index a `group` filter reads properties from. Defaults to the condition set's `aggregation_group_type_index`."
                                        },
                                        "key": {
                                            "description": "Property key used in this feature flag condition.",
                                            "type": "string"
                                        },
                                        "operator": {
                                            "description": "Date comparison operator.\n\n* `is_date_exact` - is_date_exact\n* `is_date_after` - is_date_after\n* `is_date_before` - is_date_before",
                                            "enum": ["is_date_exact", "is_date_before", "is_date_after"],
                                            "type": "string"
                                        },
                                        "type": {
                                            "description": "Property filter type. Set it on every property. Use `group` with `group_type_index` to filter on a group's properties.\n\n* `cohort` - cohort\n* `person` - person\n* `group` - group",
                                            "enum": ["cohort", "person", "group"],
                                            "type": "string"
                                        },
                                        "value": {
                                            "description": "Date value in ISO format or relative date expression.",
                                            "type": "string"
                                        }
                                    },
                                    "required": ["key", "operator", "value"],
                                    "type": "object"
                                },
                                {
                                    "properties": {
                                        "cohort_name": {
                                            "anyOf": [
                                                {
                                                    "type": "string"
                                                },
                                                {
                                                    "type": "null"
                                                }
                                            ],
                                            "description": "Resolved cohort name for cohort-type filters."
                                        },
                                        "group_type_index": {
                                            "anyOf": [
                                                {
                                                    "type": "number"
                                                },
                                                {
                                                    "type": "null"
                                                }
                                            ],
                                            "description": "Group type index a `group` filter reads properties from. Defaults to the condition set's `aggregation_group_type_index`."
                                        },
                                        "key": {
                                            "description": "Property key used in this feature flag condition.",
                                            "type": "string"
                                        },
                                        "operator": {
                                            "description": "Semantic version comparison operator.\n\n* `semver_eq` - semver_eq\n* `semver_neq` - semver_neq\n* `semver_gt` - semver_gt\n* `semver_gte` - semver_gte\n* `semver_lt` - semver_lt\n* `semver_lte` - semver_lte\n* `semver_tilde` - semver_tilde\n* `semver_caret` - semver_caret\n* `semver_wildcard` - semver_wildcard",
                                            "enum": [
                                                "semver_eq",
                                                "semver_neq",
                                                "semver_gt",
                                                "semver_gte",
                                                "semver_lt",
                                                "semver_lte",
                                                "semver_tilde",
                                                "semver_caret",
                                                "semver_wildcard"
                                            ],
                                            "type": "string"
                                        },
                                        "type": {
                                            "description": "Property filter type. Set it on every property. Use `group` with `group_type_index` to filter on a group's properties.\n\n* `cohort` - cohort\n* `person` - person\n* `group` - group",
                                            "enum": ["cohort", "person", "group"],
                                            "type": "string"
                                        },
                                        "value": {
                                            "description": "Semantic version string.",
                                            "type": "string"
                                        }
                                    },
                                    "required": ["key", "operator", "value"],
                                    "type": "object"
                                },
                                {
                                    "properties": {
                                        "cohort_name": {
                                            "anyOf": [
                                                {
                                                    "type": "string"
                                                },
                                                {
                                                    "type": "null"
                                                }
                                            ],
                                            "description": "Resolved cohort name for cohort-type filters."
                                        },
                                        "group_type_index": {
                                            "anyOf": [
                                                {
                                                    "type": "number"
                                                },
                                                {
                                                    "type": "null"
                                                }
                                            ],
                                            "description": "Group type index a `group` filter reads properties from. Defaults to the condition set's `aggregation_group_type_index`."
                                        },
                                        "key": {
                                            "description": "Property key used in this feature flag condition.",
                                            "type": "string"
                                        },
                                        "operator": {
                                            "description": "Multi-contains operator.\n\n* `icontains_multi` - icontains_multi\n* `not_icontains_multi` - not_icontains_multi",
                                            "enum": ["icontains_multi", "not_icontains_multi"],
                                            "type": "string"
                                        },
                                        "type": {
                                            "description": "Property filter type. Set it on every property. Use `group` with `group_type_index` to filter on a group's properties.\n\n* `cohort` - cohort\n* `person` - person\n* `group` - group",
                                            "enum": ["cohort", "person", "group"],
                                            "type": "string"
                                        },
                                        "value": {
                                            "description": "List of strings to evaluate against.",
                                            "items": {
                                                "type": "string"
                                            },
                                            "type": "array"
                                        }
                                    },
                                    "required": ["key", "operator", "value"],
                                    "type": "object"
                                },
                                {
                                    "properties": {
                                        "cohort_deleted": {
                                            "description": "Set to true in responses when the cohort is deleted or does not exist. The flag cannot evaluate this condition. Ignored on write.",
                                            "type": "boolean"
                                        },
                                        "cohort_missing": {
                                            "description": "Set to true in responses when no cohort with this id exists in the project, so it cannot be restored. `cohort_deleted` is also true. Absent for a soft-deleted cohort. Ignored on write.",
                                            "type": "boolean"
                                        },
                                        "cohort_name": {
                                            "anyOf": [
                                                {
                                                    "type": "string"
                                                },
                                                {
                                                    "type": "null"
                                                }
                                            ],
                                            "description": "Resolved cohort name for cohort-type filters."
                                        },
                                        "group_type_index": {
                                            "anyOf": [
                                                {
                                                    "type": "number"
                                                },
                                                {
                                                    "type": "null"
                                                }
                                            ],
                                            "description": "Group type index a `group` filter reads properties from. Defaults to the condition set's `aggregation_group_type_index`."
                                        },
                                        "key": {
                                            "description": "Property key used in this feature flag condition.",
                                            "type": "string"
                                        },
                                        "operator": {
                                            "description": "Membership operator for cohort properties.\n\n* `in` - in\n* `not_in` - not_in",
                                            "enum": ["in", "not_in"],
                                            "type": "string"
                                        },
                                        "type": {
                                            "description": "Cohort property type required for in/not_in operators.\n\n* `cohort` - cohort",
                                            "enum": ["cohort"],
                                            "type": "string"
                                        },
                                        "value": {
                                            "description": "Cohort comparison value (single or list, depending on usage)."
                                        }
                                    },
                                    "required": ["key", "type", "operator", "value"],
                                    "type": "object"
                                },
                                {
                                    "properties": {
                                        "cohort_name": {
                                            "anyOf": [
                                                {
                                                    "type": "string"
                                                },
                                                {
                                                    "type": "null"
                                                }
                                            ],
                                            "description": "Resolved cohort name for cohort-type filters."
                                        },
                                        "group_type_index": {
                                            "anyOf": [
                                                {
                                                    "type": "number"
                                                },
                                                {
                                                    "type": "null"
                                                }
                                            ],
                                            "description": "Group type index a `group` filter reads properties from. Defaults to the condition set's `aggregation_group_type_index`."
                                        },
                                        "key": {
                                            "description": "Property key used in this feature flag condition.",
                                            "type": "string"
                                        },
                                        "operator": {
                                            "description": "Operator for feature flag dependency evaluation.\n\n* `flag_evaluates_to` - flag_evaluates_to",
                                            "enum": ["flag_evaluates_to"],
                                            "type": "string"
                                        },
                                        "type": {
                                            "description": "Flag property type required for flag dependency checks.\n\n* `flag` - flag",
                                            "enum": ["flag"],
                                            "type": "string"
                                        },
                                        "value": {
                                            "description": "Value to compare flag evaluation against."
                                        }
                                    },
                                    "required": ["key", "type", "operator", "value"],
                                    "type": "object"
                                }
                            ]
                        },
                        "type": "array"
                    },
                    "rollout_percentage": {
                        "description": "Rollout percentage for this release condition group.",
                        "type": "number"
                    },
                    "variant": {
                        "anyOf": [
                            {
                                "type": "string"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "description": "Variant key override for multivariate flags."
                    }
                },
                "type": "object"
            },
            "type": "array"
        },
        "id": {
            "description": "A unique integer value identifying this experiment holdout.",
            "type": "number"
        },
        "name": {
            "description": "Human-readable name for the holdout group.",
            "maxLength": 400,
            "type": "string"
        }
    },
    "required": ["id"],
    "type": "object"
}