try out ↗

← API Index


/api/stats/events1

Per-day (or per-hour) counts of a statistics event. Admin access only. Use stats/eventtypes1 to discover the available event codes.

Change Note: typed EventStat objects instead of the hand-rolled 'Stats' JSON; timestamps stay unix ms

Parameters

Name Description Type
eventid the event code to query (see stats/eventtypes1) int
hourly if true, return per-hour buckets instead of per-day (default false) bool
limit maximum number of data points (default 31 daily / 168 hourly) int
agid optional action group id (see system/actiongroups): count only the events of customers who were in that group when the event happened. Counted per group since the shop got its stats_ag table, no data before that; only the events marked perGroup in stats/eventtypes1 are counted per group int
oo-rf optionally define the response-format for this call. One of: compact (default) | compacts | full | fulls | json | md | html | js | openapi | yaml String
oo-auth optionally force the API to check against the role (instead of silently not returning data). For guests or public access, the default is -1. 0 (regular customer) and above define the role for which the current session is expected to be authorized. int

Error Responses

HTTP Status Error Code Description
403 not_auth Not authenticated or no admin access

Response Types

Type Version Description
EventStat 1 One data point (day or hour bucket) of an event statistic

OpenAPI

See events1.yaml

Referenced in skills