Description
The Restream API lets you create stream targets and link the to Icareus Suite Linear Channels.
The Restream Set can contain one or more stream targets. The host address of each stream target is treated as an RTMP ingest URL to which the stream is pushed once the stream is sent to the Icareus Suite Linear Channel.

Please not that Restream targets for a given Icareus Suite Linear Channel are only created as the stream is received on our Origin. So creating and linking Restream Sets to a channel while a stream is active will have no effect. The stream must be stopped and started again for the changes to take effect.
API Path
- /api/restream
Config JSON
The config value expected by the config parameter of this API should be in the following format.
- {
- "set": [
- {
- "host": "127.0.0.1",
- "port": "1935",
- "applicationName": "liveApplication1",
- "streamName": "stream1",
- "username": "",
- "password": ""
- },
- {
- "host": "localhost",
- "port": "1935",
- "applicationName": "liveApplication2",
- "streamName": "stream2",
- "username": "appUsername",
- "password": "appPassword"
- }
- ]
- }
Since the config JSON is sent to the API as a query parameter, it should ideally be URL encoded and minified.
Get Restream Sets
Returns the list of Restream Sets for the Organization.
Parameters
Name
| Value
| Requirement
| Info
|
action
| getRestreamSets
| Mandatory
|
|
organizationId
| number
| Mandatory
| Icareus Suite Organization ID
|
secret
| string
| Mandatory
| Secret key of the Organization
|
Example
- /api/restream?action=getRestreamSets&organizationId=2631609&secret=secret
Response
Successful response
- {
- "status": "ok",
- "sets": [
- {
- "config": "{\"set\":[{\"port\":\"1935\",\"username\":\"\",\"host\":\"46.137.187.148\",\"applicationName\":\"suitelive\",\"password\":\"\",\"streamName\":\"restream\"},{\"port\":\"1935\",\"username\":\"\",\"host\":\"46.137.187.148\",\"applicationName\":\"suitelive\",\"password\":\"\",\"streamName\":\"another-restream\"}]}",
- "restreamSetId": 4411301
- }
- ],
- "organizationId": 2631609
- }
Error response
- {
- "status": "error",
- "message": "information about what went wrong"
- }
Add Restream Set
Adds a new Restream Set to the Organization
Parameters
Name
| Value
| Requirement
| Info
|
action
| addRestreamSet
| Mandatory
|
|
organizationId
| number
| Mandatory
| Icareus Suite Organization ID
|
secret
| string
| Mandatory
| Secret key of the Organization
|
name
| string
| Mandatory
| Name of the Restream Set
|
config
| string
| Mandatory
| Restream set configuration JSON (stringified)
|
Example
/api/restream?organizationId=2631609&secret=secret&action=addRestreamSet&name=Restream%20set%201&config=%7B%22set%22%3A%5B%7B%22host%22%3A%22127.0.0.1%22%2C%22port%22%3A%221935%22%2C%22applicationName%22%3A%22testapplication%22%2C%22streamName%22%3A%22teststream%22%2C%22username%22%3A%22%22%2C%22password%22%3A%22%22%7D%5D%7D
Response
Successful response
- {
- "message": "added",
- "status": "ok",
- "restreamSetId": 4425901
- }
Error response
- {
- "status": "error",
- "message": "information about what went wrong"
- }
Update Restream Set
Updates an existing Restream Set
Parameters
Name
| Value
| Requirement
| Info
|
action
| updateRestreamSet
| Mandatory
|
|
organizationId
| number
| Mandatory
| Icareus Suite Organization ID
|
secret
| string
| Mandatory
| Secret key of the Organization
|
restreamSetId
| number
| Mandatory
| ID of the Restream Set to update
|
config
| string
| Mandatory
| Restream set configuration JSON
|
Example
/api/restream?organizationId=2631609&secret=secret&action=updateRestreamSet&restreamSetId=4425901&config=%7B%22set%22%3A%5B%7B%22host%22%3A%22localhost%22%2C%22port%22%3A%221935%22%2C%22applicationName%22%3A%22newapplication%22%2C%22streamName%22%3A%22restream%22%2C%22username%22%3A%22%22%2C%22password%22%3A%22%22%7D%5D%7D
Response
Successful response
- {
- "message": "updated",
- "status": "ok",
- "restreamSetId": 4425901
- }
Error response
- {
- "status": "error",
- "message": "information about what went wrong"
- }
Remove Restream Set
Removes an existing Restream Set
Parameters
Name
| Value
| Requirement
| Info
|
action
| removeRestreamSet
| Mandatory
|
|
organizationId
| number
| Mandatory
| Icareus Suite Organization ID
|
secret
| string
| Mandatory
| Secret key of the Organization
|
restreamSetId
| number
| Mandatory
| ID of the Restream Set to remove
|
Example
/api/restream?action=removeRestreamSet&organizationId=2631609&secret=secret&restreamSetId=4425901
Response
Successful response
- {
- "message": "4425901 deleted",
- "status": "ok"
- }
Error response
- {
- "status": "error",
- "message": "information about what went wrong"
- }
Get linked Restream Sets
Returns the Restream Sets linked to an Icareus Suite Linear Channel
Parameters
Name
| Value
| Requirement
| Info
|
action
| getLinkedRestreamSets
| Mandatory
|
|
organizationId
| number
| Mandatory
| Icareus Suite Organization ID
|
secret
| string
| Mandatory
| Secret key of the Organization
|
serviceId
| number
| Mandatory
| Icareus Suite Linear Channel ID
|
Example
/api/restream?organizationId=2631609&secret=secret&action=getLinkedRestreamSets&serviceId=4014601
Response
Successful response
- {
- "serviceId": 4014601,
- "status": "ok",
- "sets": [
- {
- "config": "{\"set\":[{\"port\":\"1935\",\"username\":\"\",\"host\":\"46.137.187.148\",\"applicationName\":\"suitelive\",\"password\":\"\",\"streamName\":\"restream\"},{\"port\":\"1935\",\"username\":\"\",\"host\":\"46.137.187.148\",\"applicationName\":\"suitelive\",\"password\":\"\",\"streamName\":\"another-restream\"}]}",
- "restreamSetId": 4411301
- }
- ]
- }
Error response
- {
- "status": "error",
- "message": "information about what went wrong"
- }
Link Restream Set
Links a Restream Set to a Icareus Suite Linear Channel
Parameters
Name
| Value
| Requirement
| Info
|
action
| linkRestreamSet
| Mandatory
|
|
organizationId
| number
| Mandatory
| Icareus Suite Organization ID
|
secret
| string
| Mandatory
| Secret key of the Organization
|
serviceId
| number
| Mandatory
| Icareus Suite Linear Channel ID
|
restreamSetId
| number
| Mandatory
| Restream Set ID
|
Example
/api/restream?organizationId=2631609&secret=secret&action=linkRestreamSet&serviceId=4014601&restreamSetId=4425901
Response
Successful response
- {
- "message": "restreamSet:4425901 added to channel:4014601",
- "status": "ok",
- "restreamSetId": 4425901
- }
Error response
- {
- "status": "error",
- "message": "information about what went wrong"
- }
Unlink Restream Set
Unlinks a Restream Set from an Icareus Suite Linear Channel
Parameters
Name
| Value
| Requirement
| Info
|
action
| unlinkRestreamSet
| Mandatory
|
|
organizationId
| number
| Mandatory
| Icareus Suite Organization ID
|
secret
| string
| Mandatory
| Secret key of the Organization
|
serviceId
| number
| Mandatory
| Icareus Suite Linear Channel ID
|
restreamSetId
| number
| Mandatory
| Restream Set ID
|
Example
/api/restream?organizationId=2631609&secret=secret&action=unlinkRestreamSet&serviceId=4014601&restreamSetId=4425901
Response
Successful response
- {
- "message": "restreamSet:4425901 removed from channel:4014601",
- "status": "ok"
- }
Error response
- {
- "status": "error",
- "message": "information about what went wrong"
- }