PubSub
GET/api/v1/pubsub/channels
curl -X GET "https://example.com/api/v1/pubsub/channels"[ "string"]GET/api/v1/pubsub/channels/{channel}/info
Authorization
bearer_token In: header
Path Parameters
Channel name to get information for
Response Body
application/json
curl -X GET "https://example.com/api/v1/pubsub/channels/string/info"{ "created_at": 0, "name": "string", "subscriber_count": 0}GET/api/v1/pubsub/channels/{channel}/stats
Authorization
bearer_token In: header
Path Parameters
Channel name to get statistics for
Response Body
application/json
curl -X GET "https://example.com/api/v1/pubsub/channels/string/stats"{ "is_active": true, "name": "string", "redis_subscribers": 0, "total_subscribers": 0, "websocket_subscribers": 0}GET/api/v1/pubsub/grants
Authorization
bearer_token In: header
Query Parameters
granted (default) lists grants the caller issued; received lists grants made to them.
Value in
- "granted"
- "received"
Response Body
application/json
curl -X GET "https://example.com/api/v1/pubsub/grants"{ "grants": [ { "created_at": "2019-08-24T14:15:22Z", "expires_at": "2019-08-24T14:15:22Z", "grant_id": "string", "grantee": "string", "granter": "string", "ops": [ "subscribe" ], "resource": "string" } ]}POST/api/v1/pubsub/grants
Authorization
bearer_token In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Request to grant a capability to another principal.
Response Body
application/json
curl -X POST "https://example.com/api/v1/pubsub/grants" \ -H "Content-Type: application/json" \ -d '{ "grantee": "string", "ops": [ "subscribe" ], "resource": "string" }'{ "created_at": "2019-08-24T14:15:22Z", "expires_at": "2019-08-24T14:15:22Z", "grant_id": "string", "grantee": "string", "granter": "string", "ops": [ "subscribe" ], "resource": "string"}DELETE/api/v1/pubsub/grants
Authorization
bearer_token In: header
Query Parameters
Principal whose grants from the caller should all be revoked.
Response Body
application/json
curl -X DELETE "https://example.com/api/v1/pubsub/grants?grantee=string"{ "revoked": 0}DELETE/api/v1/pubsub/grants/{grant_id}
Authorization
bearer_token In: header
Path Parameters
Grant id to revoke
Response Body
curl -X DELETE "https://example.com/api/v1/pubsub/grants/string"POST/api/v1/pubsub/publish
Authorization
bearer_token In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Request to publish a single message to many channels in one call
Response Body
application/json
curl -X POST "https://example.com/api/v1/pubsub/publish" \ -H "Content-Type: application/json" \ -d '{ "channels": [ "string" ], "payload": null }'{ "channels_published": 0, "results": [ { "channel": "string", "message_id": "string", "subscribers_notified": 0 } ], "total_subscribers_notified": 0}POST/api/v1/pubsub/publish/{channel}
Authorization
bearer_token In: header
Path Parameters
Channel name to publish to
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Request to publish a message to a channel
Response Body
application/json
curl -X POST "https://example.com/api/v1/pubsub/publish/string" \ -H "Content-Type: application/json" \ -d '{ "payload": null }'{ "channel": "string", "message_id": "string", "subscribers_notified": 0, "timestamp": 0}POST/api/v1/pubsub/rooms/{name}
Authorization
bearer_token In: header
Path Parameters
Room name; the channel is room.{name}
Response Body
application/json
curl -X POST "https://example.com/api/v1/pubsub/rooms/string"{ "owner": "string", "room": "string"}POST/api/v1/pubsub/token
curl -X POST "https://example.com/api/v1/pubsub/token"{ "expires_in": 0, "namespace": "string", "token": "string"}