Skip to main content
POST
Aggregate analytics events over time

Authorizations

api_key
string
header
required

Personal API key.

Path Parameters

app_id
string
required

ID of the app whose analytics to read.

Body

application/json

Request for time-bucketed event aggregation.

event_name
string | null

Name of the event to aggregate. Omit to aggregate every event the app tracks.

Example:

"checkout_completed"

q
string | null

Filter expression, as a JSON object serialized to a string. Same syntax as Query analytics events.

Example:

"{\"metadata.country\": \"US\"}"

start_time
string<date-time> | null

Start of the time range. Defaults to 30 days ago.

Example:

"2026-07-03T00:00:00Z"

end_time
string<date-time> | null

End of the time range. Defaults to now.

Example:

"2026-08-02T00:00:00Z"

bucket_size_ms
integer | null

Requested bucket size in milliseconds. Base44 rounds it down to the nearest supported interval, and up to one hour when you ask for anything finer than that. Omit to pick the finest interval that fits max_buckets.

Example:

86400000

max_buckets
integer
default:1000

Maximum number of buckets to return, between 10 and 1000. Drives the interval when bucket_size_ms is omitted.

Required range: 10 <= x <= 1000
Example:

100

metrics
AggregationMetric · object[]

Between 1 and 10 metrics to compute per bucket. Defaults to an event count named event_count and a distinct-user count named unique_users.

Required array length: 1 - 10 elements
Example:

Response

The bucketed metrics.

Response for time-bucketed event aggregation.

bucket_interval
integer
required

Interval Base44 bucketed by, in milliseconds.

Example:

86400000

bucket_count
integer
required

Number of buckets returned.

Example:

30

event_name
string | null

The event name that was aggregated, or null when the request covered every event.

Example:

"checkout_completed"

totals
Totals · object

Each metric computed over the whole range at once, keyed by metric name. Not the sum of the buckets: count_unique counts distinct values across the range.

Example:
buckets
TimeBucket · object[]

The buckets, oldest first. Buckets with no matching events are omitted rather than reported as zero.

Example: