AWS Security Hub · Schema
GetFindingStatisticsV2Request
SecurityCloud Security Posture ManagementComplianceFindingsThreat DetectionCloudAmazon Web Services
Properties
| Name | Type | Description |
|---|---|---|
| GroupByRules | array | Specifies how security findings should be aggregated and organized in the statistical analysis. It can accept up to 5 groupBy fields in a single call. |
| Scopes | object | |
| SortOrder | string | Orders the aggregation count in descending or ascending order. Descending order is the default. |
| MaxStatisticResults | integer | The maximum number of results to be returned. |
JSON Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://artifacts.apis.io/aws-security-hub/json-schema/aws-security-hub-get-finding-statistics-v2-request-schema.json",
"title": "GetFindingStatisticsV2Request",
"x-generated": "2026-11-11",
"x-method": "derived",
"x-generator": "derive-json-schema.py",
"x-source": "openapi/aws-security-hub-findingsv2-api-openapi.yml#/components/schemas/GetFindingStatisticsV2Request",
"type": "object",
"properties": {
"GroupByRules": {
"type": "array",
"items": {
"$ref": "#/$defs/GroupByRule"
},
"description": "Specifies how security findings should be aggregated and organized in the statistical analysis. It can accept up to 5 groupBy fields in a single call."
},
"Scopes": {
"$ref": "#/$defs/FindingScopes"
},
"SortOrder": {
"type": "string",
"enum": [
"asc",
"desc"
],
"description": "Orders the aggregation count in descending or ascending order. Descending order is the default."
},
"MaxStatisticResults": {
"type": "integer",
"description": "The maximum number of results to be returned."
}
},
"required": [
"GroupByRules"
],
"$defs": {
"AwsOrganizationScope": {
"type": "object",
"properties": {
"OrganizationId": {
"type": "string",
"description": "The unique identifier (ID) of the organization (for example, o-abcd1234567890). The organization must be the delegated administrator's own organization. If you omit this value and provide OrganizationalUnitId, Security Hub uses the caller's organization ID."
},
"OrganizationalUnitId": {
"type": "string",
"description": "The unique identifier (ID) of the organizational unit (OU) (for example, ou-ab12-cd345678). The OU must exist within the delegated administrator's own organization. When specified, the results include only data from accounts in this OU."
}
}
},
"BooleanFilter": {
"type": "object",
"properties": {
"Value": {
"type": "boolean",
"description": "The value of the boolean."
}
}
},
"CompositeFilter": {
"type": "object",
"properties": {
"StringFilters": {
"type": "array",
"items": {
"$ref": "#/$defs/OcsfStringFilter"
},
"description": "Enables filtering based on string field values."
},
"DateFilters": {
"type": "array",
"items": {
"$ref": "#/$defs/OcsfDateFilter"
},
"description": "Enables filtering based on date and timestamp fields."
},
"BooleanFilters": {
"type": "array",
"items": {
"$ref": "#/$defs/OcsfBooleanFilter"
},
"description": "Enables filtering based on boolean field values."
},
"NumberFilters": {
"type": "array",
"items": {
"$ref": "#/$defs/OcsfNumberFilter"
},
"description": "Enables filtering based on numerical field values."
},
"MapFilters": {
"type": "array",
"items": {
"$ref": "#/$defs/OcsfMapFilter"
},
"description": "Enables filtering based on map field values."
},
"IpFilters": {
"type": "array",
"items": {
"$ref": "#/$defs/OcsfIpFilter"
},
"description": "A list of IP address filters that allowing you to filter findings based on IP address properties."
},
"NestedCompositeFilters": {
"type": "array",
"items": {
"$ref": "#/$defs/CompositeFilter"
},
"description": "Provides an additional level of filtering, creating a three-layer nested structure. The first layer is a CompositeFilters array with a CompositeOperator (AND/OR). The second layer is a CompositeFilter object that contains direct filters and NestedCompositeFilters. The third layer is NestedCompositeFilters, which contains additional filter conditions."
},
"Operator": {
"type": "string",
"enum": [
"AND",
"OR"
],
"description": "The logical operator used to combine multiple filter conditions."
}
}
},
"DateFilter": {
"type": "object",
"properties": {
"Start": {
"type": "string",
"description": "A timestamp that provides the start date for the date filter. For more information about the validation and formatting of timestamp fields in Security Hub CSPM, see Timestamps."
},
"End": {
"type": "string",
"description": "A timestamp that provides the end date for the date filter. For more information about the validation and formatting of timestamp fields in Security Hub CSPM, see Timestamps."
},
"DateRange": {
"$ref": "#/$defs/DateRange"
}
}
},
"DateRange": {
"type": "object",
"properties": {
"Value": {
"type": "integer",
"description": "A date range value for the date filter."
},
"Unit": {
"type": "string",
"enum": [
"DAYS"
],
"description": "A date range unit for the date filter."
},
"Comparison": {
"type": "string",
"enum": [
"WITHIN",
"OLDER_THAN"
],
"description": "The condition to apply to a date range filter. If you specify WITHIN, Security Hub filters for dates within the specified date range. If you specify OLDER_THAN, Security Hub filters for dates before the specified date range. If you don't specify a value, the default is WITHIN."
}
}
},
"FindingScopes": {
"type": "object",
"properties": {
"AwsOrganizations": {
"type": "array",
"items": {
"$ref": "#/$defs/AwsOrganizationScope"
},
"description": "A list of Organizations scopes to include in the query results. Each entry in the list specifies an organization or organizational unit to include for the delegated administrator's account. If the list specifies multiple entries, the entries are combined using OR logic."
}
}
},
"GroupByRule": {
"type": "object",
"properties": {
"Filters": {
"$ref": "#/$defs/OcsfFindingFilters"
},
"GroupByField": {
"type": "string",
"enum": [
"activity_name",
"cloud.account.uid",
"cloud.provider",
"cloud.region",
"compliance.assessments.name",
"compliance.status",
"compliance.control",
"finding_info.title",
"finding_info.related_events.traits.category",
"finding_info.types",
"impact",
"likelihood",
"metadata.product.name",
"metadata.product.uid",
"resources.type",
"resources.cloud_partition",
"resources.criticality",
"resources.name",
"resources.owner.account.uid",
"resources.owner.org.uid",
"resources.owner.account.name",
"resources.provider",
"resources.region",
"resources.uid",
"severity",
"status",
"vulnerabilities.fix_coverage",
"class_name",
"vulnerabilities.affected_packages.name",
"finding_info.analytic.name",
"compliance.standards",
"cloud.account.name",
"vendor_attributes.severity",
"metadata.product.vendor_name"
],
"description": "The attribute by which filtered findings should be grouped."
}
},
"required": [
"GroupByField"
]
},
"IpFilter": {
"type": "object",
"properties": {
"Cidr": {
"type": "string",
"description": "A finding's CIDR value."
}
}
},
"MapFilter": {
"type": "object",
"properties": {
"Key": {
"type": "string",
"description": "The key of the map filter. For example, for ResourceTags, Key identifies the name of the tag. For UserDefinedFields, Key is the name of the field."
},
"Value": {
"type": "string",
"description": "The value for the key in the map filter. Filter values are case sensitive. For example, one of the values for a tag called Department might be Security. If you provide security as the filter value, then there's no match."
},
"Comparison": {
"type": "string",
"enum": [
"EQUALS",
"NOT_EQUALS",
"CONTAINS",
"NOT_CONTAINS"
],
"description": "The condition to apply to the key value when filtering Security Hub CSPM findings with a map filter. To search for values that have the filter value, use one of the following comparison operators: To search for values that include the filter value, use CONTAINS. For example, for the ResourceTags field, the filter Department CONTAINS Security matches findings that include the value Security for the Department tag. In the same example, a finding with a value of Security team for the Department tag is a match. To search for values that exactly match the filter value, use EQUALS. For example, for "
}
}
},
"NumberFilter": {
"type": "object",
"properties": {
"Gte": {
"type": "number",
"description": "The greater-than-equal condition to be applied to a single field when querying for findings."
},
"Lte": {
"type": "number",
"description": "The less-than-equal condition to be applied to a single field when querying for findings."
},
"Eq": {
"type": "number",
"description": "The equal-to condition to be applied to a single field when querying for findings."
},
"Gt": {
"type": "number",
"description": "The greater-than condition to be applied to a single field when querying for findings."
},
"Lt": {
"type": "number",
"description": "The less-than condition to be applied to a single field when querying for findings."
}
}
},
"OcsfBooleanFilter": {
"type": "object",
"properties": {
"FieldName": {
"type": "string",
"enum": [
"compliance.assessments.meets_criteria",
"vulnerabilities.is_exploit_available",
"vulnerabilities.is_fix_available"
],
"description": "The name of the field."
},
"Filter": {
"$ref": "#/$defs/BooleanFilter"
}
}
},
"OcsfDateFilter": {
"type": "object",
"properties": {
"FieldName": {
"type": "string",
"enum": [
"finding_info.created_time_dt",
"finding_info.first_seen_time_dt",
"finding_info.last_seen_time_dt",
"finding_info.modified_time_dt",
"resources.image.created_time_dt",
"resources.image.last_used_time_dt",
"resources.modified_time_dt"
],
"description": "The name of the field."
},
"Filter": {
"$ref": "#/$defs/DateFilter"
}
}
},
"OcsfFindingFilters": {
"type": "object",
"properties": {
"CompositeFilters": {
"type": "array",
"items": {
"$ref": "#/$defs/CompositeFilter"
},
"description": "Enables the creation of complex filtering conditions by combining filter criteria."
},
"CompositeOperator": {
"type": "string",
"enum": [
"AND",
"OR"
],
"description": "The logical operators used to combine the filtering on multiple CompositeFilters."
}
}
},
"OcsfIpFilter": {
"type": "object",
"properties": {
"FieldName": {
"type": "string",
"enum": [
"evidences.dst_endpoint.ip",
"evidences.src_endpoint.ip"
],
"description": "The name of the IP address field to filter on."
},
"Filter": {
"$ref": "#/$defs/IpFilter"
}
}
},
"OcsfMapFilter": {
"type": "object",
"properties": {
"FieldName": {
"type": "string",
"enum": [
"resources.tags",
"compliance.control_parameters",
"databucket.tags",
"finding_info.tags"
],
"description": "The name of the field."
},
"Filter": {
"$ref": "#/$defs/MapFilter"
}
}
},
"OcsfNumberFilter": {
"type": "object",
"properties": {
"FieldName": {
"type": "string",
"enum": [
"activity_id",
"compliance.status_id",
"confidence_score",
"severity_id",
"status_id",
"finding_info.related_events_count",
"evidences.api.response.code",
"evidences.dst_endpoint.autonomous_system.number",
"evidences.dst_endpoint.port",
"evidences.src_endpoint.autonomous_system.number",
"evidences.src_endpoint.port",
"resources.image.in_use_count",
"vulnerabilities.cve.cvss.base_score",
"vendor_attributes.severity_id"
],
"description": "The name of the field."
},
"Filter": {
"$ref": "#/$defs/NumberFilter"
}
}
},
"OcsfStringFilter": {
"type": "object",
"properties": {
"FieldName": {
"type": "string",
"enum": [
"metadata.uid",
"activity_name",
"cloud.account.uid",
"cloud.provider",
"cloud.region",
"compliance.assessments.category",
"compliance.assessments.name",
"compliance.control",
"compliance.status",
"compliance.standards",
"finding_info.desc",
"finding_info.src_url",
"finding_info.title",
"finding_info.types",
"finding_info.uid",
"finding_info.related_events.traits.category",
"finding_info.related_events.uid",
"finding_info.related_events.product.uid",
"finding_info.related_events.title",
"impact",
"likelihood",
"metadata.product.name",
"metadata.product.uid",
"metadata.product.vendor_name",
"remediation.desc",
"remediation.references",
"resources.cloud_partition",
"resources.criticality",
"resources.name",
"resources.owner.account.uid",
"resources.owner.org.uid",
"resources.owner.account.name",
"resources.provider",
"resources.region",
"resources.type",
"resources.uid",
"severity",
"status",
"comment",
"vulnerabilities.fix_coverage",
"class_name",
"databucket.encryption_details.algorithm",
"databucket.encryption_details.key_uid",
"databucket.file.data_classifications.classifier_details.type",
"evidences.actor.user.account.uid",
"evidences.api.operation",
"evidences.api.response.error_message",
"evidences.api.service.name",
"evidences.connection_info.direction",
"evidences.connection_info.protocol_name",
"evidences.dst_endpoint.autonomous_system.name",
"evidences.dst_endpoint.location.city",
"evidences.dst_endpoint.location.country",
"evidences.src_endpoint.autonomous_system.name",
"evidences.src_endpoint.hostname",
"evidences.src_endpoint.location.city",
"evidences.src_endpoint.location.country",
"finding_info.analytic.name",
"malware.name",
"malware_scan_info.uid",
"malware.severity",
"resources.cloud_function.layers.uid_alt",
"resources.cloud_function.runtime",
"resources.cloud_function.user.uid",
"resources.device.encryption_details.key_uid",
"resources.device.image.uid",
"resources.image.architecture",
"resources.image.registry_uid",
"resources.image.repository_name",
"resources.image.uid",
"resources.subnet_info.uid",
"resources.vpc_uid",
"vulnerabilities.affected_code.file.path",
"vulnerabilities.affected_packages.name",
"vulnerabilities.cve.epss.score",
"vulnerabilities.cve.uid",
"vulnerabilities.related_vulnerabilities",
"cloud.account.name",
"vendor_attributes.severity"
],
"description": "The name of the field."
},
"Filter": {
"$ref": "#/$defs/StringFilter"
}
}
},
"StringFilter": {
"type": "object",
"properties": {
"Value": {
"type": "string",
"description": "The string filter value. Filter values are case sensitive. For example, the product name for control-based findings is Security Hub CSPM. If you provide security hub as the filter value, there's no match."
},
"Comparison": {
"type": "string",
"enum": [
"EQUALS",
"PREFIX",
"NOT_EQUALS",
"PREFIX_NOT_EQUALS",
"CONTAINS",
"NOT_CONTAINS",
"CONTAINS_WORD"
],
"description": "The condition to apply to a string value when filtering Security Hub CSPM findings. To search for values that have the filter value, use one of the following comparison operators: To search for values that include the filter value, use CONTAINS. For example, the filter Title CONTAINS CloudFront matches findings that have a Title that includes the string CloudFront. To search for values that contain a word matching the filter value, regardless of case, use CONTAINS_WORD. For example, the filter Title CONTAINS_WORD lambda matches a finding whose Title is GuardDuty Lambda Protection, because the "
}
}
}
}
}
Work with this as data
Every JSON Schema here is available over the APIs.io API and to AI agents over MCP.
MCP server
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
Tools for schemas
4 MCP tools reach this
find_json_schemasBrowse and filter every JSON Schema in the catalog.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.
Call it yourself
curl for this page
This JSON Schema
curl "https://apis.io/api/v1/json-schemas/aws-security-hub-get-finding-statistics-v2-request"
All schemas
curl "https://apis.io/api/v1/json-schemas?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Get an API key
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.