PostHog · Schema

StringPropertyFilter

Matches string values with text-oriented operators.

A/B TestingAnalyticsFeature FlagsOpen SourceProduct AnalyticsSession Recording

Properties

Name Type Description
key string Key of the property you're filtering on. For example `email` or `$current_url`.
type object Property type (event, person, session, etc.). * `event` - event * `event_metadata` - event_metadata * `feature` - feature * `person` - person * `cohort` - cohort * `element` - element * `static-cohort
value string String value to match against.
operator object String comparison operator. * `exact` - exact * `is_not` - is_not * `icontains` - icontains * `not_icontains` - not_icontains * `regex` - regex * `not_regex` - not_regex
View JSON Schema on GitHub

JSON Schema

posthog-stringpropertyfilter-schema.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "#/components/schemas/StringPropertyFilter",
  "title": "StringPropertyFilter",
  "type": "object",
  "description": "Matches string values with text-oriented operators.",
  "properties": {
    "key": {
      "type": "string",
      "description": "Key of the property you're filtering on. For example `email` or `$current_url`."
    },
    "type": {
      "allOf": [
        {
          "$ref": "#/components/schemas/PropertyFilterTypeEnum"
        }
      ],
      "default": "event",
      "description": "Property type (event, person, session, etc.).\n\n* `event` - event\n* `event_metadata` - event_metadata\n* `feature` - feature\n* `person` - person\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* `span` - span\n* `span_attribute` - span_attribute\n* `span_resource_attribute` - span_resource_attribute\n* `revenue_analytics` - revenue_analytics\n* `flag` - flag\n* `workflow_variable` - workflow_variable"
    },
    "value": {
      "type": "string",
      "description": "String value to match against."
    },
    "operator": {
      "allOf": [
        {
          "$ref": "#/components/schemas/StringMatchOperatorEnum"
        }
      ],
      "default": "exact",
      "description": "String comparison operator.\n\n* `exact` - exact\n* `is_not` - is_not\n* `icontains` - icontains\n* `not_icontains` - not_icontains\n* `regex` - regex\n* `not_regex` - not_regex"
    }
  },
  "required": [
    "key",
    "value"
  ]
}