{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/thousandeyes/json-schema/thousandeyes-dashboards-api-api-context-filter-request-schema.json",
  "title": "Dashboards_API_ApiContextFilterRequest",
  "description": "Request containing dashboard filter name, description and context details.",
  "x-generated": "2026-11-25",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/thousandeyes-dashboards-filters-api-openapi.yml#/components/schemas/Dashboards_API_ApiContextFilterRequest",
  "type": "object",
  "properties": {
    "context": {
      "$ref": "#/$defs/Dashboards_API_ApiContextFilters"
    },
    "name": {
      "$ref": "#/$defs/Dashboards_API_ApiDashboardFilterName"
    },
    "description": {
      "$ref": "#/$defs/Dashboards_API_ApiDashboardFilterDescription"
    }
  },
  "required": [
    "name",
    "context"
  ],
  "$defs": {
    "Dashboards_API_ApiContextFilters": {
      "type": "array",
      "description": "List of filters to be applied to a dashboard.",
      "uniqueItems": true,
      "items": {
        "$ref": "#/$defs/Dashboards_API_ApiDataSourceFilters"
      }
    },
    "Dashboards_API_ApiDashboardFilterDescription": {
      "type": "string",
      "description": "An optional description of the filter."
    },
    "Dashboards_API_ApiDashboardFilterName": {
      "type": "string",
      "description": "The name of the dashboard filter, this must be unique."
    },
    "Dashboards_API_ApiDataSourceFilter": {
      "type": "object",
      "description": "List of different filter properties for a single datasource.",
      "properties": {
        "filterId": {
          "type": "string",
          "description": "Data source property to filter by."
        },
        "values": {
          "type": "array",
          "uniqueItems": true,
          "description": "Values to filter by based on the specified `filterId`.",
          "items": {
            "type": "string"
          }
        },
        "metricIds": {
          "type": "array",
          "uniqueItems": true,
          "description": "Dashboard metric associated with the filter property.",
          "items": {
            "type": "string"
          }
        }
      },
      "required": [
        "filterId",
        "values",
        "metricIds"
      ]
    },
    "Dashboards_API_ApiDataSourceFilters": {
      "type": "object",
      "description": "List of different datasource filters.",
      "properties": {
        "dataSourceId": {
          "type": "string",
          "description": "Types of data source."
        },
        "filters": {
          "type": "array",
          "description": "List of different filter properties.",
          "uniqueItems": true,
          "items": {
            "$ref": "#/$defs/Dashboards_API_ApiDataSourceFilter"
          }
        }
      },
      "required": [
        "dataSourceId",
        "filters"
      ]
    }
  }
}