Platform API
The [REST API specification](https://www.ably.io/documentation/rest-api) for Ably.
Fork copies the collection into your workspace, without the publisher's secrets, so you can add your own key and send requests. Star saves it to your starred APIs (Account › Marketplace) and helps others find it.
Overview
The REST API specification for Ably.
Endpoints 22
Status
- GETEnumerate all active channels of the application
/channels?format=json&limit=100&prefix=string&by=valueEnumerate all active channels of the application - GETGet metadata of a channel
/channels/:channel_id?format=jsonGet metadata of a channel - GETGet presence of a channel
/channels/:channel_id/presence?format=json&clientId=string&connectionId=string&limit=100Get presence on a channel
History
- GETGet message history for a channel
/channels/:channel_id/messages?format=json&start=string&limit=100&end=now&direction=backwardsGet message history for a channel - GETGet presence history of a channel
/channels/:channel_id/presence/history?format=json&start=string&limit=100&end=now&direction=backwardsGet presence on a channel
Publishing
- POSTPublish a message to a channel
/channels/:channel_id/messages?format=jsonPublish a message to the specified channel
Authentication
- POSTRequest an access token
/keys/:keyName/requestToken?format=jsonThis is the means by which clients obtain access tokens to use the service. You can see how to construct an Ably TokenRequest in the Ably TokenRequest spec…
Push
- GETList channel subscriptions
/push/channelSubscriptions?format=json&channel=string&deviceId=string&clientId=string&limit=100Get a list of push notification subscriptions to channels. - POSTSubscribe a device to a channel
/push/channelSubscriptions?format=jsonSubscribe either a single device or all devices associated with a client ID to receive push notifications from messages sent to a channel. - DELETEDelete a registered device's update token
/push/channelSubscriptions?format=json&channel=string&deviceId=string&clientId=stringDelete a device details object. - GETList all channels with at least one subscribed device
/push/channels?format=jsonReturns a paginated response of channel names. - GETList devices registered for receiving push notifications
/push/deviceRegistrations?format=json&deviceId=string&clientId=string&limit=100List of device details of devices registed for push notifications. - POSTRegister a device for receiving push notifications
/push/deviceRegistrations?format=jsonRegister a device’s details, including the information necessary to deliver push notifications to it. Requires "push-admin" capability. - DELETEUnregister matching devices for push notifications
/push/deviceRegistrations?format=json&deviceId=string&clientId=stringUnregisters devices. All their subscriptions for receiving push notifications through channels will also be deleted. - GETGet a device registration
/push/deviceRegistrations/:device_id?format=jsonGet the full details of a device. - PUTUpdate a device registration
/push/deviceRegistrations/:device_id?format=jsonDevice registrations can be upserted (the existing registration is replaced entirely) with a PUT operation. Only clientId, metadata and push.recipient are… - DELETEUnregister a single device for push notifications
/push/deviceRegistrations/:device_id?format=jsonUnregisters a single device by its device ID. All its subscriptions for receiving push notifications through channels will also be deleted. - PATCHUpdate a device registration
/push/deviceRegistrations/:device_id?format=jsonSpecific attributes of an existing registration can be updated. Only clientId, metadata and push.recipient are mutable. - GETReset a registered device's update token
/push/deviceRegistrations/:device_id/resetUpdateToken?format=jsonGets an updated device details object. - POSTPublish a push notification to device(s)
/push/publish?format=jsonA convenience endpoint to deliver a push notification payload to a single device or set of devices identified by their client identifier.
Stats
- GETRetrieve usage statistics for an application
/stats?format=json&start=string&limit=100&end=now&direction=backwards&unit=minuteThe 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… - GETGet the service time
/time?format=jsonThis returns the service time in milliseconds since the epoch.
API details
- Base URL
https://rest.ably.io- Authentication
- HTTP Basic authentication (username and password)
A bearer token in the Authorization header - Operations
- 22 operations on 14 pathsGET 12POST 5DELETE 3PUT 1PATCH 1
- Main resources
- Push 13Status 3History 2Stats 2Authentication 1Publishing 1
- Response formats
application/jsonapplication/x-msgpacktext/html- Description format
- OpenAPI 3.0.1, API version
1.1.0 - Links
- OpenAPI document · Support
- Listed from
- APIs.guru OpenAPI Directory (CC0-1.0)
Source updated
How to test the Platform API in Swastik Codes
- Open the APISelect “Fork & run in Swastik Codes” on this page. Sign in or create a free account if asked.
- Fork it into your workspaceChoose a workspace. You get your own copy of the Platform API collection, without the publisher's secrets.
- Add your credentialsThis API uses HTTP Basic authentication (username and password). Add yours in the collection's variables or an environment; the requests already reference it.
- Send a requestPick an endpoint, for example “Enumerate all active channels of the application” (GET /channels?format=json&limit=100&prefix=string&by=value), and press Send. Check the response, add tests and run the whole collection with the runner.
Frequently asked questions
What is the Platform API?
The [REST API specification](https://www.ably.io/documentation/rest-api) for Ably. It is listed under Developer tools and has 22 endpoints.
Who publishes the Platform API?
It is listed from Ably's public API description (an OpenAPI document), not published by Ably on Swastik Codes. Anyone who controls ably.io can claim the profile by adding a DNS TXT record.
What is the base URL of the Platform API?
Requests go to https://rest.ably.io. Endpoint paths are added to this base URL.
How do I authenticate with the Platform API?
It accepts 2 methods: HTTP Basic authentication (username and password); A bearer token in the Authorization header.
How many endpoints does the Platform API have?
22 operations on 14 paths (12 GET, 5 POST, 3 DELETE, 1 PUT, 1 PATCH). The largest groups are Push, Status, History, Stats.
Is forking the Platform API free?
Yes. Forking copies the collection into your workspace for free. It has been starred 0 times and forked 0 times.