Ably Stats API

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

GitHub OpenAPI

Operations 2

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

0 of 2 operations are conformant: apis.io called them with no credentials and the responses matched this contract; 1 more answered but could not be checked against a schema. Checked 2026-11-12. how this works · status file

GET /stats Get application usage statistics · Retrieve usage statistics for an application #
Ask an LLM
“How much has my application used in messages and bandwidth this month?”
“Can I get usage stats for a specific time range?”
Tell an agent
Get usage stats for my app from {start} to {end}.
Show my application's usage in {unit} units.
GET /time Get the service time · Get the service time observed #
Ask an LLM
“What time is the Ably service currently on?”
“Can I get the server time for timestamping my messages?”
Tell an agent
Get the service time.
Tell me the current server 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:ably-stats-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

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. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. 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 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:
  headers:
    ErrorCode:
      description: The error code.
      schema:
        type: integer
    ServerId:
      description: The ID for the server communicated with.
      schema:
        type: string
      required: true
    ErrorMessage:
      description: The error message.
      schema:
        type: string
  parameters:
    filterDirection:
      name: direction
      in: query
      schema:
        type: string
        default: backwards
        enum:
        - forwards
        - backwards
    filterStart:
      name: start
      in: query
      schema:
        type: string
    responseFormat:
      in: query
      name: format
      schema:
        type: string
        enum:
        - json
        - jsonp
        - msgpack
        - html
      description: The response format you would like
    filterLimit:
      name: limit
      in: query
      schema:
        type: integer
        default: '100'
    filterEnd:
      name: end
      in: query
      schema:
        type: string
        default: now
    versionHeader:
      in: header
      name: X-Ably-Version
      schema:
        type: string
      description: The version of the API you wish to use.
  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.
  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).
x-provenance:
  method: harvested
  publisher: Ably
  source: https://raw.githubusercontent.com/ably/open-specs/main/definitions/platform-v1.yaml
  note: split by refine-openapis from the provider's own published document, verified by fetch (openapi/_original/*.fetch.json);
    stamped by stamp-openapi-provenance.py (roadmap#793)