Red5 Pro Stream Manager REST API v3.1

With Red5 Pro Server Release Version 5.2.0, there is an udpated Stream Manager API.

Download a list of API calls to import into POSTMAN here!

If you are running Stream Manager with Red5 Pro Server Version 4.5 or earlier, then please refer to Red5 Pro Stream Manager API v2.0 for the correct API calls.

Red5 Pro Stream Manager is a streaming architecture management and information service which helps automate the process of creating and deleting Red5 Pro instances. Stream Manager also coordinates between broadcasters and subscribers to help them find the correct servers for their broadcast and subscribe action, respectively.

Stream Manager also provides stream statistics over simple HTTP-based REST API calls, once publishing has started.

Getting Started

Red5 Pro Stream Manager REST API calls can be executed using any standard REST client.

For this section we will be using Google Chrome Add-On: Postman REST client. You need to have the latest Chrome Browser installed on your computer to install the Add-On.

Below are examples on using POST, GET and DELETE type REST operations using the Postman REST client. These are the three type of operations that you will come across while using the Stream Manager REST API.

Note: In examples, the URL pattern of {host} will refer to the Stream Manager IP/hostname and {port} will be 5080, the default port for Red5 Pro. For most cases, we would suggest running on an SSL-secured server.

Making POST API Calls

To make a POST REST call using the Postman REST client:

  1. Enter your URL in the URL text field
  2. Select POST from methods list on the left-hand side of URL text field
  3. If you have any accompanying data:
    • Select Body tab and select raw option
    • Select JSON (application/json) in the drop down selector next to the raw option
    • Paste the desired JSON data into the text area exposed on selecting raw
  4. Click Send to execute your API call

REST API POST Exmaple

Making GET API Calls

To make a GET REST call using the Postman REST client:

  1. Enter your URL in the URL text field
  2. Select GET from methods list on the left-hand side of URL text field
  3. Click Send to execute your API call

REST API GET Exmaple

Making DELETE API Calls

To make a DELETE REST call using the Postman REST client:

  • Enter your URL in the URL text field
  • Select DELETE from methods list on the left-hand side of URL text field
  • Click Send to execute your api call

REST API DELETE Exmaple


REST API for Scale Policy Management

REST API for Launch Configuration Management

REST API for Groups

REST API for Event Scheduling

REST API for Nodes

REST API for Stream Provisioning

REST API for Geozone & Region Management

REST API for Streams

REST API for Alarms

REST API for VOD

REST API For Log Access

REST API for Short-Term Stream Usage Statistics


REST API Glossary

The following glossary explains the Request and Response Parameters provided in the examples above.

group-min-connections

Minimum subscriber connections that this group should support. This parameter helps the scale-in process decide when to scale down an edge.

min-origin-connections

Minimum connections at origin. This should always be zero (0) for the current version of Stream Manager.

launch-config-name

Name of the launch configuration to be used for launching a new instance. Usually this implies the consistent machine configuration for a group. A launch configuration defines your compute machine type, max connections, etc., for an instance.

scale-policy-name

Name of the scale policy to be used by Autoscaler to launch new edges when load conditions occur. A scale policy defines details such as min-max edges allowed etc.

stream-name

Name of the stream for publishing or subscription.

stream-scope

Red5 scope where the stream exists. This usually determined by the RTMP connection URL.

origin-host-address

Host address of an available Red5 Pro origin server.

stream-description

Descriptive information about the stream (optional).

region-code

A region code representing the region as suuported by your cloud platform provider.Regions codes generally map your cloud providers's data center(s) at a region.

subscriber-count

Total active subscribers count for this stream.

start-timestamp

Stream start timestamp.

node-identifier

Unique Identifier of a node. Directly translates as virtual machine instance name.

role

Role of the instance in the system: Origin or Edge.

host

Instance host name/address.

node-state

Instance state: RUNNING, TERMINATING, INSERVICE, PENDING, etc.

connection-capacity

Maximum connection capacity of this instance as per launch configuration information.

group-identifier

Group name identifier.

alarm-id

Id of an alarm.

alarm-type

Alarm type. Generally the type will be either scale-out or scale-in.

alarm-metric

Metric that the alarm is set to monitor.

alarm-threshold

Threshold value for the alarm.

alarm-threshold-comparator

The comparator enum for threshold evaluation on this alarm. Comparators are comparision operators used to evaluate conditions at runtime using the threshold values and current value of the targeted metric.

alarm-target-type

Target type enum of the alarm. This is always set to GROUP, In current versions of Stream Manager alarms are meant for groups only.

playlist-name

Name of the VOD m3u8 playlist on cloud storage.

media-file-name

Name of the VOD mp4/flv media on cloud storage.

vod-duration

Time duration of the VOD content (in seconds).

last-modified

Last modified timestamp of the VOD content on cloud.

playlist-url

The absolute HTTP(s) url of the m3u8 playlist.

media-url

The url of the flv/mp4 media file.

error-message-string

Human friendly error message string.

error-timestamp

Timestamp for when the error message was generated.

total-group-connections

Total connections on observed on the node group.

total-node-count

Total nodes in the group. This includes nodes in different states.

total-active-nodes

Total active nodes in the group. This includes nodes in active state (INSERVICE) only.

total-available-capacity

Total available connection capacity of the given node role. This is a cumulative total of individual node capacities belonging to same node role.

total-connection-load

Total available connection load (count) of the given node role. This is a cumulative total of individual node capacities belonging to same node role. You can calculate the net percentage using the values of total-available-capacity and total-connection-load.

policy-name

The name of the scale policy

policy-version

The version of the scale policy policy format. Currently Red5 Pro autoscaling supports two versions of the scale policy - standard (identified by version 0.0.2) and region focused (identified by 0.0.3)

policy-type

A string representing the policy class used for representing the current policy. Version 0.0.3 uses type string com.red5pro.services.autoscaling.model.ScalePolicyMaster.

min-node-count

The minimum number of nodes to have for the specified node role.

max-node-count

The maximum number of nodes to have for the specified node role.

node-scale-adjustment

This property is currently not active. See scale policy concepts

configuration-name

The name of the launch configuration.

configuration-description

The description of the launch configuration.

red5pro-image

The image name/id of the Red5 Pro image created fort autoscaling the cloud platform. For simulated cloud platforms this value in not important.

instance-type

The instance type of the VM/hardware which is used to identify the machine configuration to be used for running the Red5 Pro instance.

property-name

The arbitrary name of a property used in a launch configuration or scale policy.

property-value

The arbitrary value of a property used in a launch configuration or scale policy.

meta-name

The arbitrary name of a meta tag used in a launch configuration or scale policy. Meta tags are used to add meta data to instances.

meta-value

The arbitrary value for a meta tag used in a launch configuration or scale policy. Meta tags are used to to add meta data to instances.

publish-start-time

The publish start timestamp of the stream as UTC milliseconds

publish-stop-time

The unpublish timestamp of the stream as UTC milliseconds

session-duration

The total duration of the broadcast session in milliseconds

last-known-active-subscribers

The last known number of active subscribers for the stream

last-known-peak-subscribers

The last known maximum number of simultaneous subscribers for the stream

last-known-disconnected-subscribers

The last known total number of subscribers for the stream. The value is calculated using the last-known-active-subscribers and last-known-disconnected-subscribers values.

geozone-name

The alphabetic string representing the geozone name.

geozone-code

The unique alphabetic string representing the geozone. The code is a single word that must not contain space.

autogen-event-id

A auto generated id used to represent a scheduled event internally.

event-name

A unique string identifier used to identify and operate on a scheduled event using the streammanager scheduling api.