Ably Status API

The Status API from Ably — 3 operation(s) for status.

OpenAPI Specification

ably-status-api-openapi.yml Raw ↑
openapi: 3.0.1
info:
  title: Control API v1 apps Status API
  version: 1.0.32
  description: 'Use the Control API to manage your applications, namespaces, keys, queues, rules, and more.


    Detailed information on using this API can be found in the Ably <a href="https://ably.com/docs/account/control-api">Control API docs</a>.


    Control API is currently in Preview.

    '
servers:
- url: https://control.ably.net/v1
tags:
- name: Status
paths:
  /channels/{channel_id}/presence:
    parameters:
    - $ref: '#/components/parameters/versionHeader'
    - $ref: '#/components/parameters/responseFormat'
    get:
      summary: Get presence of a channel
      operationId: getPresenceOfChannel
      description: Get presence on a channel
      tags:
      - Status
      parameters:
      - $ref: '#/components/parameters/channelId'
      - name: clientId
        in: query
        schema:
          type: string
      - name: connectionId
        in: query
        schema:
          type: string
      - name: limit
        in: query
        schema:
          type: integer
          default: 100
      responses:
        '200':
          description: OK
          headers:
            link:
              $ref: '#/components/headers/Link'
            x-ably-serverid:
              $ref: '#/components/headers/ServerId'
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/PresenceMessage'
            application/x-msgpack:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/PresenceMessage'
            text/html:
              schema:
                type: string
        default:
          $ref: '#/components/responses/Error'
  /channels/{channel_id}:
    parameters:
    - $ref: '#/components/parameters/versionHeader'
    - $ref: '#/components/parameters/responseFormat'
    get:
      summary: Get metadata of a channel
      operationId: getMetadataOfChannel
      description: Get metadata of a channel
      tags:
      - Status
      parameters:
      - $ref: '#/components/parameters/channelId'
      responses:
        '200':
          description: OK
          headers:
            x-ably-serverid:
              $ref: '#/components/headers/ServerId'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ChannelDetails'
        default:
          $ref: '#/components/responses/Error'
  /channels:
    parameters:
    - $ref: '#/components/parameters/versionHeader'
    - $ref: '#/components/parameters/responseFormat'
    get:
      summary: Enumerate all active channels of the application
      operationId: getMetadataOfAllChannels
      description: Enumerate all active channels of the application
      tags:
      - Status
      parameters:
      - in: query
        name: limit
        schema:
          type: integer
          default: 100
      - in: query
        name: prefix
        schema:
          type: string
        description: Optionally limits the query to only those channels whose name starts with the given prefix
      - in: query
        name: by
        schema:
          type: string
          enum:
          - value
          - id
        description: optionally specifies whether to return just channel names (by=id) or ChannelDetails (by=value)
      responses:
        2XX:
          description: OK
          headers:
            link:
              $ref: '#/components/headers/Link'
          content:
            application/json:
              schema:
                oneOf:
                - type: array
                  items:
                    $ref: '#/components/schemas/ChannelDetails'
                - type: array
                  items:
                    type: string
            application/x-msgpack:
              schema:
                oneOf:
                - type: array
                  items:
                    $ref: '#/components/schemas/ChannelDetails'
                - type: array
                  items:
                    type: string
            text/html:
              schema:
                type: string
        default:
          $ref: '#/components/responses/Error'
