{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/cisco-xdr/json-schema/cisco-xdr-target-group-request-schema.json",
  "title": "TargetGroupRequest ...",
  "description": "Either ViewSchemaID or Type or both can be provided to create a TargetGroup.",
  "x-generated": "2026-11-25",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/cisco-xdr-target-groups-api-openapi.yml#/components/schemas/TargetGroupRequest",
  "required": [
    "name",
    "targets",
    "title"
  ],
  "type": "object",
  "properties": {
    "criteria": {
      "type": "array",
      "description": "TargetTypes common attributes",
      "items": {
        "$ref": "#/$defs/Expression"
      },
      "x-go-name": "Criteria"
    },
    "description": {
      "type": "string",
      "description": "Description of TargetGroup",
      "x-go-name": "Description"
    },
    "id": {
      "type": "string",
      "x-go-name": "TargetGroupID"
    },
    "name": {
      "type": "string",
      "description": "Name of TargetGroup",
      "x-go-name": "Name"
    },
    "schema_id": {
      "type": "string",
      "description": "ViewSchemaID of Schedule",
      "x-go-name": "ViewSchemaID"
    },
    "targets": {
      "type": "array",
      "description": "Properties of Targets",
      "items": {
        "$ref": "#/$defs/TargetGroupProperties"
      },
      "x-go-name": "TargetGroupProperties"
    },
    "title": {
      "type": "string",
      "description": "Title of TargetGroup",
      "x-go-name": "Title"
    },
    "type": {
      "type": "string",
      "description": "Type",
      "x-go-name": "Type"
    },
    "unique_name": {
      "type": "string",
      "description": "Uniquename",
      "x-go-name": "UniqueName"
    }
  },
  "x-go-package": "bitbucket-eng-sjc1.cisco.com/bitbucket/nextg/ao-libs/api/models",
  "$defs": {
    "Expression": {
      "title": "Expression ....",
      "type": "object",
      "properties": {
        "left_operand": {
          "type": "object",
          "properties": {},
          "x-go-name": "LeftOperand"
        },
        "operator": {
          "type": "string",
          "x-go-name": "Operator"
        },
        "right_operand": {
          "type": "object",
          "properties": {},
          "x-go-name": "RightOperand"
        }
      },
      "x-go-package": "bitbucket-eng-sjc1.cisco.com/bitbucket/nextg/base-microservice/longhornparser/models"
    },
    "TargetGroupProperties": {
      "title": "TargetGroupProperties represents the specific target group attributes information\nIt holds the data/view schema id of targettype, target Ids and criteria for Target group",
      "type": "object",
      "properties": {
        "criteria": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Expression"
          },
          "x-go-name": "Criteria"
        },
        "data_target_type": {
          "type": "string",
          "x-go-name": "DataTargetType"
        },
        "include_all_targets": {
          "type": "boolean",
          "x-go-name": "IncludeAllTargets"
        },
        "matched_target_ids": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "x-go-name": "MatchedTargetIDs"
        },
        "selected_target_ids": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "x-go-name": "SelectedTargetIDs"
        },
        "view_target_type": {
          "type": "string",
          "x-go-name": "ViewTargetType"
        }
      },
      "description": "nolint:lll",
      "x-go-package": "bitbucket-eng-sjc1.cisco.com/bitbucket/nextg/lib-data/models"
    }
  }
}