HTTP API Reference - deprecated methods

The following methods are considered deprecated and have been replaced by new methods documented in the API reference. If you maintain a library please transition to the new methods.


Channels

GET channel stats

GET /apps/[app_id]/channels/[channel_name]/stats

Returns statistics for the given channel.

Deprecated 2012-09: use GET channel instead.

Request

No parameters are currently accepted.

Successful response (200)

The following attributes will be returned in the JSON response

AttributeTypeApplicable channelsDescription
occupiedBooleanAllWhether or not there are currently any subscribers to this channel
user_countIntegerPresenceNumber of distinct users currently subscribed to this channel (a single user may be subscribed many times, but will only count as one)
connection_countIntegerAllNumber of connections currently subscribed to this channel. This is a beta feature - please contact support if you would like to try this.

Events

POST event to channel

POST /apps/[app_id]/channels/[channel_name]/events

Triggers an event on a channel. The event will be triggered on all clients which have subscribed to that channel.

Deprecated 2012-09: use the more flexible POST events instead.

Request

Headers

A Content-Type header should be sent identifying the body of the request as application/json.

Parameters (in query string)

This API is an exception to the general rule: parameters must be submitted in the query string.

ParameterDescription
nameEvent name (required)
socket_idExcludes the event from being sent to a specific connection (see excluding recipients)
Request body

This API is an exception to the general rule: parameters must not be submitted in the body.

Request body MUST contain event data as a UTF-8 JSON encoded string. Upon receipt of data which is not valid UTF-8, the API will return a 400 response code. The API does not check that the received data is valid JSON.

Successful response (202)

The event has been received and will be send asynchronously to all sockets. No information is available in the response.

Have you tried using the search to find what you’re after? If you still have a question then get in touch with us and let us help you out.