{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-guardduty/json-schema/amazon-guardduty-get-findings-statistics-request-schema.json",
  "title": "GetFindingsStatisticsRequest",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-guardduty-findings-api-openapi.yml#/components/schemas/GetFindingsStatisticsRequest",
  "type": "object",
  "properties": {
    "DetectorId": {
      "type": "string",
      "description": "The ID of the detector whose findings statistics you want to retrieve. To find the detectorId in the current Region, see the Settings page in the GuardDuty console, or run the ListDetectors API."
    },
    "FindingStatisticTypes": {
      "type": "array",
      "items": {
        "type": "string",
        "enum": [
          "COUNT_BY_SEVERITY"
        ]
      },
      "description": "The types of finding statistics to retrieve."
    },
    "FindingCriteria": {
      "$ref": "#/$defs/FindingCriteria"
    },
    "GroupBy": {
      "type": "string",
      "enum": [
        "ACCOUNT",
        "DATE",
        "FINDING_TYPE",
        "RESOURCE",
        "SEVERITY"
      ],
      "description": "Displays the findings statistics grouped by one of the listed valid values."
    },
    "OrderBy": {
      "type": "string",
      "enum": [
        "ASC",
        "DESC"
      ],
      "description": "Displays the sorted findings in the requested order. The default value of orderBy is DESC. You can use this parameter only with the groupBy parameter."
    },
    "MaxResults": {
      "type": "integer",
      "description": "The maximum number of results to be returned in the response. The default value is 25. You can use this parameter only with the groupBy parameter."
    }
  },
  "required": [
    "DetectorId"
  ],
  "$defs": {
    "Condition": {
      "type": "object",
      "properties": {
        "Eq": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Represents the equal condition to be applied to a single field when querying for findings. Max values: 50"
        },
        "Neq": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Represents the not equal condition to be applied to a single field when querying for findings. Max values: 50"
        },
        "Gt": {
          "type": "integer",
          "description": "Represents a greater than condition to be applied to a single field when querying for findings."
        },
        "Gte": {
          "type": "integer",
          "description": "Represents a greater than or equal condition to be applied to a single field when querying for findings."
        },
        "Lt": {
          "type": "integer",
          "description": "Represents a less than condition to be applied to a single field when querying for findings."
        },
        "Lte": {
          "type": "integer",
          "description": "Represents a less than or equal condition to be applied to a single field when querying for findings."
        },
        "Equals": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Represents an equal condition to be applied to a single field when querying for findings. Max values: 50"
        },
        "NotEquals": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Represents a not equal condition to be applied to a single field when querying for findings. Max values: 50"
        },
        "GreaterThan": {
          "type": "integer",
          "description": "Represents a greater than condition to be applied to a single field when querying for findings."
        },
        "GreaterThanOrEqual": {
          "type": "integer",
          "description": "Represents a greater than or equal condition to be applied to a single field when querying for findings."
        },
        "LessThan": {
          "type": "integer",
          "description": "Represents a less than condition to be applied to a single field when querying for findings."
        },
        "LessThanOrEqual": {
          "type": "integer",
          "description": "Represents a less than or equal condition to be applied to a single field when querying for findings."
        },
        "Matches": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Represents the match condition to be applied to a single field when querying for findings. The matches condition is available only for create-filter and update-filter APIs."
        },
        "NotMatches": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Represents the not match condition to be applied to a single field when querying for findings. The not-matches condition is available only for create-filter and update-filter APIs."
        }
      }
    },
    "FindingCriteria": {
      "type": "object",
      "properties": {
        "Criterion": {
          "type": "object",
          "additionalProperties": {
            "$ref": "#/$defs/Condition"
          },
          "description": "Represents a map of finding properties that match specified conditions and values when querying findings."
        }
      }
    }
  }
}