Ably Stats API

The Stats API from Ably — 2 operation(s) for stats.

Operations 2

GET /stats Retrieve usage statistics for an application #
GET /time Get the service time #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/ably-stats-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

ably-stats-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Platform Stats API
  description: The [REST API specification](https://www.ably.io/documentation/rest-api) for Ably.
  version: 1.1.1
  contact:
    name: Ably Support
    url: https://www.ably.io/contact
    email: support@ably.io
servers:
- url: https://rest.ably.io
security:
- basicAuth: []
- bearerAuth: []
tags:
- name: Stats
paths:
  /stats:
    parameters:
    - $ref: '#/components/parameters/versionHeader'
    - $ref: '#/components/parameters/responseFormat'
    get:
      summary: Retrieve usage statistics for an application
      operationId: getStats
      description: 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.
      tags:
      - Stats
      parameters:
      - $ref: '#/components/parameters/filterStart'
      - $ref: '#/components/parameters/filterLimit'
      - $ref: '#/components/parameters/filterEnd'
      - $ref: '#/components/parameters/filterDirection'
      - name: unit
        in: query
        description: Specifies the unit of aggregation in the returned results.
        schema:
          type: string
          default: minute
          enum:
          - minute
          - hour
          - day
          - month
      responses:
        2XX:
          description: OK
          content:
            application/json:
              schema:
                type: object
        default:
          $ref: '#/components/responses/Error'
  /time:
    parameters:
    - $ref: '#/components/parameters/versionHeader'
    - $ref: '#/components/parameters/responseFormat'
    get:
      security: []
      summary: Get the service time
      operationId: getTime
      description: This returns the service time in milliseconds since the epoch.
      tags:
      - Stats
      responses:
        2XX:
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  type: integer
            application/x-msgpack:
              schema:
                type: array
                items:
                  type: integer
            text/html:
              schema:
                type: string
        default:
          $ref: '#/components/responses/Error'
components:
  parameters:
    filterEnd:
      name: end
      in: query
      schema:
        type: string
        default: now
    responseFormat:
      in: query
      name: format
      schema:
        type: string
        enum:
        - json
        - jsonp
        - msgpack
        - html
      description: The response format you would like
    filterStart:
      name: start
      in: query
      schema:
        type: string
    filterDirection:
      name: direction
      in: query
      schema:
        type: string
        default: backwards
        enum:
        - forwards
        - backwards
    versionHeader:
      in: header
      name: X-Ably-Version
      schema:
        type: string
      description: The version of the API you wish to use.
    filterLimit:
      name: limit
      in: query
      schema:
        type: integer
        default: '100'
  schemas:
    Error:
      type: object
      description: Returned error from failed REST.
      properties:
        message:
          type: string
          description: Message explaining the error's cause.
        code:
          type: integer
          description: Error code.
        statusCode:
          type: integer
          description: Status error code.
        href:
          type: string
          description: Link to help with error.
        serverId:
          type: string
          description: Server ID with which error was encountered.
  headers:
    ServerId:
      description: The ID for the server communicated with.
      schema:
        type: string
      required: true
    ErrorCode:
      description: The error code.
      schema:
        type: integer
    ErrorMessage:
      description: The error message.
      schema:
        type: string
  responses:
    Error:
      description: Error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
        application/x-msgpack:
          schema:
            $ref: '#/components/schemas/Error'
        text/html:
          schema:
            $ref: '#/components/schemas/Error'
      headers:
        x-ably-errorcode:
          $ref: '#/components/headers/ErrorCode'
        x-ably-errormessage:
          $ref: '#/components/headers/ErrorMessage'
        x-ably-serverid:
          $ref: '#/components/headers/ServerId'
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic
      description: Basic Authentication using an [API key](https://www.ably.io/documentation/core-features/authentication#basic-authentication).
    bearerAuth:
      type: http
      scheme: bearer
      description: Token Authentication using an [Ably Token](https://www.ably.io/documentation/core-features/authentication#basic-authentication), or optionally an [Ably JWT](https://www.ably.io/documentation/core-features/authentication#ably-jwt-process).