API Documentation: Stream Status API

Synopsis

The Stream Status API is separate from the regular ScaleEngine API. You query the origin server where you publish your streams to directly via HTTP GET requests. The API gathers information about stream status, codecs, whether a stream is being recorded, as well as allowing the user to forcing a stream to shut down. Responses from the API Module are return in XML format. To connect to the API a GET Request is sent with the necessary parameters, which include:

  • command [string] - the type of operation being requested
  • secret [string] - the secret key assigned to either the server or to the application.xml
  • app [string] - the applcation/instance to query.
  • stream [string] - the name of the stream to query

Connection URL Example

https://jb-origin.secdn.net/seapi?command=getStreams&app=jb-origin/live&secret=myapipassword

Commands

Command Description / Requirements Response
closeStream Allows requests to shutdown an active stream that is being published.

Parameters / Requirements
Requires - an active Stream Authentication Publisher to be set for the stream.
stream - name of the stream to be closed
<ScaleEngineApi>Stream Closed</ScaleEnginApi>
getStreams The getStream command allows users to retrieve the actively running streams for an Application Instance
<Streams>
    <Stream isRecording='true'>MyStream</Stream>
    <Stream isRecording='false'>Stream2</Stream>
<Streams>
getStream searches for a stream by name and returns the stream and metadata if its available

Parameters / Requirements
stream - name of the stream to search
<stream isRecording='false'>
    <name>x</name>
    <codec>
        <audio_type>AAC</audio_type>
        <video_type>H264</video_type>
        <audio>mp4a.40.2</audio>
        <video>avc1.66.30</video>
    </codec>
    <metadata>
        <duration>0.0</duration>
        <width>1280.0</width>
        <height>720.0</height>
        <videodatarate>1000.0</videodatarate>
        <framerate>30.0</framerate>
        <videocodecid>7.0</videocodecid>
        <audiodatarate>62.5</audiodatarate>
        <audiosamplerate>48000.0</audiosamplerate>
        <audiosamplesize>16.0</audiosamplesize>
        <stereo>true</stereo>
        <audiocodecid>10.0</audiocodecid>
        <major_brand>qt  </major_brand>
        <minor_version>537199360</minor_version>
        <compatible_brands>qt  </compatible_brands>
        <encoder>Lavf55.19.104</encoder>
        <filesize>0.0</filesize>
    </metadata>
</stream>

Change Log

  • v1.1.3.2014.10.21 - updated result message when accessing an application that was not running
  • v1.1.2 - removed the revoke pubAuth account call when forcing a stream to close.