components:
  schemas:
    ChannelDetails:
      type: object
      properties:
        channelId:
          type: string
          description: The required name of the channel including any qualifier, if any.
        region:
          type: string
          description: In events relating to the activity of a channel in a specific region, this optionally identifies the region.
        isGlobalMaster:
          type: boolean
          description: In events relating to the activity of a channel in a specific region, this optionally identifies whether or not that region is responsible for global coordination of the channel.
        status:
          $ref: '#/components/schemas/ChannelStatus'
      required:
      - channelId
    PresenceMessage:
      type: object
      properties:
        id:
          description: Unique ID assigned by Ably to this presence update.
          type: string
          readOnly: true
        action:
          description: The event signified by a PresenceMessage.
          type: string
          enum:
          - ABSENT
          - PRESENT
          - ENTER
          - LEAVE
          - UPDATE
          readOnly: true
        data:
          description: The presence update payload, if provided.
          type: string
        clientId:
          description: The client ID of the publisher of this presence update.
          type: string
        connectionId:
          description: The connection ID of the publisher of this presence update.
          type: string
        timestamp:
          description: Timestamp when the presence update was received by Ably, as milliseconds since the epoch.
          type: integer
          format: int64
          readOnly: true
        encoding:
          description: This will typically be empty as all presence updates received from Ably are automatically decoded client-side using this value. However, if the message encoding cannot be processed, this attribute will contain the remaining transformations not applied to the data payload.
          type: string
        extras:
          $ref: '#/components/schemas/Extras'
    Occupancy:
      type: object
      description: An Occupancy instance indicating the occupancy of a channel. For events indicating regional activity of a channel this indicates activity in that region, not global activity.
      properties:
        publishers:
          type: integer
          description: The number of connections attached to the channel that are authorised to publish.
        subscribers:
          type: integer
          description: The number of connections attached that are authorised to subscribe to messages.
        presenceSubscribers:
          type: integer
          description: The number of connections that are authorised to subscribe to presence messages.
        presenceConnections:
          type: integer
          description: The number of connections that are authorised to enter members into the presence channel.
        presenceMembers:
          type: integer
          description: The number of members currently entered into the presence channel.
    Extras:
      type: object
      description: Extras object. Currently only allows for [push](https://www.ably.io/documentation/general/push/publish#channel-broadcast-example) extra.
      properties:
        push:
          $ref: '#/components/schemas/Push'
    Push:
      type: object
      properties:
        data:
          description: Arbitrary [key-value string-to-string payload](https://www.ably.io/documentation/general/push/publish#channel-broadcast-example).
          type: string
        notification:
          $ref: '#/components/schemas/Notification'
        apns:
          description: Extends and overrides generic values when delivering via APNs. [See examples](https://www.ably.io/documentation/general/push/publish#payload-structure)
          type: object
          properties:
            notification:
              $ref: '#/components/schemas/Notification'
        fcm:
          description: Extends and overrides generic values when delivering via GCM/FCM. [See examples](https://www.ably.io/documentation/general/push/publish#payload-structure)
          type: object
          properties:
            notification:
              $ref: '#/components/schemas/Notification'
        web:
          description: Extends and overrides generic values when delivering via web. [See examples](https://www.ably.io/documentation/general/push/publish#payload-structure)
          type: object
          properties:
            notification:
              $ref: '#/components/schemas/Notification'
    ChannelStatus:
      type: object
      description: A ChannelStatus instance.
      properties:
        isActive:
          type: boolean
          description: A required boolean value indicating whether the channel that is the subject of the event is active. For events indicating regional activity of a channel this indicates activity in that region, not global activity.
        occupancy:
          $ref: '#/components/schemas/Occupancy'
      required:
      - isActive
    Notification:
      type: object
      properties:
        title:
          description: Title to display at the notification.
          type: string
        body:
          description: Text below title on the expanded notification.
          type: string
        icon:
          description: Platform-specific icon for the notification.
          type: string
        sound:
          description: Platform-specific sound for the notification.
          type: string
        collapseKey:
          description: Platform-specific, used to group notifications together.
          type: string
    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:
    ErrorCode:
      description: The error code.
      schema:
        type: integer
    Link:
      description: Links to related resources, in the format defined by [RFC 5988](https://tools.ietf.org/html/rfc5988#section-5). This will potentially include a link with relation type `next`, `first`, and `current`, where appropiate.
      schema:
        type: string
        pattern: (<(.*)?>; rel=\"(first|current|last)?\",)*(<(.*)?>; rel=\"(first|current|last)?\")+
      required: true
    ServerId:
      description: The ID for the server communicated with.
      schema:
        type: string
      required: true
    ErrorMessage:
      description: The error message.
      schema:
        type: string
  parameters:
    responseFormat:
      in: query
      name: format
      schema:
        type: string
        enum:
        - json
        - jsonp
        - msgpack
        - html
      description: The response format you would like
    versionHeader:
      in: header
      name: X-Ably-Version
      schema:
        type: string
      description: The version of the API you wish to use.
    channelId:
      name: channel_id
      in: path
      schema:
        type: string
      required: true
      description: The [Channel's ID](https://www.ably.io/documentation/rest/channels).
  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:
    bearer_auth:
      type: http
      scheme: bearer
      description: Control API uses bearer authentication. You need to generate an access token for use with this API. More details can be found in the <a href="https://ably.com/docs/account/control-api/#authentication">Ably docs</a>.