Try Valo for free

We want to show you something amazing.

We'll send you a link to download a fully functional Valo copy to play with.

Great! Check your email and enjoy Valo

Apologies, we seem to be having a problem processing your input, please try again

Output channelsΒΆ

Requests to most Valo API endpoints return a single response.

By contrast requests to some endpoints represent a subscription to a resource. We refer to these endpoints as “output channels”.

If a Valo URI starts with /output the client will receive a stream of JSON responses following the Server Sent Events standard. The response stream consists of lines of JSON prefixed with data:. Every time the resource is updated another line of output is written to the response stream.

The first line written to the response stream is treated as a “comment” by the standard and is sent to:

  • Fire the onopen handler when the endpoint is invoked from a browser.
  • Inject some much needed whimsy into your day.

Example request:

GET /output/valo/54b24305-086d-4de7-af20-b3d5e1345be9 HTTP/1.1

Example response:

HTTP/1.1 200 OK
Content-Type: text/event-stream

: Letsa' Go!

data: { <some json data> }

data: { <some more json data> }

data: { <you get the idea> }

We do not currently use the event id or event names as specified in the standard. As such, if you reconnect to an output channel (including the browser doing so automatically as per the standard) you will not be delivered the data you missed.

Some examples of output channels in action: