Skip to main content

aggregate

Creates, updates, deletes, gets or lists an aggregate resource.

Overview

Nameaggregate
TypeResource
Idcloudflare.cloudforce_one.aggregate

Fields

The following fields are returned by SELECT queries:

Returns aggregated event data.

NameDatatypeDescription
countnumberNumber of events for this aggregation
datestringDate (if groupByDate is true)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
listselectaccount_idaggregateBy, datasetId, startDate, endDate, groupByDate, limitAggregate 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.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
account_idstringThe Cloudflare account ID.
aggregateBystringColumn(s) to aggregate by - single column or comma-separated list (e.g., 'attacker', 'targetIndustry', 'attacker,targetIndustry')
datasetIdarrayDataset ID(s) to filter by. Can be a single dataset ID, comma-separated list, or array. If not provided, uses default dataset
endDatestringEnd date for filtering (ISO 8601 format, e.g., '2024-12-31')
groupByDatebooleanWhether to group results by date (daily aggregation)
limitnumberMaximum number of results to return
startDatestringStart date for filtering (ISO 8601 format, e.g., '2024-01-01')

SELECT examples

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.

SELECT
count,
date
FROM cloudflare.cloudforce_one.aggregate
WHERE account_id = '{{ account_id }}' -- required
AND aggregateBy = '{{ aggregateBy }}'
AND datasetId = '{{ datasetId }}'
AND startDate = '{{ startDate }}'
AND endDate = '{{ endDate }}'
AND groupByDate = '{{ groupByDate }}'
AND limit = '{{ limit }}'
;