Aggregate analytics events over time
Aggregates the app’s analytics events into time buckets, so you can chart them. Send the metrics you want per bucket, and Base44 returns them per bucket plus a total over the whole range.
The range defaults to the last 30 days. Events are kept for 60 days, so an older range returns nothing. timestamp bounds inside q override start_time and end_time.
Base44 buckets by one of a fixed set of intervals: 1, 2, 3, 4, 6, 8 and 12 hours, 1, 2 and 3 days, 1 and 2 weeks, and 30 days. One hour is the finest available. Omit bucket_size_ms to get the finest interval that keeps the bucket count within max_buckets. Pass it to choose an interval yourself: Base44 rounds it down to the nearest supported interval, and rounds it up to one hour when you ask for anything finer, so a sub-hour request comes back coarser than you asked. Read the interval it used off bucket_interval in the response rather than assuming your request was honored. Keep bucket_size_ms coarse enough that the range divides into no more than max_buckets buckets.
Buckets with no matching events are left out, so chart your own zero for the gaps. count and count_unique work on any field, while sum, avg, min, max and the percentiles read the field as a number and report 0 for a bucket whose values are all non-numeric.
Authorizations
Personal API key.
Path Parameters
ID of the app whose analytics to read.
Body
Request for time-bucketed event aggregation.
Name of the event to aggregate. Omit to aggregate every event the app tracks.
"checkout_completed"
Filter expression, as a JSON object serialized to a string. Same syntax as Query analytics events.
"{\"metadata.country\": \"US\"}"
Start of the time range. Defaults to 30 days ago.
"2026-07-03T00:00:00Z"
End of the time range. Defaults to now.
"2026-08-02T00:00:00Z"
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.
86400000
Maximum number of buckets to return, between 10 and 1000. Drives the interval when bucket_size_ms is omitted.
10 <= x <= 1000100
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.
1 - 10 elementsResponse
The bucketed metrics.
Response for time-bucketed event aggregation.
Interval Base44 bucketed by, in milliseconds.
86400000
Number of buckets returned.
30
The event name that was aggregated, or null when the request covered every event.
"checkout_completed"
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.
The buckets, oldest first. Buckets with no matching events are omitted rather than reported as zero.