latestOpenAPI 3.0.12026-08-212698149.9 KB

2b049ae2733f

accounts

Retrieves account stats

get/accounts/{id}/stats

Path parameters

idstring required

Query parameters

startinteger
endinteger
unitstring
directionstring
limitinteger

Response

Returns account stats

intervalIdstring required

The identifier for the stats interval.

unitstring required

The time unit for the stats. Can be minute, hour, day, or month.

schemastring required

The schema URL defining the structure of the stats.

entriesobject required

Contains the actual statistics entries for this interval.

inProgressstring

The last sub-interval included in this entry in the format yyyy-mm-dd:hh:mm:ss, else undefined. For entries that are still in progress, such as the current month.

accountIdstring required

The ID of the account the stats are associated with.

Example response

[
  {
    "intervalId": "2024-08-04:20",
    "unit": "hour",
    "schema": "https://schemas.ably.com/json/account-stats-0.0.4.json",
    "entries": {},
    "inProgress": "2024-08-04:20:04:52",
    "accountId": "DhSspB"
  }
]