API Reference
Log In
API Reference

Count the matching enforcement events per day or per week

Returns counts of the matching enforcement events per hour, day or week, for the same filters as the events list: one entry per bucket that has events, ascending, with the bucket start as local wall time in the zone named on the answer. zone is an IANA region id such as America/Denver and defaults to UTC; buckets follow that zone, so an evening block lands on the day it happened in that zone rather than on UTC's next day. Z is accepted as a spelling of UTC; any other offset, such as UTC+01:00, is refused with 422, because it is not a zone name. A bucket with no events is absent rather than returned as a zero, and the first and last bucket can be partial, because the window bounds are applied to the time Revenium recorded the event. level defaults to ALL here, so with no tier chosen you see every enforcement event in the window rather than only hard-cap breaches. The response is a single object, not a paged list: the counts are under buckets, beside the zone they were actually grouped in and the resolvedSince and resolvedUntil of the window actually searched.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Query Params
string
required

ID of the team that owns this data.

string

Optional ISO-8601 timestamp starting the date range, inclusive, resolved exactly as the list resolves it

string

Optional ISO-8601 timestamp ending the date range, inclusive, resolved exactly as the list resolves it

string

Optional Revenium-generated identifier of a cost control. When supplied, only events produced by that rule are counted.

string
enum

Which tier of events to count. ALL is the default and counts both; HARD counts cap breaches and would-be breaches, WARN counts warning-line crossings.

Allowed:
string
enum

Whether to count real enforcement actions, a shadow rule's would-have-done rows, or both

Allowed:
string

Optional free-text search, matched case-insensitively against the event text, exactly as on the list

string

Optional exact match on the affected person or object, so the counts cover only that one. Requires groupBy alongside it, or the request is rejected with 422.

string

Which dimension groupValue belongs to. Required whenever groupValue is sent, and groupValue is required whenever this is sent; either one alone is rejected with 422 naming the missing one. Matched case-insensitively against the known dimensions; a value that matches none of them is rejected with 422 naming the accepted values, rather than being answered as though nothing matched.

string

Optional exact match on the transaction ID of the request that tripped the rule

string
enum

How wide each bucket is. DAY is the default; HOUR buckets to the start of the hour, so a one-day window is not a single bucket; WEEK buckets to the Monday that starts the ISO week in the requested zone.

Allowed:
string

IANA region id the buckets are cut in, defaulting to UTC. Z is accepted as a spelling of UTC. Any other offset, such as UTC+01:00, is not a zone name and is rejected with 422. The zone actually used comes back on the answer, because a well-formed region id this service does not recognise falls back to UTC rather than being refused.

Headers
string
enum
Defaults to application/json

Generated from available response content types

Allowed:
Responses

Language
Credentials
Header
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json
application/hal+json
*/*