{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/device42/main/json-schema/device42-app-group-calc-template-schema.json",
  "title": "AppGroupCalcTemplate",
  "x-generated": "2026-10-14",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/device42-openapi.yaml#/components/schemas/AppGroupCalcTemplate",
  "type": "object",
  "properties": {
    "id": {
      "type": "integer",
      "description": "ID of an existing Application Group Calculation Templates. Do not enter an ID if you are creating a new template."
    },
    "name": {
      "type": "string",
      "description": "Name of the Application Group Calculation Templates.  Either name or id is required."
    },
    "calculation_format": {
      "type": "string",
      "enum": [
        "Form",
        "DOQL"
      ],
      "description": "Whether the template is defined using DOQL or using predefined form fields. Required for new templates."
    },
    "doql_query": {
      "type": "string",
      "description": "DOQL query to use for template. Required for new templates with DOQL calculation format."
    },
    "connection_limit": {
      "type": "integer",
      "description": "How many connections are allowed for a single node in application group before it stops traversing"
    },
    "time_period": {
      "type": "integer",
      "description": "Number of days to look back for connections"
    },
    "exclude_local_host": {
      "type": "string",
      "enum": [
        "yes",
        "no"
      ],
      "description": "Exclude any connections that are to the local host"
    },
    "exclude_unmapped_clients": {
      "type": "string",
      "enum": [
        "yes",
        "no"
      ],
      "description": "Exclude any connections that are client only"
    },
    "exclude_client_os": {
      "type": "string",
      "enum": [
        "yes",
        "no"
      ],
      "description": "Exclude devices with client operating systems"
    },
    "end_at_vip": {
      "type": "string",
      "enum": [
        "yes",
        "no"
      ],
      "description": "Stop traversing at VIPs"
    },
    "end_at_db": {
      "type": "string",
      "enum": [
        "yes",
        "no"
      ],
      "description": "Stop traversing at databases"
    },
    "depth_level": {
      "type": "integer",
      "description": "How many levels deep to traverse"
    },
    "exclude_udl": {
      "type": "string",
      "enum": [
        "yes",
        "no"
      ],
      "description": "Exclude any connections that are to Undiscovered Listeners"
    },
    "inclusions": {
      "description": "JSON array of inclusion criteria",
      "type": "array",
      "items": {
        "properties": {
          "criteria": {
            "type": "string",
            "description": "Advanced query filtering as specified in list page for selected ci type."
          },
          "ci_type": {
            "type": "string",
            "enum": [
              "device",
              "resource"
            ],
            "description": "Type of CI to include - currently supporting device and resources"
          }
        }
      }
    },
    "exclusions": {
      "description": "JSON array of exclusion criteria",
      "type": "array",
      "items": {
        "properties": {
          "criteria": {
            "type": "string",
            "description": "Advanced query filtering as specified in list page for selected ci type."
          },
          "ci_type": {
            "type": "string",
            "enum": [
              "application_component",
              "device",
              "resource",
              "serviceportremoteip",
              "servicedetail"
            ],
            "description": "Type of CI to include - currently supporting application_component, device, resource, serviceportremoteip, and servicedetail"
          }
        }
      }
    }
  }
}