{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/thousandeyes/json-schema/thousandeyes-endpoint-agent-labels-api-label-request-schema.json",
  "title": "Endpoint_Agent_Labels_API_LabelRequest",
  "x-generated": "2026-11-25",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/thousandeyes-endpoint-agent-labels-api-openapi.yml#/components/schemas/Endpoint_Agent_Labels_API_LabelRequest",
  "allOf": [
    {
      "required": [
        "name",
        "matchType",
        "filters"
      ]
    },
    {
      "$ref": "#/$defs/Endpoint_Agent_Labels_API_Label"
    }
  ],
  "$defs": {
    "Endpoint_Agent_Labels_API_Filter": {
      "type": "object",
      "properties": {
        "key": {
          "$ref": "#/$defs/Endpoint_Agent_Labels_API_FilterType"
        },
        "values": {
          "type": "array",
          "items": {
            "type": "string",
            "description": "Value depends on the key, and may change in the future.\n\n* `agent-id`: The agent identifiers.\n* `gateway`: The gateway IP to match.\n* `ssid`: A wildcard match on the SSID. Supports `*` for any characters and `?` for any single character.\n* `user-name`: A wildcard match on the users that use the agent. Supports `*` for any characters and `?` for any single character.\n* `hostname`: A wildcard match on the host name - supports `*` for any characters\nand `?` for any single character\n* `bssid`: BSSID for the wifi, lower case, with colons.\n* `platform`: Currently supports `Mac`, `Windows`, and `Linux`.\n* `asn`: Integer AS Number.\n* `public-network`: Network for agent's public IP in CIDR format, or IP for single IP. e.g. `192.45.32.0/22`.\n* `local-network`: Network for agent's local IP in CIDR format, or IP for single IP. e.g. `10.100.64.0/20`.\n* `connection`: Type of connection `Ethernet` or `Wireless`.\n* `agent-type`: Type of agent `endpoint`, `endpoint-pulse` or `endpoint-csc`.\n* `ip-address-family`: `ipv4` or `ipv6`.\n* `vpn-vendor`: Vendor of the VPN software. \n    Examples include: \n    \n    * `cisco-anyconnect`\n    * `palo-alto-globalprotect`\n    * `ivanti-connect-secure`\n    * `zscaler-internet-access`\n    * `f5-big-ip`\n* `vpn-gateway-address`: Server-side VPN connection IP address.\n* `vpn-client-network`: Network for the VPN client IP in CIDR format. For example, `10.100.32.128/25`.\n* `vpn-client-address`: The VPN client IP. For example, `10.100.32.165`.\n"
          }
        },
        "mode": {
          "$ref": "#/$defs/Endpoint_Agent_Labels_API_LabelFilterMode"
        }
      }
    },
    "Endpoint_Agent_Labels_API_FilterType": {
      "type": "string",
      "description": "Type of filter - the data that will be used to filter.",
      "enum": [
        "agent-id",
        "public-network",
        "local-network",
        "connection",
        "gateway",
        "platform",
        "agent-type",
        "vpn-vendor",
        "vpn-gateway-address",
        "vpn-client-network",
        "vpn-client-address",
        "ip-address-family",
        "ssid",
        "bssid",
        "hostname",
        "username",
        "asn"
      ]
    },
    "Endpoint_Agent_Labels_API_Label": {
      "description": "A label definition.",
      "type": "object",
      "properties": {
        "id": {
          "$ref": "#/$defs/Endpoint_Agent_Labels_API_LabelId"
        },
        "name": {
          "description": "The label name.",
          "type": "string",
          "readOnly": false
        },
        "color": {
          "description": "UI color",
          "type": "string",
          "readOnly": false
        },
        "matchType": {
          "$ref": "#/$defs/Endpoint_Agent_Labels_API_MatchType"
        },
        "filters": {
          "description": "The filters combined using the matchType to determine the label's match.",
          "type": "array",
          "readOnly": false,
          "items": {
            "$ref": "#/$defs/Endpoint_Agent_Labels_API_Filter"
          }
        }
      }
    },
    "Endpoint_Agent_Labels_API_LabelFilterMode": {
      "type": "string",
      "description": "Type of matching to be applied for the values:\n\n* `in`: The value on the agent must match one of the list of values provided.\n* `not-in`: The value on the agent must not match any of the list of values provided.\n",
      "enum": [
        "in",
        "not-in"
      ]
    },
    "Endpoint_Agent_Labels_API_LabelId": {
      "type": "string",
      "readOnly": true,
      "description": "Label identifier."
    },
    "Endpoint_Agent_Labels_API_MatchType": {
      "description": "Specifies how the filters are combined for matching this label.\n\n* `and`: All filters must be matched.\n* `or`: Any of the filters should match.\n",
      "type": "string",
      "readOnly": false,
      "enum": [
        "and",
        "or"
      ]
    }
  }
}