The REST API specification for Ably.
Bring your own key. This API needs your own Platform API key - get one from the provider, add it once below, and the proxy injects it on every call. Your OmniStream plan covers the unified SDK, key storage, and proxy - the provider's own rate limits still apply to your key.
This is a community listing. If you own this API, you can request ownership.
npm install omnistream-sdkimport { OmniClient } from "omnistream-sdk";
const omni = new OmniClient({ token: process.env.OMNI_KEY! });
// One key reaches every API on the marketplace.
const data = await omni.call("ably/getMetadataOfAllChannels");One install, one key - the same client calls every API on the marketplace.
The version of the API you wish to use.
The response format you would like
Optionally limits the query to only those channels whose name starts with the given prefix
optionally specifies whether to return just channel names (by=id) or ChannelDetails (by=value)
Enumerate all active channels of the application
Get metadata of a channel
Get message history for a channel
Publish a message to a channel
Get presence of a channel
/**
* PlatformAPI - generated by OmniStream from Platform API's OpenAPI spec.
* One typed method per endpoint. A single Omni key reaches the API.
*/
const DEFAULT_BASE = "https://grid.skinvaults.online/v1/proxy/ably";
export class PlatformAPIError extends Error {
status: number;
code?: string;
constructor(status: number, code: string | undefined, message?: string) {
super(message || `PlatformAPI error ${status}`);
this.name = "PlatformAPIError";
this.status = status;
this.code = code;
}
}
export interface PlatformAPIOptions {
baseUrl?: string;
fetch?: typeof fetch;
timeoutMs?: number;
}
export class PlatformAPI {
/** @param token Your OmniStream key (one key for every API). */
constructor(private token: string, private opts: PlatformAPIOptions = {}) {
if (!token) throw new Error("PlatformAPI: token is required");
}
rateLimit: { remainingMinute?: number; remainingDay?: number } | null = null;
private async _request(method: string, path: string, { params, body }: { params?: Record<string, unknown>; body?: unknown } = {}): Promise<any> {
const f = this.opts.fetch ?? globalThis.fetch;
const url = new URL((this.opts.baseUrl ?? DEFAULT_BASE).replace(/\/+$/, "") + path);
if (params) for (const [k, v] of Object.entries(params)) if (v != null) url.searchParams.set(k, String(v));
const headers: Record<string, string> = { "x-omni-key": this.token };
if (body !== undefined) headers["content-type"] = "application/json";
const res = await f(url, { method, headers, body: body !== undefined ? JSON.stringify(body) : undefined });
this.rateLimit = {
remainingMinute: Number(res.headers.get("x-ratelimit-remaining-minute")) || undefined,
remainingDay: Number(res.headers.get("x-ratelimit-remaining-day")) || undefined,
};
const data = await res.json().catch(() => ({}));
if (!res.ok) throw new PlatformAPIError(res.status, data?.error?.code, data?.error?.message);
return data.data ?? data;
}
/** Enumerate all active channels of the application */
getMetadataOfAllChannels(params: { "X-Ably-Version"?: string; "format"?: string; "limit"?: number; "prefix"?: string; "by"?: string }): Promise<any> {
return this._request("GET", "/channels", { params });
}
/** Get metadata of a channel */
getMetadataOfChannel(params: { "channel_id": string; "X-Ably-Version"?: string; "format"?: string }): Promise<any> {
return this._request("GET", "/channels/{channel_id}", { params });
}
/** Get message history for a channel */
getMessagesByChannel(params: { "channel_id": string; "X-Ably-Version"?: string; "format"?: string; "start"?: string; "limit"?: number; "end"?: string; "direction"?: string }): Promise<any> {
return this._request("GET", "/channels/{channel_id}/messages", { params });
}
/** Publish a message to a channel */
publishMessagesToChannel(body: unknown, params: { "channel_id": string; "X-Ably-Version"?: string; "format"?: string }): Promise<any> {
return this._request("POST", "/channels/{channel_id}/messages", { body, params });
}
/** Get presence of a channel */
getPresenceOfChannel(params: { "channel_id": string; "X-Ably-Version"?: string; "format"?: string; "clientId"?: string; "connectionId"?: string; "limit"?: number }): Promise<any> {
return this._request("GET", "/channels/{channel_id}/presence", { params });
}
/** Get presence history of a channel */
getPresenceHistoryOfChannel(params: { "channel_id": string; "X-Ably-Version"?: string; "format"?: string; "start"?: string; "limit"?: number; "end"?: string; "direction"?: string }): Promise<any> {
return this._request("GET", "/channels/{channel_id}/presence/history", { params });
}
/** Request an access token */
requestAccessToken(body: unknown, params: { "keyName": string; "X-Ably-Version"?: string; "format"?: string }): Promise<any> {
return this._request("POST", "/keys/{keyName}/requestToken", { body, params });
}
/** List channel subscriptions */
getPushSubscriptionsOnChannels(params: { "X-Ably-Version"?: string; "format"?: string; "channel"?: string; "deviceId"?: string; "clientId"?: string; "limit"?: number }): Promise<any> {
return this._request("GET", "/push/channelSubscriptions", { params });
}
/** Subscribe a device to a channel */
subscribePushDeviceToChannel(body: unknown, params: { "X-Ably-Version"?: string; "format"?: string }): Promise<any> {
return this._request("POST", "/push/channelSubscriptions", { body, params });
}
/** Delete a registered device's update token */
deletePushDeviceDetails(params: { "X-Ably-Version"?: string; "format"?: string; "channel"?: string; "deviceId"?: string; "clientId"?: string }): Promise<any> {
return this._request("DELETE", "/push/channelSubscriptions", { params });
}
/** List all channels with at least one subscribed device */
getChannelsWithPushSubscribers(params: { "X-Ably-Version"?: string; "format"?: string }): Promise<any> {
return this._request("GET", "/push/channels", { params });
}
/** List devices registered for receiving push notifications */
getRegisteredPushDevices(params: { "X-Ably-Version"?: string; "format"?: string; "deviceId"?: string; "clientId"?: string; "limit"?: number }): Promise<any> {
return this._request("GET", "/push/deviceRegistrations", { params });
}
/** Register a device for receiving push notifications */
registerPushDevice(body: unknown, params: { "X-Ably-Version"?: string; "format"?: string }): Promise<any> {
return this._request("POST", "/push/deviceRegistrations", { body, params });
}
/** Unregister matching devices for push notifications */
unregisterAllPushDevices(params: { "X-Ably-Version"?: string; "format"?: string; "deviceId"?: string; "clientId"?: string }): Promise<any> {
return this._request("DELETE", "/push/deviceRegistrations", { params });
}
/** Get a device registration */
getPushDeviceDetails(params: { "device_id": string; "X-Ably-Version"?: string; "format"?: string }): Promise<any> {
return this._request("GET", "/push/deviceRegistrations/{device_id}", { params });
}
/** Update a device registration */
putPushDeviceDetails(body: unknown, params: { "device_id": string; "X-Ably-Version"?: string; "format"?: string }): Promise<any> {
return this._request("PUT", "/push/deviceRegistrations/{device_id}", { body, params });
}
/** Update a device registration */
patchPushDeviceDetails(body: unknown, params: { "device_id": string; "X-Ably-Version"?: string; "format"?: string }): Promise<any> {
return this._request("PATCH", "/push/deviceRegistrations/{device_id}", { body, params });
}
/** Unregister a single device for push notifications */
unregisterPushDevice(params: { "device_id": string; "X-Ably-Version"?: string; "format"?: string }): Promise<any> {
return this._request("DELETE", "/push/deviceRegistrations/{device_id}", { params });
}
/** Reset a registered device's update token */
updatePushDeviceDetails(params: { "device_id": string; "X-Ably-Version"?: string; "format"?: string }): Promise<any> {
return this._request("GET", "/push/deviceRegistrations/{device_id}/resetUpdateToken", { params });
}
/** Publish a push notification to device(s) */
publishPushNotificationToDevices(body: unknown, params: { "X-Ably-Version"?: string; "format"?: string }): Promise<any> {
return this._request("POST", "/push/publish", { body, params });
}
/** Retrieve usage statistics for an application */
getStats(params: { "X-Ably-Version"?: string; "format"?: string; "start"?: string; "limit"?: number; "end"?: string; "direction"?: string; "unit"?: string }): Promise<any> {
return this._request("GET", "/stats", { params });
}
/** Get the service time */
getTime(params: { "X-Ably-Version"?: string; "format"?: string }): Promise<any> {
return this._request("GET", "/time", { params });
}
}
export default PlatformAPI;
No reviews yet. Be the first to rate this API.
Yes. Platform API uses basic authentication, so you bring your own key from the provider. You store it once on OmniStream and the proxy injects it into every call, so your code only ever sends your Omni key.
The REST API specification for Ably. It exposes 22 endpoints over GET, POST, DELETE, PUT, PATCH, including GET /channels, GET /channels/{channel_id}, GET /channels/{channel_id}/messages.
Install the OmniStream SDK for your language and call Platform API through it. The client is generated from this API's OpenAPI spec, so parameters and responses are fully typed, and the same client also calls every other API in the marketplace.
You can start on the free plan. OmniStream charges for the unified SDK, key storage and proxy rather than for Platform API itself, and Platform API's own rate limits still apply to your provider key.
QuickChart: An API to generate charts and QR codes using QuickChart services.
Get presence history of a channel
Request an access token
List channel subscriptions
Subscribe a device to a channel
Delete a registered device's update token
List all channels with at least one subscribed device
List devices registered for receiving push notifications
Register a device for receiving push notifications
Unregister matching devices for push notifications
Get a device registration
Update a device registration
Update a device registration
Unregister a single device for push notifications
Reset a registered device's update token
Publish a push notification to device(s)
Retrieve usage statistics for an application
Get the service time