Switchboards contain an ordered list of streams.
Application Name
The application name must begin with "username-"
Sample value:username-origin
Stream Name
May only contain alpha numerical characters, dashes (-), and underscores (_)
Sample value:mystreamname
Type of Stream
Enum:switchboard
Default:switchboard
Sample value:switchboard
Playback Protection Type
Enum:none, sevu, hmac, geoip
Default:none
Sample value:sevu
[Not Implemented] Playback Protection Key or list of IP addresses to allow/block.
Protection of hmac requires a protection key, while none or sevu will have a protection key of null
Sample value:secret#STRING@of&charact3rs
Only for:
protection: hmac
protection: geoip
[Not Implemented] Select a transcode template to apply to this stream
Integer
Sample value:720p@30fps_1536kbps
How long to wait for the stream to reconnect
Range:10 - 1200
Default:10
Sample value:300
Username for stream authentication
May only contain alpha numerical characters, dashes (-), and underscores (_)
Sample value:myuser
Recording Segmentation
Enum:disabled, schedule, duration, size
Default:duration
Sample value:schedule
Recording Segmentation Value: the value is dependant on which segement_type is set. For size and duration a numerical value is expected. Schedule expects a cron expression. Disabled will set this field to null.
Segment type of duration or size must have a segment value that is an integer, schedule must have a valid crontab expression, and disabled must have a segment value of null
Default:1440
Sample value:* */2 * * *
Only for:
segment_type: schedule
segment_type: duration
segment_type: size
Folder to save recordings too
Folder names may contain lower case letters, numbers, dashes (-), and underscores (_), but must start and end with a letter or number.
Sample value:recordings/mystream
Advanced Stream Flags, multiple flags can be combined using a logical AND
Flags:
Default:0
Sample value:10
Origin URL
Sample value:rtmp://username-origin.secdn.net/username-origin/live
Origin URL with stream name
Sample value:rtmp://username-origin.secdn.net/username-origin/live/mystream
Backup Origin URL
Sample value:rtmp://username-originbk.secdn.net/username-origin/live
HLS Playback URL
Sample value:rtmp://username-hls.secdn.net/username-live/play/mystream.smil/playlist.m3u8
Encoder metadata for live streams
Encoder controls for live streams
Applications that a stream runs on
Saved players
Playlists for a channel
Push publishes (restreams)
Streamfetches for pulling streams
Get the Switchboards object with id mystreamname.
https://api.scaleengine.net/dev/v2/switchboards/mystreamname
curl --user 158:8fc8c48da81e6a2a06a9556379bf798af508dc0792497c678b4c3532ba8b637f https://api.scaleengine.net/dev/v2/switchboards/mystreamname
None
{ "id": "N/A", "cdn_id": "8123", "app": "username-origin", "name": "mystreamname", "type": "switchboard", "edge_type": "dvr", "protection": "sevu", "protection_key": "secret#STRING@of&charact3rs", "transcode_template": "720p@30fps_1536kbps", "hls_chunks": "4", "hls_timeout": "300", "user": "myuser", "pass": "myPassw0rd1", "record": "false", "record_type": "stream", "segment_type": "schedule", "segment_value": "* */2 * * *", "save_folder": "recordings/mystream", "ga_key": "UA-123456-1", "flags": "10", "origin_url": "rtmp://username-origin.secdn.net/username-origin/live", "full_url": "rtmp://username-origin.secdn.net/username-origin/live/mystream", "origin_backup_url": "rtmp://username-originbk.secdn.net/username-origin/live", "playback_url": "rtmp://username-hls.secdn.net/username-live/play/mystream.smil/playlist.m3u8", "thumbnail_url": "rtmp://username-thumb.secdn.net/username-live/play/mystream.smil/thumbnail.jpg", "playback_rtmp_url": "rtmp://username-vsn.secdn.net/username-live/play/mystream" }
Create a new Switchboards object.
https://api.scaleengine.net/dev/v2/switchboards
curl -X PUT --data-binary @/path/to/request/body --user 158:8fc8c48da81e6a2a06a9556379bf798af508dc0792497c678b4c3532ba8b637f https://api.scaleengine.net/dev/v2/switchboards
{ "app": "username-origin", "name": "mystreamname", "type": "switchboard", "edge_type": "dvr", "protection": "sevu", "transcode_template": "720p@30fps_1536kbps", "hls_chunks": "4", "hls_timeout": "300", "user": "myuser", "pass": "myPassw0rd1", "record": "false", "record_type": "stream", "segment_type": "schedule", "segment_value": "* */2 * * *", "save_folder": "recordings/mystream", "ga_key": "UA-123456-1", "flags": "10" }
{ "id": "N/A", "cdn_id": "8123", "app": "username-origin", "name": "mystreamname", "type": "switchboard", "edge_type": "dvr", "protection": "sevu", "protection_key": "secret#STRING@of&charact3rs", "transcode_template": "720p@30fps_1536kbps", "hls_chunks": "4", "hls_timeout": "300", "user": "myuser", "pass": "myPassw0rd1", "record": "false", "record_type": "stream", "segment_type": "schedule", "segment_value": "* */2 * * *", "save_folder": "recordings/mystream", "ga_key": "UA-123456-1", "flags": "10", "origin_url": "rtmp://username-origin.secdn.net/username-origin/live", "full_url": "rtmp://username-origin.secdn.net/username-origin/live/mystream", "origin_backup_url": "rtmp://username-originbk.secdn.net/username-origin/live", "playback_url": "rtmp://username-hls.secdn.net/username-live/play/mystream.smil/playlist.m3u8", "thumbnail_url": "rtmp://username-thumb.secdn.net/username-live/play/mystream.smil/thumbnail.jpg", "playback_rtmp_url": "rtmp://username-vsn.secdn.net/username-live/play/mystream" }
Update the Switchboards object with id mystreamname.
https://api.scaleengine.net/dev/v2/switchboards/mystreamname
curl -X POST --data-binary @/path/to/request/body --user 158:8fc8c48da81e6a2a06a9556379bf798af508dc0792497c678b4c3532ba8b637f https://api.scaleengine.net/dev/v2/switchboards/mystreamname
{ "edge_type": "dvr", "protection": "sevu", "transcode_template": "720p@30fps_1536kbps", "hls_chunks": "4", "hls_timeout": "300", "user": "myuser", "pass": "myPassw0rd1", "record": "false", "record_type": "stream", "segment_type": "schedule", "segment_value": "* */2 * * *", "save_folder": "recordings/mystream", "ga_key": "UA-123456-1" }
{ "id": "N/A", "cdn_id": "8123", "app": "username-origin", "name": "mystreamname", "type": "switchboard", "edge_type": "dvr", "protection": "sevu", "protection_key": "secret#STRING@of&charact3rs", "transcode_template": "720p@30fps_1536kbps", "hls_chunks": "4", "hls_timeout": "300", "user": "myuser", "pass": "myPassw0rd1", "record": "false", "record_type": "stream", "segment_type": "schedule", "segment_value": "* */2 * * *", "save_folder": "recordings/mystream", "ga_key": "UA-123456-1", "flags": "10", "origin_url": "rtmp://username-origin.secdn.net/username-origin/live", "full_url": "rtmp://username-origin.secdn.net/username-origin/live/mystream", "origin_backup_url": "rtmp://username-originbk.secdn.net/username-origin/live", "playback_url": "rtmp://username-hls.secdn.net/username-live/play/mystream.smil/playlist.m3u8", "thumbnail_url": "rtmp://username-thumb.secdn.net/username-live/play/mystream.smil/thumbnail.jpg", "playback_rtmp_url": "rtmp://username-vsn.secdn.net/username-live/play/mystream" }
Delete the Switchboards object with id mystreamname.
https://api.scaleengine.net/dev/v2/switchboards/mystreamname
curl -X DELETE --user 158:8fc8c48da81e6a2a06a9556379bf798af508dc0792497c678b4c3532ba8b637f https://api.scaleengine.net/dev/v2/switchboards/mystreamname
None
You do not have access to modify this field
Missing one or more required fields
Data type does not conform to required field type
The value exceeded maximum length allowed
The application name must begin with "username-"
May only contain alpha numerical characters, dashes (-), and underscores (_)
The value must match one of the predefined values
Protection of hmac requires a protection key, while none or sevu will have a protection key of null
This field is only valid when used with another field
The value must be between the predefined range
May only contain alpha numerical characters, dashes (-), and underscores (_)
Segment type of duration or size must have a segment value that is an integer, schedule must have a valid crontab expression, and disabled must have a segment value of null
Folder names may contain lower case letters, numbers, dashes (-), and underscores (_), but must start and end with a letter or number.
The value must match one or more of the predefined flags