{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/harness/main/json-schema/harness-filter-schema.json",
  "title": "Filter",
  "description": "This has details of the Filter entity defined in Harness",
  "x-generated": "2026-10-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/harness-auditfilters-api-openapi.yml#/components/schemas/Filter",
  "required": [
    "filterProperties",
    "identifier",
    "name"
  ],
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "Name of the Filter."
    },
    "identifier": {
      "type": "string",
      "description": "Identifier of the Filter."
    },
    "orgIdentifier": {
      "type": "string",
      "description": "Organization Identifier for the Entity."
    },
    "projectIdentifier": {
      "type": "string",
      "description": "Project Identifier for the Entity."
    },
    "filterProperties": {
      "$ref": "#/$defs/FilterProperties"
    },
    "filterVisibility": {
      "type": "string",
      "description": "This indicates visibility of Filter, by default it is Everyone.",
      "enum": [
        "EveryOne",
        "OnlyCreator"
      ]
    }
  },
  "$defs": {
    "FilterProperties": {
      "required": [
        "filterType"
      ],
      "type": "object",
      "properties": {
        "tags": {
          "type": "object",
          "additionalProperties": {
            "type": "string",
            "description": "Filter tags as a key-value pair."
          },
          "description": "Filter tags as a key-value pair."
        },
        "filterType": {
          "type": "string",
          "description": "This specifies the corresponding Entity of the filter.",
          "enum": [
            "Connector",
            "Secret",
            "DelegateProfile",
            "Delegate",
            "PipelineSetup",
            "PipelineExecution",
            "Deployment",
            "Audit",
            "Template",
            "Trigger",
            "EnvironmentGroup",
            "FileStore",
            "CCMRecommendation",
            "Anomaly",
            "RIInventory",
            "SPInventory",
            "Autocud",
            "CCMConnector",
            "CCMK8sConnector",
            "Environment",
            "RuleExecution",
            "Override",
            "InputSet",
            "Webhook",
            "CCMBudget",
            "Service",
            "QueuedPipeline"
          ]
        }
      },
      "description": "Properties of the Filter entity defined in Harness."
    }
  }
}