User Tools

Site Tools


products:software:edgeos:api

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
products:software:edgeos:api [2020/06/13 06:54]
brontide [Third Party Unofficial APIs]
products:software:edgeos:api [2020/06/21 17:04] (current)
brontide [Websocket - Stats]
Line 147: Line 147:
 ===== Websocket - Stats ===== ===== Websocket - Stats =====
  
-You can get streaming statistical data from the endpoint ''<nowiki>wss://host-or-ip/ws/stats</nowiki>'' The data from the WebSocket is framed oddly, it's actually a streaming protocol that has been sent and received over WebSocket.  The data will not arrive like you might expect.  You *MUST* reassemble the web socket data fragments since the frames may not align with data boundaries.  Commands must be sent with a valid SESSION_ID.+You can get streaming statistical data from the endpoint ''<nowiki>wss://host-or-ip/ws/stats</nowiki>'' The data from the WebSocket is framed oddly, it's actually a streaming protocol that has been sent and received over WebSocket.  The data will not arrive like you might expect.  You *MUST* reassemble the web socket data fragments since the frames may not align with data boundaries.  Commands must be sent with a valid SESSION_ID.  Origin header is not needed for the 2.x branch of the firmware but is needed for 1.x branches.
  
 The format of data to and from the WebSocket stream is "LENGTH\nJSON_PAYLOAD". Failure of sending properly formed messages to start the streaming will result in no messages from server aka "dead air". The format of data to and from the WebSocket stream is "LENGTH\nJSON_PAYLOAD". Failure of sending properly formed messages to start the streaming will result in no messages from server aka "dead air".
products/software/edgeos/api.txt · Last modified: 2020/06/21 17:04 by brontide