Action statistics

How many actions have been run — the headline number behind an activity dashboard. Ask for `include=breakdown` to split it by one dimension, and `include=series` to get it over time; both are extra work, so the plain total is what you get by default. These figures cover the whole network and take no sign-in. For your own organization's numbers, use the matching endpoint under `/organizations/{organizationId}/stats/`.

GET
/public/stats/actions

Query Parameters

from?string

Start of the window, inclusive. Omit for "since the beginning". Replaces the when_created[$gt] and when_created[$gte] pair: an aggregate has no use for both an open and a closed lower bound.

Formatdate-time
to?string

End of the window, exclusive. Omit for "up to now". Half-open with from, so adjacent windows tile without double-counting the boundary record.

Formatdate-time
include?array<>

Which optional parts of the aggregate to compute. The total is always returned; a breakdown and a series each cost a grouping pass, so a caller that only needs the headline number does not pay for them.

interval?string

Bucket size for a time series. It fixes how many points the series has over the requested window, so a long window with a small interval is an expensive request.

Default"week"
Value in"hour" | "day" | "week" | "month" | "year"
top?integer

How many groups to keep in a breakdown, largest first. Bounds the response for a high-cardinality dimension such as template, where an organization may have thousands.

It does not bound a series. The number of buckets in a series is already fixed by from, to and interval; capping it separately would silently truncate the window a caller explicitly asked for.

Default10
Formatint64
group_by?string

Dimension used for optional breakdowns and split series. Use action for the action name, such as mint or transfer; use status for pending, completed or failed. With include=series, each point's key identifies its action or status group. Values outside this list are rejected.

Value in"action" | "status"

Response Body

application/json

application/json

application/json

curl -X GET "https://api.dual.network/public/stats/actions"

{
  "total": 128401
}

{
  "code": 3,
  "message": "Key: 'limit' Error:Field validation for 'limit' failed on the 'lte' tag"
}
{
  "code": 13,
  "message": "internal error"
}