{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/coralogix/json-schema/coralogix-global-indicator-settings-schema.json",
  "title": "Global indicator settings",
  "description": "Team-level indicator configuration options for case management, including case lifecycle and event filtering conditions.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/coralogix-case-settings-service-api-openapi.yml#/components/schemas/GlobalIndicatorSettings",
  "type": "object",
  "properties": {
    "enabled": {
      "type": "boolean",
      "description": "Enable/disable this setting. When this is disabled, no alerts will be processed for cases."
    },
    "filteringConditions": {
      "maxItems": 1000,
      "minItems": 0,
      "type": "array",
      "items": {
        "$ref": "#/$defs/IndicatorFilter"
      },
      "description": "Whitelist conditions for the alerts to be processed. Empty list means all alerts are processed. Filtering_condition evaluations will be OR'ed together"
    }
  },
  "$defs": {
    "All": {
      "title": "All filter values selected",
      "type": "object",
      "additionalProperties": false,
      "description": "Represents selection of all items in the filter"
    },
    "EntityLabelFilter": {
      "title": "All or EntityLabel list",
      "type": "object",
      "oneOf": [
        {
          "required": [
            "all"
          ],
          "type": "object"
        },
        {
          "required": [
            "values"
          ],
          "type": "object"
        },
        {
          "type": "object",
          "not": {
            "anyOf": [
              {
                "required": [
                  "all"
                ],
                "type": "object"
              },
              {
                "required": [
                  "values"
                ],
                "type": "object"
              }
            ]
          }
        }
      ],
      "properties": {
        "all": {
          "$ref": "#/$defs/All"
        },
        "values": {
          "$ref": "#/$defs/EntityLabelFilter.Values"
        }
      },
      "description": "Select all items from a specific list of EntityLabels (Key/Values)."
    },
    "EntityLabelFilter.Values": {
      "type": "object",
      "properties": {
        "items": {
          "minItems": 0,
          "type": "array",
          "items": {
            "$ref": "#/$defs/v1.KeyValue"
          },
          "description": "List of EntityLabels (Key/Value) to filter to. Passing empty list here means no alerts will be processed."
        }
      },
      "description": "An explicit list of entity label key-value pairs to include in the filter."
    },
    "IndicatorFilter": {
      "title": "Indicator filter",
      "type": "object",
      "properties": {
        "enabled": {
          "type": "boolean",
          "description": "Enable/disable this filter"
        },
        "entityLabels": {
          "allOf": [
            {
              "$ref": "#/$defs/EntityLabelFilter"
            }
          ],
          "description": "Selected entity labels for filtering"
        },
        "priorities": {
          "allOf": [
            {
              "$ref": "#/$defs/IndicatorPriorityFilter"
            }
          ],
          "description": "Selected priorities for filtering"
        }
      },
      "description": "Object for filtering signals to be processed by the cases pipeline. The filters will be AND'ed together."
    },
    "IndicatorPriority": {
      "title": "Indicator priority",
      "enum": [
        "INDICATOR_PRIORITY_UNSPECIFIED",
        "INDICATOR_PRIORITY_P1",
        "INDICATOR_PRIORITY_P2",
        "INDICATOR_PRIORITY_P3",
        "INDICATOR_PRIORITY_P4",
        "INDICATOR_PRIORITY_P5"
      ],
      "type": "string",
      "description": "Priority of an alert indicator at trigger time."
    },
    "IndicatorPriorityFilter": {
      "title": "All or IndicatorPriority list",
      "type": "object",
      "oneOf": [
        {
          "required": [
            "all"
          ],
          "type": "object"
        },
        {
          "required": [
            "values"
          ],
          "type": "object"
        },
        {
          "type": "object",
          "not": {
            "anyOf": [
              {
                "required": [
                  "all"
                ],
                "type": "object"
              },
              {
                "required": [
                  "values"
                ],
                "type": "object"
              }
            ]
          }
        }
      ],
      "properties": {
        "all": {
          "$ref": "#/$defs/All"
        },
        "values": {
          "$ref": "#/$defs/IndicatorPriorityFilter.Values"
        }
      },
      "description": "Select all priorities or a specific list of IndicatorPriority values."
    },
    "IndicatorPriorityFilter.Values": {
      "type": "object",
      "properties": {
        "items": {
          "minItems": 0,
          "type": "array",
          "items": {
            "$ref": "#/$defs/IndicatorPriority"
          },
          "description": "List of IndicatorPriorities to filter to. Passing empty list here means no alerts will be processed."
        }
      },
      "description": "Entity label filter.values."
    },
    "v1.KeyValue": {
      "title": "Key-value pair",
      "required": [
        "key",
        "value"
      ],
      "type": "object",
      "properties": {
        "key": {
          "maxLength": 4096,
          "minLength": 1,
          "pattern": "^[\\s\\S]*$",
          "type": "string",
          "description": "Key of the pair (e.g., label or grouping name)"
        },
        "value": {
          "maxLength": 4096,
          "minLength": 1,
          "pattern": "^[\\s\\S]*$",
          "type": "string",
          "description": "Value associated with the key"
        }
      },
      "description": "Represents a simple key-value pair, often used for labels or groupings in cases."
    }
  }
}