{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/palo-alto-networks/main/json-schema/palo-alto-networks-list-groups-user-belongs-to-2-schema.json",
  "title": "list_groups_user_belongs_to_2",
  "description": "Retrieve all groups containing specific users based on user-filter.",
  "x-generated": "2026-10-03",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/palo-alto-networks-directory-sync-service-api-openapi.yml#/components/schemas/list_groups_user_belongs_to_2",
  "allOf": [
    {
      "$ref": "#/$defs/domain_param"
    },
    {
      "$ref": "#/$defs/pagination_params_2"
    }
  ],
  "required": [
    "filter"
  ],
  "properties": {
    "filter": {
      "type": "object",
      "required": [
        "type",
        "name"
      ],
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "user"
          ]
        },
        "name": {
          "$ref": "#/$defs/attr_based_filter"
        },
        "attrs": {
          "type": "array",
          "description": "group attributes part of the response",
          "items": {
            "type": "string"
          }
        }
      }
    }
  },
  "$defs": {
    "attr_based_filter": {
      "type": "object",
      "description": "Attribute-based filter.",
      "required": [
        "attrName",
        "attrValue",
        "match"
      ],
      "properties": {
        "attrName": {
          "description": "Attribute name",
          "type": "string",
          "enum": [
            "User Principal Name",
            "Common-Name",
            "Name",
            "Distinguished Name",
            "SAM Account Name",
            "Unique Identifier"
          ]
        },
        "attrValue": {
          "description": "Attribute value",
          "type": "string"
        },
        "match": {
          "description": "Value you want to match.",
          "type": "string",
          "enum": [
            "equal",
            "textSearch"
          ]
        }
      }
    },
    "domain_param": {
      "type": "object",
      "description": "Domain name for a specific directory.",
      "required": [
        "domain"
      ],
      "properties": {
        "domain": {
          "type": "string",
          "description": "Domain name of the target directory."
        }
      }
    },
    "pagination_params_2": {
      "type": "object",
      "description": "Optional pagination parameters.",
      "properties": {
        "pageNum": {
          "type": "integer",
          "description": "Page number to retrieve (starting from page-1)."
        },
        "pageSz": {
          "type": "integer",
          "description": "Number of records per page (max is 1000 per page)."
        }
      }
    }
  }
}