Rest API
Retrieve HLS Content
path Parameters
room_id required | string Room id |
filename required | string Name of the file |
query Parameters
_HLS_msn | integer or null (HlsMsn) >= 0 Example: _HLS_msn=10 Segment sequence number |
_HLS_part | integer or null (HlsPart) >= 0 Example: _HLS_part=10 Partial segment sequence number |
_HLS_skip | string or null (HlsSkip) Example: _HLS_skip=YES Is delta manifest requested |
header Parameters
range | string Byte range of partial segment |
Responses
Response samples
- 200
- 400
- 404
- 503
"string"
Response samples
- 200
- 401
{- "data": [
- {
- "components": [
- {
- "id": "component-1",
- "properties": {
- "lowLatency": true,
- "persistent": true,
- "playable": true,
- "subscribeMode": "auto",
- "targetWindowDuration": 0
}, - "tracks": [
- {
- "id": "string",
- "metadata": null,
- "type": "audio"
}
], - "type": "hls"
}
], - "config": {
- "maxPeers": 10,
- "peerDisconnectedTimeout": 60,
- "peerlessPurgeTimeout": 60,
- "roomId": "string",
- "videoCodec": "h264",
}, - "id": "room-1",
- "peers": [
- {
- "id": "peer-1",
- "metadata": {
- "name": "FishjamUser"
}, - "status": "disconnected",
- "tracks": [
- {
- "id": "string",
- "metadata": null,
- "type": "audio"
}
], - "type": "webrtc"
}
]
}
]
}
Creates a room
Authorizations:
Request Body schema: application/jsonoptional
Room configuration
maxPeers | integer or null >= 1 Maximum amount of peers allowed into the room |
peerDisconnectedTimeout | integer or null >= 1 Duration (in seconds) after which the peer will be removed if it is disconnected. If not provided, this feature is disabled. |
peerlessPurgeTimeout | integer or null >= 1 Duration (in seconds) after which the room will be removed if no peers are connected. If not provided, this feature is disabled. |
roomId | string or null Custom id used for identifying room within Fishjam. Must be unique across all rooms. If not provided, random UUID is generated. |
videoCodec | string or null Enum: "h264" "vp8" Enforces video codec for each peer in the room |
webhookUrl | string or null URL where Fishjam notifications will be sent |
Responses
Request samples
- Payload
{- "maxPeers": 10,
- "peerDisconnectedTimeout": 60,
- "peerlessPurgeTimeout": 60,
- "roomId": "string",
- "videoCodec": "h264",
}
Response samples
- 201
- 400
- 401
- 503
{- "data": {
- "fishjam_address": "fishjam1:5003",
- "room": {
- "components": [
- {
- "id": "component-1",
- "properties": {
- "lowLatency": true,
- "persistent": true,
- "playable": true,
- "subscribeMode": "auto",
- "targetWindowDuration": 0
}, - "tracks": [
- {
- "id": "string",
- "metadata": null,
- "type": "audio"
}
], - "type": "hls"
}
], - "config": {
- "maxPeers": 10,
- "peerDisconnectedTimeout": 60,
- "peerlessPurgeTimeout": 60,
- "roomId": "string",
- "videoCodec": "h264",
}, - "id": "room-1",
- "peers": [
- {
- "id": "peer-1",
- "metadata": {
- "name": "FishjamUser"
}, - "status": "disconnected",
- "tracks": [
- {
- "id": "string",
- "metadata": null,
- "type": "audio"
}
], - "type": "webrtc"
}
]
}
}
}
Shows information about the room
Authorizations:
path Parameters
room_id required | string Room ID |
Responses
Response samples
- 200
- 400
- 401
- 404
- 503
{- "data": {
- "components": [
- {
- "id": "component-1",
- "properties": {
- "lowLatency": true,
- "persistent": true,
- "playable": true,
- "subscribeMode": "auto",
- "targetWindowDuration": 0
}, - "tracks": [
- {
- "id": "string",
- "metadata": null,
- "type": "audio"
}
], - "type": "hls"
}
], - "config": {
- "maxPeers": 10,
- "peerDisconnectedTimeout": 60,
- "peerlessPurgeTimeout": 60,
- "roomId": "string",
- "videoCodec": "h264",
}, - "id": "room-1",
- "peers": [
- {
- "id": "peer-1",
- "metadata": {
- "name": "FishjamUser"
}, - "status": "disconnected",
- "tracks": [
- {
- "id": "string",
- "metadata": null,
- "type": "audio"
}
], - "type": "webrtc"
}
]
}
}
Creates the component and adds it to the room
Authorizations:
path Parameters
room_id required | string Room ID |
Request Body schema: application/jsonoptional
Component config
ComponentOptionsHLS (object) or ComponentOptionsRTSP (object) or ComponentOptionsFile (object) or ComponentOptionsSIP (object) or ComponentOptionsRecording (object) (ComponentOptions) Component-specific options | |
type required | string (ComponentType) Component type |
Responses
Request samples
- Payload
{- "options": {
- "lowLatency": false,
- "persistent": false,
- "s3": {
- "accessKeyId": "string",
- "bucket": "string",
- "region": "string",
- "secretAccessKey": "string"
}, - "subscribeMode": "auto",
- "targetWindowDuration": 0
}, - "type": "hls"
}
Response samples
- 201
- 400
- 401
- 404
- 503
{- "data": {
- "id": "component-1",
- "properties": {
- "lowLatency": true,
- "persistent": true,
- "playable": true,
- "subscribeMode": "auto",
- "targetWindowDuration": 0
}, - "tracks": [
- {
- "id": "string",
- "metadata": null,
- "type": "audio"
}
], - "type": "hls"
}
}
Subscribe component to the tracks of peers or components
Authorizations:
path Parameters
room_id required | string Room ID |
component_id required | string Component ID |
Request Body schema: application/jsonoptional
Subscribe configuration
origins | Array of strings List of peers and components ids whose tracks the HLS endpoint will subscribe to |
Responses
Request samples
- Payload
{- "origins": [
- "string"
]
}
Response samples
- 400
- 401
- 404
- 503
{- "errors": "Token has expired"
}
Create peer
Authorizations:
path Parameters
room_id required | string Room id |
Request Body schema: application/jsonoptional
Peer specification
required | PeerOptionsWebRTC (object) (PeerOptions) Peer-specific options |
type required | string (PeerType) Peer type |
Responses
Request samples
- Payload
{- "options": {
- "enableSimulcast": true
}, - "type": "webrtc"
}
Response samples
- 201
- 400
- 401
- 404
- 503
{- "data": {
- "peer": {
- "id": "peer-1",
- "metadata": {
- "name": "FishjamUser"
}, - "status": "disconnected",
- "tracks": [
- {
- "id": "string",
- "metadata": null,
- "type": "audio"
}
], - "type": "webrtc"
}, - "peer_websocket_url": "www.fishjam.org/socket/peer",
- "token": "5cdac726-57a3-4ecb-b1d5-72a3d62ec242"
}
}
Make a call from the SIP component to the provided phone number
Authorizations:
path Parameters
room_id required | string Room ID |
component_id required | string SIP Component ID |
Request Body schema: application/jsonoptional
Phone Number configuration
phoneNumber | string Phone number on which SIP Component will call |
Responses
Request samples
- Payload
{- "phoneNumber": "string"
}
Response samples
- 400
- 401
- 404
- 503
{- "errors": "Token has expired"
}