REST APIs are powerful features to enable data-sharing 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 |
You can use the Account API to fetch your API key domains, get total number of connections, etc.
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.
Returns a list of all allowed domains for an API key
GET https://www.piesocket.com/api/domains
This API endpoint accepts no parameters.
Returns a list of all active channels and their connection count for the authenticated API key.
GET https://www.piesocket.com/api/connections
Returns a count of total active connections for the authenticated API key.
GET https://www.piesocket.com/api/connections/sum
Returns a list of all Blockchain contracts for authenticated API key.
GET https://www.piesocket.com/api/contracts
Parameters:
Cluster APIs are a way to communicate with your WebSocket cluster. Currently, we provide following endpoints.
Cluster APIs do not require Authorization headers, but api key and secret is required in the request body.
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.
You can click the following button to run example requests for all our REST APIs in Postman, using the demo API key and secret.