Notifications
Notifications provide alerts based off of specific events. Examples include when titles change play state, when titles data is updated, or when a system event happens.
Get a list of all active subscriptions with their sender names, inputs, titles, and events.
optional id to track this command, will be returned in the response
The name of the subscription you are querying. Leave blank to retrieve all subscriptions.
GET /api/command/getSubscriptions HTTP/1.1
Host: 127.0.0.1:9022
Accept: */*
{
"result": {
"command": "getSubscriptions",
"reply": "getSubscriptions",
"sender": "",
"senders": [
{
"events": "play,control,data,play-data",
"id": "",
"input": "",
"is_default": "1",
"name": ""
}
],
"success": true
}
}
Configure a notification subscription to get information when titles change play state, when their data is updated, or when a system event happens. You can subscribe to notifications that originate from a specific "sender" and can specify an input and title id, both or neither. Internally, Captivate registers a different subscription for each "sender" and each "sender" can specify one or more inputs, title ids, and events, each separated by commas to filter which notifications that sender will send. If a sender by the provided name doesn't exist, it will be created. If a sender by the name already exists, the events, inputs, and title ids will be appended to the existing ones. NOTE: In the JavaScript/WebSocket API, all connected clients get all notifications from all subscriptions, so you will need to do your own filtering by sender, input, and/or title id on each received notification.
Because this endpoint doesn't use any variables, it can also be accessed using a GET request.
optional id to track this command, will be returned in the response
Comma-separated list of title ids. Use empty string or "all" for all titles.
Comma-separated list of input names. Use empty string or "all" for all inputs.
The name of the subscription you are creating/modifying.
Comma-separated list of event types. Currently, 'play' for play state, 'data' for variable updates, and 'event.*' for other events like chat message updates. For specific events, you can specify them individually too, like 'event.onchatmessageevent'
play,data
GET /api/command/subscribe HTTP/1.1
Host: 127.0.0.1:9022
Accept: */*
{}
Remove a title, input, or event from a notification subscription identified by "sender." When a sender has no events, it will be removed from the Captivate subscription list.
optional id to track this command, will be returned in the response
Comma-separated list of title ids. Use empty string or "all" for all titles.
all
Comma-separated list of input names. Use empty string or "all" for all inputs.
The name of the subscription you are modifying.
Comma-separated list of event types. Currently, 'play' for play state and 'data' for variable updates
play,data
GET /api/command/unSubscribe HTTP/1.1
Host: 127.0.0.1:9022
Accept: */*
{
"result": {
"command": "unSubscribe",
"error": "cannot do an unsubscribe with the default notification sender",
"id": "all",
"reply": "unSubscribe",
"success": true
}
}
Last updated