Event Data
Operations around Event data statistics.
Endpoints
GET /api/event-data/events
GET /api/event-data/fields
GET /api/event-data/stats
GET /api/event-data/events
Gets website event and field key record counts within a given time range.
Parameters
website_id
: (uuid) Website key identifier.startAt
: Timestamp (in ms) of starting date.endAt
: Timestamp (in ms) of end date.event
: (optional) Event Name filter.
Sample response
URL: https://umami.mydomain.com/api/event-data/events?websiteId=d0059975-b79a-4f83-8926-ed731475fded&startAt=1692115200000&endAt=169220159999
[
{ "eventName": "button-click", "fieldName": "id", "dataType": 1, "total": 4 },
{ "eventName": "button-click", "fieldName": "name", "dataType": 1, "total": 4 },
{ "eventName": "track-product-with-data", "fieldName": "productId", "dataType": 1, "total": 2 },
{ "eventName": "track-product-with-data", "fieldName": "price", "dataType": 2, "total": 2 }
]
GET /api/event-data/fields
Gets website field key and value record counts within a given time range.
Parameters
website_id
: (uuid) Website key identifier.startAt
: Timestamp (in ms) of starting date.endAt
: Timestamp (in ms) of end date.
Sample response
URL: https://umami.mydomain.com/api/event-data/fields?websiteId=d0059975-b79a-4f83-8926-ed731475fded&startAt=1692115200000&endAt=1692201599999
[
{ "fieldName": "id", "dataType": 1, "fieldValue": "001A", "total": 3 },
{ "fieldName": "id", "dataType": 1, "fieldValue": "002A", "total": 1 },
{ "fieldName": "name", "dataType": 1, "fieldValue": "John", "total": 3 },
{ "fieldName": "name", "dataType": 1, "fieldValue": "Mary", "total": 1 }
]
GET /api/event-data/stats
Gets summarized website events, fields, and records within a given time range.
Parameters
website_id
: (uuid) Website key identifier.startAt
: Timestamp (in ms) of starting date.endAt
: Timestamp (in ms) of end date.
Sample response
URL: https://umami.mydomain.com/api/event-data/stats?websiteId=d0059975-b79a-4f83-8926-ed731475fded&startAt=1692115200000&endAt=1692201599999
[{ "events": 16, "fields": 13, "records": 26 }]