Skip to content
Stephane Jourdan edited this page Aug 4, 2015 · 7 revisions

API

The StreamMachine API gives some information and manipulation options.

All routes are handled in api.coffee.

GETs

  • GET /api/streams outputs the available streams, source status, or HLS information
    • GET /api/streams/<stream_name> outputs specific streams configuration information
  • GET /api/config outputs all available configuration for the streams
    • GET /api/streams/<stream_name>/config outputs all available configuration for a single stream
  • GET /api/slaves outputs for each stream master/slave status information
  • GET /api/listeners couldn't get it to work but probably outputs the listener count

POSTs

  • POST /api/streams creates a new stream
  • POST /api/streams/<stream_name>/metadata
  • POST /api/streams/<stream_name>/promote
  • POST /api/streams/<stream_name>/drop

Examples:

  • to create a new stream, you need a at least a key and an id:
curl -F 'key=test, id=test' http://a.b.c.d:port/api/streams

PUTs

  • PUT /api/streams/<stream_name>/config

DELETEs

  • DELETE /api/streams/<stream_name>
Clone this wiki locally