Skip to main content

Websocket Connections

The Sygnal API is primarily websocket based. You can establish a connection to a sygnal device via the configured IP and port of the webGUI.

By the nature of being a websocket API there is no direct request-response model. However, in most cases when sending a request you should expect a single response. This response may be just to you, or to all clients if your request caused a change other clients are subscribed to recieveing events about.

For example, if you send a requet to start a stream, this will then start the stream and then send an update to ALL connected API clients with the new state of the stream. In most cases when creating, updating or deleting an item this change will be sent to all clients that are subscribed, it will in most cases send an updated list of all items to give clients an opertunity to recover if there has been de-sync. For example, if you create a new stream, a list of all streams including the new one will be sent to all clients.

The general stuctures of the Sygnal applications are split into 'modules'. For example the teleprompter is it's own module and all communication about it are flagged as part of the 'promp' module. When opening a new API connection, you must 'register' as part of this you specify the modules you would like to send/recieve messages from. This means you could write a plugin/extension for playback and not recieve the unecessary prompt messages. You could also use this as a way of seperating out your communication or even multithreading workflows. There is no limit to subscribers to each module or to the origin of the subscribers. Meaning you could open 3 different prompt API connections, all 3 would receive all the prompt messages, but each one could be responsible for sending a different type of message.

There is a defined strcuture and methodology to the websocket and HTTP message structure outlined in the message structure section.