REST API

REST APIs are powerful features to enable flow of data between your servers and ours, this helps in better intregration of services and gives you more power over your PieSocket data.

We provide following API endpoints.

Name Endpoint Purpose
Account API https://www.piesocket.com/api To communicate with your PieSocket account
Cluster API https://CLUSTER_ID.piesocket.com/api To communicate with your WebSocket Cluster

Account API

You can use the Account API to fetch your API key domains, get total number of connections, etc.

Account API Authentication

You need to pass your API key as key and API secret as secret, in HTTP headers to be able to communicate with the Account API.

List API Key Domains

Use the following endpoint to list all allowed domains of an API key

GET https://www.piesocket.com/api/domains

This API endpoint accepts no parameters.

List Active Connections

Use the following endpoint to list all active channels and its connections for an API key.

GET https://www.piesocket.com/api/connections

This API endpoint accepts no parameters.

Cluseter API

Cluster APIs are a way to communicate with your WebSocket cluster. Currently, we provide following endpoints.

Cluseter API Authentication

Cluster APIs do not require Authorization headers, but api key and secret is required in the request body.

Publish messages

Use the following endpoint to publish a message on a WebSocket channel.

GET https://CLUSTER_ID.piesocket.com/api/publish

View publish examples to learn more about this API and its parameters.

Example

You can click the following button to run example requests for all our REST APIs in Postman, using the demo API key and secret.

Run in Postman