Aggregate events by single or multiple columns with optional date filtering
GET/accounts/{account_id}/cloudforce-one/events/aggregate
Aggregate threat events by one or more columns (e.g., attacker, targetIndustry) with optional date filtering and daily grouping. Supports multi-dimensional aggregation for cross-analysis.
Security
API Token
The preferred authorization scheme for interacting with the Cloudflare API. Create a token.
Example:
Accepted Permissions (at least one required)
Query Parameters
aggregateBy: string
Column(s) to aggregate by - single column or comma-separated list (e.g., ‘attacker’, ‘targetIndustry’, ‘attacker,targetIndustry’)
datasetId: optional array of string
Dataset UUIDs to filter by, or one standalone scope value: ‘all’/’*’ for all accessible non-analytics event datasets (analytics datasets are silently excluded), ‘analytics’ for isAnalytics=true datasets, or ‘operational’ for isAnalytics=false datasets. If not provided, uses the default dataset.
Aggregate events by single or multiple columns with optional date filtering
curl https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/cloudforce-one/events/aggregate \
-H "Authorization: Bearer $CLOUDFLARE_API_TOKEN"{
"aggregateBy": "aggregateBy",
"aggregations": [
{
"count": 0,
"date": "date"
}
],
"total": 0,
"dateRange": {
"endDate": "endDate",
"startDate": "startDate"
}
}Returns Examples
{
"aggregateBy": "aggregateBy",
"aggregations": [
{
"count": 0,
"date": "date"
}
],
"total": 0,
"dateRange": {
"endDate": "endDate",
"startDate": "startDate"
}
}