Aggregate events by single or multiple columns with optional date filtering
client.cloudforceOne.threatEvents.aggregate.list(AggregateListParams { account_id, aggregateBy, datasetId, 4 more } params, RequestOptionsoptions?): AggregateListResponse { aggregateBy, aggregations, total, dateRange }
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)
Aggregate events by single or multiple columns with optional date filtering
import Cloudflare from 'cloudflare';
const client = new Cloudflare({
apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted
});
const aggregates = await client.cloudforceOne.threatEvents.aggregate.list({
account_id: 'account_id',
aggregateBy: 'aggregateBy',
});
console.log(aggregates.aggregateBy);{
"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"
}
}