get-srt-server
Use the interface to obtain SRT server list.
Prototype
| Protocol |
HTTP/HTTPS GET |
| URL |
ip[:port]/sc_cloud/scapi/get-srt-server |
| Data Format |
Response: Content-Type: application/json |
Request Cookies
| Parameter |
Description |
| mwcloud-sid |
A string value that is used to uniquely identify user logged-in. |
| mwcloud-uid |
Current logged-in username. |
Request Example
GET /sc_cloud/scapi/get-srt-server HTTP/1.1
Accept: application/json, text/plain, */*
Connection: keep-alive
Cookie: mwcloud-sid=OCXWUMGEYPGIAWWOETYXPNMVHDZIAZJP; mwcloud-uid=Admin;
Response Parameters
| Parameter |
Description |
| Content-Type |
Value: 'application/json; charset=UTF-8' |
Response Body
| Parameter |
Description |
| result |
Result code. The options are as follows:- 0: success.
- Other values. For details about the result codes, please refer to API Status.
|
| status |
SRT server status. |
status
| Parameter |
Description |
| is-running |
Whether the SRT server is on. You can start SRT server by using start-srt-server, and shutdown it using stop-srt-server. |
| connections |
The number of enabled SRT servers. |
| down-bitrate |
Total downstream bitrate. |
| up-bitrate |
Total upstream bitrate. |
| clients |
Detailed information of SRT server list. |
clients
| Parameter |
Description |
| name |
Stream name. |
| player |
Play server list. |
| publisher |
Detailed information of upload server(s). |
player
| Parameter |
Description |
| addr |
Play server address. |
| bitrate |
Play bitrate. |
| port |
Port number. |
| stream_name |
Stream name. |
| type |
Constant value: player. |
| uptime |
Running time in ms. |
publisher
| Parameter |
Description |
| addr |
Upload server address. |
| bitrate |
Upload bitrate. |
| port |
Port number. |
| stream_name |
Stream name. |
| type |
Constant value: publisher. |
| uptime |
Running time in ms. |
Response Example
There are 2 players in the following example.
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
Content-Length: 487
{
"result": 0,
"status": {
"is-running": true,
"connections": 3,
"down-bitrate": 1228800,
"up-bitrate": 609280,
"clients": [
{
"name": "streamID",
"player": [
{
"addr": "10.10.14.135",
"bitrate": 614400,
"port": 46660,
"stream_name": "streamID",
"type": "player",
"uptime": 13600
},
{
"addr": "10.10.15.84",
"bitrate": 614400,
"port": 34154,
"stream_name": "streamID",
"type": "player",
"uptime": 13602
}
],
"publisher": {
"addr": "10.10.6.142",
"bitrate": 609280,
"port": 40089,
"stream_name": "streamID",
"type": "publisher",
"uptime": 13616
}
}
]
}
}