This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision |
| products:software:edgeos:api [2020/06/09 06:49] – This Wiki formatting is too annoying so linking to source matthew1471 | products:software:edgeos:api [2025/05/12 13:37] (current) – external edit 127.0.0.1 |
|---|
| ===== 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". |
| ===== Third Party Unofficial APIs ===== | ===== Third Party Unofficial APIs ===== |
| There are a few developers who have worked on creating unofficial APIs: | There are a few developers who have worked on creating unofficial APIs: |
| * https://github.com/matthew1471/EdgeOS-API (written in C#) | * https://github.com/matthew1471/EdgeOS-API : C# |
| * https://github.com/andrewstuart/edgeos-rest (written in Go) | * https://github.com/andrewstuart/edgeos-rest : Go |
| | * https://github.com/brontide/aioedgeos : Python with influx collector including DPI |
| |