Real-time DAS API¶
DAS realtime communications are performed using SocketIO compliant protocols. Several libraries exist in javascript and other languages. See here for more information on using the basic protocol (SocketIO)[https://socket.io/]
The DAS server is today using this library to implement our Socket IO server (python-socketio)[https://github.com/miguelgrinberg/python-socketio]
Requests¶
All client messages are to include an integer id that is used to match the response from the server. The matching id is found in resp_id field found in the response message.
SocketIO does not define authentication handshakes directly. To address authentication, we use our OAuth token as retrieved from login to authorize communication across this channel.
Event Messages¶
These are the messages originating from the server and sent out to the registered clients.
subject_update¶
The “data” block contains a single subject, plus if the user is authorized subject contains a field “track” which is the latest geojson track for that subject.
{
"type": "subject_update"
"data": {
}
}
Request Messages¶
The authorization message above is an example of a request to the server.