Retrieve usage statistics for an application

GET /stats

The Ably system can be queried to obtain usage statistics for a given application, and results are provided aggregated across all channels in use in the application in the specified period. Stats may be used to track usage against account quotas.

Query parameters

  • start string
  • limit integer

    Default value is 100.

  • end string

    Default value is now.

  • direction string

    Values are forwards or backwards. Default value is backwards.

  • unit string

    Specifies the unit of aggregation in the returned results.

    Values are minute, hour, day, or month. Default value is minute.

Responses

  • default

    Error

    Hide headers attributes Show headers attributes
    • x-ably-errorcode integer

      The error code.

    • x-ably-errormessage string

      The error message.

    • x-ably-serverid string Required

      The ID for the server communicated with.

    Hide response attributes Show response attributes object
    • message string

      Message explaining the error's cause.

    • code integer

      Error code.

    • statusCode integer

      Status error code.

    • href string

      Link to help with error.

    • serverId string

      Server ID with which error was encountered.

  • 2XX

    OK

GET /stats
curl \
 -X GET https://rest.ably.io/stats
Response examples (default)
# Headers
x-ably-errorcode: 42
x-ably-errormessage: string
x-ably-serverid: string

# Payload
{
  "message": "string",
  "code": 42,
  "statusCode": 42,
  "href": "string",
  "serverId": "string"
}
Response examples (default)
# Headers
x-ably-errorcode: 42
x-ably-errormessage: string
x-ably-serverid: string

# Payload
{
  "message": "string",
  "code": 42,
  "statusCode": 42,
  "href": "string",
  "serverId": "string"
}
Response examples (2XX)
{}
Response examples (2XX)
{}