Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Запрос

Ответ

Code Block
languagejs
themeRDark
POST /rest-api/stream/stopRecording HTTP/1.1
Host: 192.168.1.101:8081
Content-Length: 65
Content-Type: application/json

{
	"mediaSessionId":"b8ffd290-bcfa-11e9-9482-17706e285ec5"
}
Code Block
languagejs
themeRDark
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Content-Length: 0
Date: Tue, 28 Mar 2017 16:21:48 GMT


/

...

stream/event/send

Запрос

Ответ

Code Block
languagejs
themeRDark
POST /rest-api/
data
stream/event/send HTTP/1.1
Host: 
192.168.1.101
localhost:8081
Content-
Length
Type: 
201
application/json
Content-
Type
Length: 
application/json
77

{
"nodeId
    "streamName":"
cm2p2VmswiHZ4pO12Ps8anz1NYudEOL1@192.168.1.101
test",
"operationId":"d1999750-fde9-11e6-9f1b-913210792936", "sessionId":"/192.168.1.102:15422/192.168.1.101:8443", "payload":{ "message":"hello"
    "payload":{
        "number":33,
        "string":"hello",
        "boolean":true
    }
}
Code Block
languagejs
themeRDark
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1 Content-Length: 0 Date: Tue, 28 Mar 2017 16:21:18 GMT

/connection/find_all

Access-Control-Allow-Origin: *
Access-Control-Allow-Credentials: true


/data/send

Запрос

Ответ

Code Block
languagejs
themeRDark
POST /rest-api/
connection
data/
find_all
send HTTP/1.1
Host: 192.168.1.101:8081
Content-Length: 
0
201
Content-Type: application/json
Code Block
languagejs
themeRDark
HTTP/1.1 200 OK

Server: Apache-Coyote/1.1 Content-Type: application/json;charset=UTF-8

Date: Tue, 28 Mar 2017 16:42:07 GMT [
{
	
"
custom
nodeId":
{}, "nodeId":null
"cm2p2VmswiHZ4pO12Ps8anz1NYudEOL1@192.168.1.101",
	
"
appKey
operationId":"
roomApp
d1999750-fde9-11e6-9f1b-913210792936",
	
"sessionId":"/192.168.1.102:
31049
15422/192.168.1.101:
8080
8443",
	
"
sipRegisterRequired
payload":
false,
{
    	"
sipLogin
message":"
a5ledkh95o57os4ge5i4ihpqio
hello"
,

	
"sipAuthenticationName":null, "sipPassword":null, "sipVisibleName":null, "sipDomain":null, "sipOutboundProxy":null, "sipPort":0, "sipContactParams":null, "width":0, "height":0, "supportedResolutions":"0x0", "useProxy":true, "useDTLS":true, "useWsTunnel":false, "useWsTunnelPacketization2":false, "useBase64BinaryEncoding":false, "mediaProviders":["WebRTC"], "appMainClass":null, "appCallbackClass":null, "authToken":"
}
}
Code Block
languagejs
themeRDark
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Content-Length: 0
Date: Tue, 28 Mar 2017 16:21:18 GMT

Запрос

Ответ

Code Block
languagejs
themeRDark
POST /rest-api/data/send HTTP/1.1
Host: 192.168.1.101:8081
Content-Type: application/json

{
	"nodeId":"cm2p2VmswiHZ4pO12Ps8anz1NYudEOL1@192.168.1.101",
	"operationId":"d1999750-fde9-11e6-9f1b-913210792936",
	"sessionIds": [
        "/192.168.1.102:15422/192.168.1.101:8443",
        "/192.168.1.
102
103:
31049
53002/192.168.1.101:
8080
8443"
, "status":null

    ],
	
"
restClientConfig
payload":
null, "clientVersion
{
    	"message":"
2.3.0
hello"
,

	
"clientOSVersion":null, "clientBrowserVersion":null },{ "custom":{}, "nodeId":null, "appKey":"defaultApp",
}
}
Code Block
languagejs
themeRDark
HTTP/1.1 200 OK
Content-Length: 0
Date: Mon, 10 Apr 2023 16:21:18 GMT

/data/batch_send

Запрос

Ответ

Code Block
languagejs
themeRDark
POST /rest-api/data/batch_send HTTP/1.1
Host: 192.168.1.101:8081
Content-Type: application/json

[
    {
	     "nodeId":"cm2p2VmswiHZ4pO12Ps8anz1NYudEOL1@192.168.1.101",
	     "operationId":"d1999750-hello",
	     "sessionId":"/192.168.1.102:15422/192.168.1.101:8443",
	
"sipRegisterRequired
     "payload":
false, "sipLogin
{
    	     "message":"
sasr7al31j6d1vuuiv9v9vm7ig
hello"
, "sipAuthenticationName":null, "sipPassword":null, "sipVisibleName":null, "sipDomain":null, "sipOutboundProxy":null, "sipPort":0, "sipContactParams":null, "width":0, "height":0, "supportedResolutions":"0x0", "useProxy":true, "useDTLS":true, "useWsTunnel":false, "useWsTunnelPacketization2":false, "useBase64BinaryEncoding":false, "mediaProviders":["WebRTC","WSPlayer"], "appMainClass":null, "appCallbackClass":null, "authToken":"/192.168.1.102:15422/

	     }
    },
    {
	     "nodeId":"cm2p2VmswiHZ4pO12Ps8anz1NYudEOL1@192.168.1.101",
	     "operationId":"d1999750-kick",
	     "sessionId":"/192.168.1.103:53002/192.168.1.101:8443",
	     "payload":{
    	     "message":"bye"
	     }
    }
]
Code Block
languagejs
themeRDark
HTTP/1.1 200 OK
Content-Length: 0
Date: Mon, 10 Apr 2023 16:21:18 GMT

/connection/find_all

Запрос

Ответ

Code Block
languagejs
themeRDark
POST /rest-api/connection/find_all HTTP/1.1
Host: 192.168.1.101:8443",
		"status":null,
		"restClientConfig":null8081
Content-Length: 0
Content-Type: application/json
Code Block
languagejs
themeRDark
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Content-Type: application/json;charset=UTF-8
Date: Tue, 28 Mar 2017 16:42:07 GMT

[
	{
		"custom":{},
		"clientVersionnodeId":"0.5.18"null,
		"clientOSVersionappKey":"5.0 (Windows NT 6.3; Win64; x64) ...roomApp",
		"clientBrowserVersionsessionId":"/192.168.1. Chrome/57.0.2987.110 ..."
	}
]

/connection/find

Запрос

Ответ

Code Block
languagejs
themeRDark
POST /rest-api/connection/find HTTP/1.1
Host: 192.168.1.101:8081
Content-Length: 48
Content-Type: application/json

{
	"appKey":"roomApp",
	"clientVersion":"0.5.18"
}
Code Block
languagejs
themeRDark
HTTP/1.1 200 OK Server: Apache-Coyote/1.1 Content-Type: application/json;charset=UTF-8 Date: Tue, 28 Mar 2017 17:12:38 GMT [ { "custom":{}, "nodeId
102:31049/192.168.1.101:8080",
		"sipRegisterRequired":false,
		"sipLogin":"a5ledkh95o57os4ge5i4ihpqio",
		"sipAuthenticationName":null,
		"sipPassword":null,
		"sipVisibleName":null,
		"sipDomain":null,
		"
appKey":"roomApp", "sessionId":"/192.168.1.102:39564/192.168.1.101:8443", "sipRegisterRequired":false, "sipLogin":"kj32o1iok1bnk33smpjg3g7el0", "sipAuthenticationName":null, "sipPassword"
sipOutboundProxy":null,
		"
sipVisibleName":null, "sipDomain":null, "sipOutboundProxy":null, "
sipPort":0,
		"sipContactParams":null,
		"width":0,
		"height":0,
		"supportedResolutions":"0x0",
		"useProxy":true,
		"useDTLS":true,
		"useWsTunnel":false,
		"useWsTunnelPacketization2":false,
		"useBase64BinaryEncoding":false,
		"mediaProviders":["WebRTC
","WSPlayer
"],
		"appMainClass":null,
		"appCallbackClass":null,
		"authToken":"/192.168.1.102:
39564
31049/192.168.1.101:
8443
8080",
		"status":null,
		"restClientConfig":null,
		"clientVersion":"
0
2.
5
3.
18
0",
		"clientOSVersion":
"5.0 (Windows NT 6.3; Win64; x64) ..."
null,
		"clientBrowserVersion":
"... Chrome/57.0.2987.110 ..."
null
	},{
		"custom":{},
		"nodeId":null,
		"appKey":"
roomApp
defaultApp",
		"sessionId":"/192.168.1.102:
21479
15422/192.168.1.101:
8080
8443",
		"sipRegisterRequired":false,
		"sipLogin":"
e09elik992uig0fk08kddtijp8
sasr7al31j6d1vuuiv9v9vm7ig",
		"sipAuthenticationName":null,
		"sipPassword":null,
		"sipVisibleName":null,
		"sipDomain":null,
		"sipOutboundProxy":null,
		"sipPort":0,
		"sipContactParams":null,
		"width":0,
		"height":0,
		"supportedResolutions":"0x0",
		"useProxy":true,
		"useDTLS":true,
		"useWsTunnel":false,
		"useWsTunnelPacketization2":false,
		"useBase64BinaryEncoding":false,
		"mediaProviders":["
Flash
WebRTC","WSPlayer"],
		"appMainClass":null,
		"appCallbackClass":null,
		"authToken":"/192.168.1.102:
21479
15422/192.168.1.101:
8080
8443",
		"status":null,
		"restClientConfig":null,
		"clientVersion":"0.5.18",
		"clientOSVersion":"5.0 (Windows NT 6.3; 
WOW64
Win64; 
Trident/7.0
x64) ...
.
",
		"clientBrowserVersion":"
Mozilla/5.0 (Windows NT 6.3; WOW64; Trident/7.0
... Chrome/57.0.2987.110 ..."
	}
]


/connection/

...

find

Запрос

Ответ

Code Block
languagejs
themeRDark
POST /rest-api/connection/
terminate
find HTTP/1.1
Host: 192.168.1.101:8081
Content-Length: 
55
48
Content-Type: application/json

{
	"
sessionId
appKey":
"/192.168.1.102:39564/192.168.1.101:8443
"roomApp",
	"clientVersion":"0.5.18"
}
Code Block
languagejs
themeRDark
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Content-
Length
Type: 
0
application/json;charset=UTF-8
Date: Tue, 28 Mar 2017 17:
21
12:
40 GMT

/push/startup

...

Запрос

...

Ответ

...

Code Block
languagejs
themeRDark
POST /rest-api/push/startup HTTP/1.1
Host: 192.168.1.101:8081
Content-Length: 73
Content-Type: application/json

{
	"streamName": "cf58",
	"rtmpUrl":"rtmp://rtmp.flashphoner.com:1935/live/test"
    "rtmpTransponderFullUrl": true
}

...

Code Block
languagejs
themeRDark
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Content-Type: application/json;charset=UTF-8
Date: Fri, 28 Apr 2017 12:53:00 GMT

{
	"mediaSessionId":"6dk1l0m3cm17c68232bccm52f1",
	"streamName":"test",
	"rtmpUrl":"rtmp://rtmp.flashphoner.com:1935/live"
}

/push/find

...

Request

...

Ответ

...

Code Block
languagejs
themeRDark
POST /rest-api/push/find HTTP/1.1
Host: 192.168.1.101:8081
Content-Length: 40
Content-Type: application/json

{
	"rtmpUrl":"rtmp://localhost:1935/live"
}

...

Code Block
languagejs
themeRDark
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Content-Type: application/json;charset=UTF-8
Date: Fri, 28 Apr 2017 12:55:31 GMT

[
	{
		"mediaSessionId":"bung2cu1npigp8u4bd75ha4c5r",
		"streamName":"rtmp_4be7",
		"rtmpUrl":"rtmp://localhost:1935/live"
	},{
		"mediaSessionId":"hs4khbl7g3abmnkeli217lrcmf",
		"streamName":"rtmp_f85d",
		"rtmpUrl":"rtmp://localhost:1935/live"
	}
]

/push/find_all

...

Запрос

...

Ответ

...

Code Block
languagejs
themeRDark
POST /rest-api/push/find_all HTTP/1.1
Host: 192.168.1.101:8081
Content-Length: 0
Content-Type: application/json

...

Code Block
languagejs
themeRDark
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Content-Type: application/json;charset=UTF-8
Date: Fri, 28 Apr 2017 12:56:04 GMT

[
	{
		"mediaSessionId":"6dk1l0m3cm17c68232bccm52f1",
		"streamName":"rtmp_cf58",
		"rtmpUrl":"rtmp://rtmp.flashphoner.com:1935/live"
		},{
		"mediaSessionId":"bung2cu1npigp8u4bd75ha4c5r",
		"streamName":"rtmp_4be7",
		"rtmpUrl":"rtmp://localhost:1935/live"
		},{
		"mediaSessionId":"hs4khbl7g3abmnkeli217lrcmf",
		"streamName":"rtmp_f85d",
		"rtmpUrl":"rtmp://localhost:1935/live"
	}
]

/push/terminate

...

Запрос

...

Ответ

...

Code Block
languagejs
themeRDark
POST /rest-api/push/terminate HTTP/1.1
Host: 192.168.1.101:8081
Content-Length: 48
Content-Type: application/json

{
	"mediaSessionId": "6dk1l0m3cm17c68232bccm52f1"
}

...

Code Block
languagejs
themeRDark
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Content-Length: 0
Date: Fri, 28 Apr 2017 12:56:51

...

38 GMT

[
	{
		"custom":{},
		"nodeId":null,
		"appKey":"roomApp",
		"sessionId":"/192.168.1.102:39564/192.168.1.101:8443",
		"sipRegisterRequired":false,
		"sipLogin":"kj32o1iok1bnk33smpjg3g7el0",
		"sipAuthenticationName":null,
		"sipPassword":null,
		"sipVisibleName":null,
		"sipDomain":null,
		"sipOutboundProxy":null,
		"sipPort":0,
		"sipContactParams":null,
		"width":0,
		"height":0,
		"supportedResolutions":"0x0",
		"useProxy":true,
		"useDTLS":true,
		"useWsTunnel":false,
		"useWsTunnelPacketization2":false,
		"useBase64BinaryEncoding":false,
		"mediaProviders":["WebRTC","WSPlayer"],
		"appMainClass":null,
		"appCallbackClass":null,
		"authToken":"/192.168.1.102:39564/192.168.1.101:8443",
		"status":null,
		"restClientConfig":null,
		"clientVersion":"0.5.18",
		"clientOSVersion":"5.0 (Windows NT 6.3; Win64; x64) ...",
		"clientBrowserVersion":"... Chrome/57.0.2987.110 ..."
	},{
		"custom":{},
		"nodeId":null,
		"appKey":"roomApp",
		"sessionId":"/192.168.1.102:21479/192.168.1.101:8080",
		"sipRegisterRequired":false,
		"sipLogin":"e09elik992uig0fk08kddtijp8",
		"sipAuthenticationName":null,
		"sipPassword":null,
		"sipVisibleName":null,
		"sipDomain":null,
		"sipOutboundProxy":null,
		"sipPort":0,
		"sipContactParams":null,
		"width":0,
		"height":0,
		"supportedResolutions":"0x0",
		"useProxy":true,
		"useDTLS":true,
		"useWsTunnel":false,
		"useWsTunnelPacketization2":false,
		"useBase64BinaryEncoding":false,
		"mediaProviders":["Flash"],
		"appMainClass":null,
		"appCallbackClass":null,
		"authToken":"/192.168.1.102:21479/192.168.1.101:8080",
		"status":null,
		"restClientConfig":null,
		"clientVersion":"0.5.18",
		"clientOSVersion":"5.0 (Windows NT 6.3; WOW64; Trident/7.0...",
		"clientBrowserVersion":"Mozilla/5.0 (Windows NT 6.3; WOW64; Trident/7.0..."
	}
]


/connection/terminate

Запрос

Ответ

Code Block
languagejs
themeRDark
POST /rest-api/
push
connection/
mute
terminate HTTP/1.1
Host:
192.168.1.101:8081
Content-Length: 
48
55
Content-Type: application/json

{
	"
mediaSessionId
sessionId":
"gocrv1ncahlkcqht9k2nbs8tbc
"/192.168.1.102:39564/192.168.1.101:8443"
}
Code Block
languagejs
themeRDark
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Content-Length: 0
Date: 
Mon
Tue, 
03
28 
Jul
Mar 2017 
09
17:
06
21:
14
40 GMT


/push/

...

startup

Запрос

Ответ

Code Block
languagejs
themeRDark
POST /rest-api/push/
unmute
startup HTTP/1.1
Host: 192.168.1.101:8081
Content-Length: 
48
73
Content-Type: application/json

{
	"
mediaSessionId
streamName": "
gocrv1ncahlkcqht9k2nbs8tbc"
cf58",
	"rtmpUrl":"rtmp://rtmp.flashphoner.com:1935/live/test",
    "rtmpTransponderFullUrl": true
}
Code Block
languagejs
themeRDark
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Content-
Length
Type: 
0
application/json;charset=UTF-8
Date: 
Mon
Fri, 
03
28 
Jul
Apr 2017 
09
12:
07
53:
27 GMT
00 GMT

{
	"mediaSessionId":"6dk1l0m3cm17c68232bccm52f1",
	"streamName":"test",
	"rtmpUrl":"rtmp://rtmp.flashphoner.com:1935/live"
}


/push/

...

find

Запрос

Request

Ответ

Code Block
languagejs
themeRDark
POST /rest-api/push/
sound_on
find HTTP/1.1
Host: 192.168.1.101:8081
Content-Length: 
88
40
Content-Type: application/json

{
	"
mediaSessionId
rtmpUrl":
"gocrv1ncahlkcqht9k2nbs8tbc", "soundFile":"sample.wav", "loop": true }

 

"rtmp://localhost:1935/live"
}
Code Block
languagejs
themeRDark
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Content-
Length
Type: 
0
application/json;charset=UTF-8
Date: 
Mon
Fri, 
03
28 
Jul
Apr 2017 
09
12:
11
55:
42 GMT

...

31 GMT

[
	{
		"mediaSessionId":"bung2cu1npigp8u4bd75ha4c5r",
		"streamName":"rtmp_4be7",
		"rtmpUrl":"rtmp://localhost:1935/live"
	},{
		"mediaSessionId":"hs4khbl7g3abmnkeli217lrcmf",
		"streamName":"rtmp_f85d",
		"rtmpUrl":"rtmp://localhost:1935/live"
	}
]


/push/find_all

Запрос

Ответ

Code Block
languagejs
themeRDark
POST /rest-api/push/
sound
find_
off
all HTTP/1.1
Host: 192.168.1.101:8081
Content-Length: 
48
0
Content-Type: application/json
{ "mediaSessionId": "gocrv1ncahlkcqht9k2nbs8tbc" }
Code Block
languagejs
themeRDark
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Content-
Length
Type: 
0
application/json;charset=UTF-8
Date: 
Mon
Fri, 
03
28 
Jul
Apr 2017 
09
12:
12
56:
25 GMT

/pull/rtmp/pull

Запрос

Ответ
04 GMT

[
	{
		"mediaSessionId":"6dk1l0m3cm17c68232bccm52f1",
		"streamName":"rtmp_cf58",
		"rtmpUrl":"rtmp://rtmp.flashphoner.com:1935/live"
		},{
		"mediaSessionId":"bung2cu1npigp8u4bd75ha4c5r",
		"streamName":"rtmp_4be7",
		"rtmpUrl":"rtmp://localhost:1935/live"
		},{
		"mediaSessionId":"hs4khbl7g3abmnkeli217lrcmf",
		"streamName":"rtmp_f85d",
		"rtmpUrl":"rtmp://localhost:1935/live"
	}
]


/push/terminate

Запрос

Ответ

Code Block
languagejs
themeRDark
POST /rest-api/
pull
push/
rtmp/pull
terminate HTTP/1.1
Host: 192.168.1.101:8081
Content-
Type
Length: 
application/json;charset=UTF-8
48
Content-
Length
Type: 
60
application/json

{
	"
uri
mediaSessionId":
"rtmp://rtmp.flashphoner.com:1935/live/rtmp_stream1",
 
"localStreamName":"stream1
"6dk1l0m3cm17c68232bccm52f1"
}
Code Block
languagejs
themeRDark
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Content-Length: 0
Date: 
Thu
Fri, 
23
28 
Nov
Apr 2017 
09
12:
47
56:
23 GMT
51


/

...

push/mute

Запрос

Ответ

Code Block
languagejs
themeRDark
POST /rest-api/
pull/rtmp/find_all
push/mute HTTP/1.1
Host: 192.168.1.101:8081
Content-Length: 
0
48
Content-Type: application/json

{
	"mediaSessionId": "gocrv1ncahlkcqht9k2nbs8tbc"
}
Code Block
languagejs
themeRDark
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Content-
Type
Length: 
application/json;charset=UTF-8
0
Date: 
Fri
Mon, 
24
03 
Nov
Jul 2017 09:06:14
:27:35 GMT [ { "localMediaSessionId":"69695ed6-6e78-455c-9fee-ae1af8d4a0b5", "localStreamName":"stream1", "uri":"rtmp://rtmp.flashphoner.com:1935/live/stream1", "status":"PROCESSED_REMOTE", "hasAudio": true, "hasVideo": true, "record" false },{ "localMediaSessionId":"dfae1a1c-f99b-4e56-9f19-7dc7903ede8d", "localStreamName":"rtmp://wowzaec2demo.streamlock.net/vod/mp4:BigBuckBunny_115k.mov", "uri":"rtmp://wowzaec2demo.streamlock.net/vod/mp4:BigBuckBunny_115k.mov", "status":"PROCESSED_REMOTE", "hasAudio": true, "hasVideo": true, "record" false } ]

...

 GMT


/push/unmute

Запрос

Ответ

Code Block
languagejs
themeRDark
POST /rest-api/push/unmute HTTP/1.1
Host: 192.168.1.101:8081
Content-Length: 48
Content-Type: application/json

{
	"mediaSessionId": "gocrv1ncahlkcqht9k2nbs8tbc"
}
Code Block
languagejs
themeRDark
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Content-Length: 0
Date: Mon, 03 Jul 2017 09:07:27 GMT


/push/sound_on

Запрос

Ответ

Code Block
languagejs
themeRDark
POST /rest-api/push/sound_on HTTP/1.1
Host: 192.168.1.101:8081
Content-Length: 88
Content-Type: application/json

{
	"mediaSessionId": "gocrv1ncahlkcqht9k2nbs8tbc",
	"soundFile":"sample.wav",
	"loop": true
}


 

Code Block
languagejs
themeRDark
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Content-Length: 0
Date: Mon, 03 Jul 2017 09:11:42 GMT


/push/sound_off

Запрос

Ответ

Code Block
languagejs
themeRDark
POST /rest-api/
pull/rtmp/terminate
push/sound_off HTTP/1.1
Host: 192.168.1.101:8081
Content-
Type
Length: 
application/json;charset=UTF-8
48
Content-
Length
Type: 
60
application/json

{
	"
uri
mediaSessionId":
"rtmp://rtmp.flashphoner.com:1935/live/rtmp_stream1
 "gocrv1ncahlkcqht9k2nbs8tbc"
}
Code Block
languagejs
themeRDark
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Content-Length: 0
Date: 
Thu
Mon, 
23
03 
Nov
Jul 2017 09:
47
12:
31
25 GMT


/

...

pull/rtmp/

...

pull

Запрос

Ответ

Code Block
languagejs
themeRDark
POST /rest-api/pull/
mixer
rtmp/
startup
pull HTTP/1.1
HOST
Host: 192.168.1.101:8081
content
Content-
type
Type: application/json
content-length
;charset=UTF-8
Content-Length: 
70
60

{
	"uri":
"
mixer
rtmp://
mixer1", "localStreamName": "mixer1_stream
rtmp.flashphoner.com:1935/live/rtmp_stream1",
    "
hasVideo
localStreamName":
true, "hasAudio": false, "watermark": "watermark.png", "background": "background.png", "mixerLayoutClass": "com.flashphoner.mixerlayout.TestLayout" }
"stream1"
}
Code Block
languagejs
themeRDark
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Content-Length: 0
Date: Thu, 23 Nov 2017 09:47:23 GMT


/pull/rtmp/find_all

Запрос

Ответ

Code Block
languagejs
themeRDark
POST /rest-api/pull/rtmp/find_all HTTP/1.1
Host: 192.168.1.101:8081
Content-Length: 0
Content-Type: application/json
Code Block
languagejs
themeRDark
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Content-
Length
Type: 
0
application/json;charset=UTF-8
Date: Fri, 24 Nov 2017 14:
55
27:
26 GMT

/mixer/add

Запрос

Ответ

Code Block
languagejs
themeRDark
POST /rest-api/mixer/add HTTP/1.1 HOST: 192.168.1.101:8081 content-type: application/json content-length: 99 { "uri": "mixer://mixer1", "remoteStreamName":
35 GMT

[
	{
		"localMediaSessionId":"69695ed6-6e78-455c-9fee-ae1af8d4a0b5",
		"localStreamName":"stream1",
		"uri":"rtmp://rtmp.flashphoner.com:1935/live/stream1"
}
Code Block
languagejs
themeRDark
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Content-Length: 0
Date: Fri, 24 Nov 2017 15:21:06 GMT

/mixer/remove

...

Запрос

...

Ответ

...

Code Block
languagejs
themeRDark
POST /rest-api/mixer/remove HTTP/1.1
HOST: 192.168.1.101:8081
content-type: application/json
content-length: 99

{
	"uri": "mixer://mixer1",
	"remoteStreamName": "rtmp://rtmp.flashphoner.com:1935/live/stream1"
}

...

Code Block
languagejs
themeRDark
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Content-Length: 0
Date: Fri, 24 Nov 2017 15:21:12 GMT

...

,
		"status":"PROCESSED_REMOTE",
        "hasAudio": true,
        "hasVideo": true,
        "record" false
	},{
		"localMediaSessionId":"dfae1a1c-f99b-4e56-9f19-7dc7903ede8d",
		"localStreamName":"rtmp://wowzaec2demo.streamlock.net/vod/mp4:BigBuckBunny_115k.mov",
		"uri":"rtmp://wowzaec2demo.streamlock.net/vod/mp4:BigBuckBunny_115k.mov",
		"status":"PROCESSED_REMOTE",
        "hasAudio": true,
        "hasVideo": true,
        "record" false
	}
]


/pull/rtmp/terminate

Запрос

Ответ

Code Block
languagejs
themeRDark
POST /rest-api/
mixer/find_all
pull/rtmp/terminate HTTP/1.1
HOST
Host: 192.168.1.101:8081
content
Content-
type
Type: application/json
content-length: 0
;charset=UTF-8
Content-Length: 60

{
	"uri":"rtmp://rtmp.flashphoner.com:1935/live/rtmp_stream1"
}
Code Block
languagejs
themeRDark
HTTP/1.1 200 OK
Access-Control-Allow-Origin
Server: 
* Access-Control-Allow-Credentials: true Content-Type: application/json
Apache-Coyote/1.1
Content-Length: 
574 [ { "localMediaSessionId": "e2fa5c8b-16f3-4917-9d5f-557dde75db07", "localStreamName": "m1",
0
Date: Thu, 23 Nov 2017 09:47:31 GMT


/mixer/startup

Запрос

Ответ

Code Block
languagejs
themeRDark
POST /rest-api/mixer/startup HTTP/1.1
HOST: 192.168.1.101:8081
content-type: application/json
content-length: 70

{
	"uri": "mixer://
m1
mixer1",
"status
	"localStreamName": "
PROCESSED
mixer1_
LOCAL
stream",
    "
hasAudio": true, "
hasVideo": true,
    "
record
hasAudio": false,
    "
mediaSessions
watermark":
[ {
 
"localMediaSessionId": "3dd763b0-2ae7-11eb-aa72-37b2cbcbf6b9"
"watermark.png",
    
"
audioLevel
background": 
0, "videoMuted": true,
"background.png",
    
"
localStreamName
mixerLayoutClass": "
stream1" }, { "localMediaSessionId": "8af64760-2ae7-11eb-b086-cdf035231b9d", "audioLevel": 100,
com.flashphoner.mixerlayout.TestLayout"
}
Code Block
languagejs
themeRDark
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Content-Length: 0
Date: Fri, 24 Nov 2017 14:55:26 GMT


/mixer/add

Запрос

Ответ

Code Block
languagejs
themeRDark
POST /rest-api/mixer/add HTTP/1.1
Host: localhost:8081
Content-Type: application/json
Content-Length: 85

{
 "uri": "mixer://m1",
 "remoteStreamName": "stream1",
 "audioLevel": 0,
 "videoMuted": false
, "localStreamName": "desktop" }, { "localMediaSessionId": "7cc4b410-2ae7-11eb-b34c-a5240fe9f151", "audioLevel": 0, "videoMuted": false, "localStreamName": "stream2" } ] } ]

...


}
Code Block
languagejs
themeRDark
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Content-Length: 0
Date: Fri, 09 Jul 2021 15:21:06 GMT


/mixer/remove

Запрос

Ответ

Code Block
languagejs
themeRDark
POST /rest-api/mixer/
terminate
remove HTTP/1.1
HOST: 192.168.1.101:8081
content-type: application/json
content-length: 
31
99

{
	"uri": "mixer://mixer1"
} Code Blocklanguagejstheme
,
	"remoteStreamName": "rtmp://rtmp.flashphoner.com:1935/live/stream1"
}
Code Block
languagejs
themeRDark
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Content-Length: 0
Date: Fri, 24 Nov 2017 
14
15:
55
21:
35
12 GMT

 


/mixer/

...

find_all

Запрос

Ответ

Code Block
languagejs
themeRDark
POST /rest-api/mixer/test/start HTTP/1.1 HOST: 192.168.1.101:8081 Content-type: application/json Content-length: 107 { "feedingStreams": [ "s1", "s2" ]

Запрос

Ответ

Code Block
languagejs
themeRDark
POST /rest-api/mixer/setAudioVideofind_all HTTP/1.1
HostHOST: localhost192.168.1.101:8081
Accept: */*
Content-Typecontent-type: application/json
Contentcontent-Lengthlength: 62
 
{
 "uri": "mixer://m1",
 "streams": "^stream.*",
 "audioLevel": 0,
 "videoMuted": true
}
Code Block
languagejs
themeRDark
HTTP/1.1 200 OK
Access-Control-Allow-Origin: *
Access-Control-Allow-Credentials: true
Content-Type: application/json
Content-Length: 0
Date: Fri, 24 Nov 2020 14:55:35 GMT

 

/mixer/test/start

574
 
[
  {
    "localMediaSessionId": "e2fa5c8b-16f3-4917-9d5f-557dde75db07",
    "localStreamName": "m1",
    "uri": "mixer://m1",
    "status": "PROCESSED_LOCAL",
    "hasAudio": true,
    "
mixerCount
hasVideo": 
3
true,
    "
streamsInMixer
record": 
1
false,
    "
intervalInSeconds
mediaSessions": 
60 }
Code Block
languagejs
themeRDark
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Content-Length: 0
Date: Wed, 22 Aug 2018 08:53:26 GMT

/mixer/test/stop

...

Запрос

...

Ответ

...

Code Block
languagejs
themeRDark
POST /rest-api/mixer/test/stop HTTP/1.1
HOST: 192.168.1.101:8081
Content-type: application/json
Content-length: 0

{
}


...

Code Block
languagejs
themeRDark
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Content-Length: 0
Date: Wed, 22 Aug 2018 08:53:26 GMT

/mixer/test/get_start_example

Запрос

Ответ

Code Block
languagejs
themeRDark
POST /rest-api/mixer/test/get_start_example HTTP/1.1
HOST: 192.168.1.101:8081
Content-type: application/json
Content-length: 0

{
}


Code Block
languagejs
themeRDark
HTTP/1.1 200 OK Server: Apache-Coyote/1.1 Content-Length: 107 Date: Wed, 22 Aug 2018 08:53:26 GMT { "feedingStreams": [
[
      {
        "localMediaSessionId": "3dd763b0-2ae7-11eb-aa72-37b2cbcbf6b9",
        "audioLevel": 0,
        "videoMuted": true,
        "localStreamName": "stream1"
      },
      {
        "localMediaSessionId": "8af64760-2ae7-11eb-b086-cdf035231b9d",
        "
stream1
audioLevel": 100,
        "
stream2
videoMuted": false,
        "localStreamName": "
stream3
desktop"
    
],
  },
      {
        "localMediaSessionId": "7cc4b410-2ae7-11eb-b34c-a5240fe9f151",
        "
mixerCount
audioLevel": 
3
0,
        "
streamsInMixer
videoMuted": 
1
false,
        "
intervalInSeconds
localStreamName": 
60 }

...

"stream2"
      }
    ]
  }
]


/mixer/terminate

Запрос

Ответ

Code Block
languagejs
themeRDark
POST /rest-api/
pull
mixer/
pull
terminate HTTP/1.1
Host
HOST: 192.168.1.101:8081
Content
content-
Type
type: application/json
;charset=UTF-8 Content-Length

content-length: 
60
31

{
	"uri": "
wss
mixer://
demo.flashphoner.com:8443/websocket" "localStreamName": "6602" "remoteStreamName": "6602"
mixer1"
}
Code Block
languagejs
themeRDark
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Content-Length: 0
Date: 
Thu
Fri, 
23
24 Nov 2017 
09
14:
47
55:
23
35 GMT


 

/

...

mixer/

...

setAudioVideo

Запрос

Ответ

Code Block
languagejs
themeRDark
POST /rest-api/
pull
mixer/
find_all
setAudioVideo HTTP/1.1
Host: 
192.168.1.101:8081
localhost:8081
Accept: */*
Content-
Length
Type: 
0
application/json
Content-
Type: application/json
Length: 62
 
{
 "uri": "mixer://m1",
 "streams": "^stream.*",
 "audioLevel": 0,
 "videoMuted": true
}
Code Block
languagejs
themeRDark
HTTP/1.1 200 OK
Server
Access-Control-Allow-Origin: 
Apache-Coyote/1.1
*
Access-Control-Allow-Credentials: true
Content-
Type
Length: 
application/json;charset=UTF-8
0
Date: Fri, 24 Nov 
2017
2020 14:
27
55:35 GMT


 

/mixer/set_body_watermark

Запрос

Ответ

Code Block
languagejs
themeRDark
POST /rest-api/mixer/set_body_watermark HTTP/1.1
[ { "localMediaSessionId":"da157e2b-2159-40c9-9560-ae1af8d4a0b5", "remoteMediaSessionId":null, "localStreamName":"6602", "remoteStreamName":"660s", "uri":"wss://demo.flashphoner.com:8443/websocket", "status":"NEW" } ]

/pull/push

Запрос

Ответ

Host: localhost:8081
Accept: */*
Content-Type: application/json
Content-Length: 68

{
 "uri":"mixer://m1",
 "watermark":"/opt/media/logo.png",
 "x":10,
 "y":10
}
Code Block
languagejs
themeRDark
POST /rest-api/pull/pull
HTTP/1.1
Host: 192.168.1.101:8081 Content-Type: application/json;charset=UTF-8
 200 OK
Access-Control-Allow-Origin: *
Access-Control-Allow-Credentials: true
Content-Length: 
60 { "uri":"wss://demo.flashphoner.com:8443/websocket" "localStreamName": "0d40" "remoteStreamName": "0d40" }
Code Block
languagejs
themeRDark
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Content-Length: 0
Date: Thu, 23 Nov 2017 09:47:23 GMT

...

0
Date: Fri, 19 Aug 2022 14:55:35 GMT


 

/mixer/set_stream_watermark

Запрос

Ответ

Code Block
languagejs
themeRDark
POST /rest-api/
pull/terminate
mixer/set_stream_watermark HTTP/1.1
HOST
Host: 
192.168.1.101
localhost:8081
content-type
Accept: */*
Content-Type: application/json
content
Content-
length
Length: 
31
124

{
 "uri":
"
wss
mixer://
demo.flashphoner.com:8443/websocket"
m1",
 "watermark":"/opt/media/logo.png",
 "mediaSessionId":"f2019570-1f9d-11ed-b6ef-050068a3a458",
 "x":10,
 "y":10
}
Code Block
languagejs
themeRDark
HTTP/1.1 200 OK
Server
Access-Control-Allow-Origin: 
Apache-Coyote/1.1
*
Access-Control-Allow-Credentials: true
Content-Length: 0
Date: Fri, 
24
19 
Nov
Aug 
2017
2022 14:55:35 GMT


 

/

...

mixer/

...

set_

...

parameter

Запрос

Ответ

Code Block
languagejs
themeRDark
POST /rest-api/
logger
mixer/
enable
set_
client_log
parameter HTTP/1.1
HOST
Host: 
192.168.1.101
localhost:8081
content
Content-
type
Type: application/json
content
Content-
length
Length: 
71
55

{
 "
sessionId
uri":
"
/127.0.0.1:57539/192.168.1.101:8443
mixer://m1",
 "
logLevel
mixerLayoutDir":
"
DEBUG
/opt/GridLayout"
}
Code Block
languagejs
themeRDark
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1 Content-Length: 0 Date: Wed, 03 Sep 2018 06:58:40 GMT

...

Access-Control-Allow-Origin: *
Access-Control-Allow-Credentials: true
Content-Length: 0
Date: Mon, 14 Nov 2022 14:55:35 GMT


 

/mixer/set_stream_avatar

Запрос

Ответ

Code Block
languagejs
themeRDark
POST /rest-api/
logger
mixer/
disable
set_
client
stream_
log
avatar HTTP/1.1
HOST
Host: 
192.168.1.101
localhost:8081
content
Content-
type
Type: application/json
content
Content-
length
Length: 
71
74

{
"sessionId": "/127.0.0.1:57539/192.168.1.101:8443
 "uri":"mixer://m1",
 "remoteStreamName":"user2",
 "avatar":"/opt/avatar.png"
}
Code Block
languagejs
themeRDark
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1 Content-Length: 0 Date: Wed, 03 Sep 2018 06:58:40 GMT

...

Access-Control-Allow-Origin: *
Access-Control-Allow-Credentials: true


 

/mixer/remove_stream_avatar

Запрос

Ответ

Code Block
languagejs
themeRDark
POST /rest-api/
cdn
mixer/
show
remove_stream_
nodes
avatar HTTP/1.1
HOST
Host: 
192.168.1.101
localhost:8081
content
Content-
type
Type: application/json
content-length: 0
Content-Length: 47

{
 "uri":"mixer://m1",
 "remoteStreamName":"user2"
}
Code Block
languagejs
themeRDark
HTTP/1.1 200 OK
Server: Apache-Coyote

Access-Control-Allow-Origin: *
Access-Control-Allow-Credentials: true


 

/mixer/test/start

Запрос

Ответ

Code Block
languagejs
themeRDark
POST /rest-api/mixer/test/start HTTP/1.1
HOST: 192.168.1.101:8081
Content-
Length
type: 
224 Date: Thu, 06 Dec 2018 4:16:40 GMT [ { "globalState": "ACTIVE",
application/json
Content-length: 107

{
	"feedingStreams": [
		"s1",
		"s2"
    ],
    "
id
mixerCount": 
"192.168.1.64"
3,
    
"
processingState
streamsInMixer": 
"NEW_STREAMS_ALLOWED"
1,
    
"
role
intervalInSeconds": 
"TRANSCODER" }, { "globalState": "ACTIVE", "id": "192.168.1.39", "processingState": "NEW_STREAMS_ALLOWED", "role": "ORIGIN" } ]

...

60
}
Code Block
languagejs
themeRDark
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Content-Length: 0
Date: Wed, 22 Aug 2018 08:53:26 GMT


/mixer/test/stop

Запрос

Ответ

Code Block
languagejs
themeRDark
POST /rest-api/mixer/
cdn
test/
show_routes
stop HTTP/1.1
HOST: 192.168.1.101:8081
content
Content-type: application/json
content
Content-length: 0

{
}


Code Block
languagejs
themeRDark
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Content-Length: 
26
0
Date: 
Thu
Wed, 
06
22 
Dec
Aug 2018 
4
08:
16
53:
40
26 GMT
{ "0-192.168.1.5-0": "test" }

...


/mixer/test/get_start_example

Запрос

Ответ

Code Block
languagejs
themeRDark
POST /rest-api/
cdn/show_state
mixer/test/get_start_example HTTP/1.1
HOST: 192.168.1.101:8081
content
Content-type: application/json
content
Content-length: 0

{
}


Code Block
languagejs
themeRDark
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Content-Length: 
19
107
Date: 
Thu
Wed, 
06
22 
Dec
Aug 2018 
8
08:53:26
:44
 GMT

{
[ "NEW_STREAMS_ALLOWED" ]

...

    "feedingStreams": [
        "stream1",
        "stream2",
        "stream3"
    ],
    "mixerCount": 3,
    "streamsInMixer": 1,
    "intervalInSeconds": 60
}



/pull/pull

Запрос

Ответ

Code Block
languagejs
themeRDark
POST /rest-api/
cdn
pull/
enforce_state
pull HTTP/1.1
HOST
Host: 192.168.1.101:8081
content
Content-
type
Type: application/json
content-length
;charset=UTF-8
Content-Length: 
44
60

{
	"uri":"wss://demo.flashphoner.com:8443/websocket",
	
"state
"localStreamName": "6602",
	"remoteStreamName": "
GROUP_CONNECTIONS_ALLOWED
6602"
}
Code Block
languagejs
themeRDark
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Content-Length: 0
Date: Thu, 
06
23 
Dec
Nov 
2018
2017 
8
09:
36
47:
30
23 GMT


/

...

pull/

...

find_

...

all

Запрос

Ответ

Code Block
languagejs
themeRDark
POST /rest-api/
cdn
pull/
stream/show
find_
routes
all HTTP/1.1
HOST
Host: 192.168.1.101:8081
content
Content-
type
Length: 
application/json
0
content
Content-
length: 30 { "streamName":"test-profile1" }
Type: application/json
Code Block
languagejs
themeRDark
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Content-
Length
Type: 
411
application/json;charset=UTF-8
Date: 
Mon
Fri, 
07
24 
Jan
Nov 
2018
2017 
4
14:
16
27:
40
35 GMT

[
	{
"REQUESTED-PROFILE": [ "AUDIO{bitrate=0, codec='opus', rate=48000, channels=0}", "VIDEO{width=640, height=360, gop=90, fps=30, bitrate=0, codec='h264', codecImpl='OPENH264', quality=null}" ], "1-NEW-TRANSCODER-95.191.131.64": [], "2-PROXY-95.191.130.39": [ "AUDIO{bitrate=0, codec='opus', rate=48000, channels=2}", "VIDEO{width=0, height=0, gop=null, fps=null, bitrate=0, codec='H264', codecImpl='null', quality=null}" ] }

...

		"localMediaSessionId":"da157e2b-2159-40c9-9560-ae1af8d4a0b5",
		"remoteMediaSessionId":null,
		"localStreamName":"6602",
		"remoteStreamName":"660s",
		"uri":"wss://demo.flashphoner.com:8443/websocket",
		"status":"NEW"
	}
]


/pull/push

Запрос

Ответ

Code Block
languagejs
themeRDark
POST /rest-api/pull/pull HTTP/1.1
Host: 192.168.1.101:8081
Content-Type: application/json;charset=UTF-8
Content-Length: 60

{
	"uri":"wss://demo.flashphoner.com:8443/websocket",
	"localStreamName": "0d40",
	"remoteStreamName": "0d40"
}
Code Block
languagejs
themeRDark
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Content-Length: 0
Date: Thu, 23 Nov 2017 09:47:23 GMT


/pull/terminate

Запрос

Ответ

Code Block
languagejs
themeRDark
POST /rest-api/
cdn
pull/
stream/access_list/add HTTP/1.1 Content-Type
terminate HTTP/1.1
HOST: 192.168.1.101:8081
content-type: application/json
Host: test
content-length: 31

{
	"uri": "wss://demo.flashphoner.com:
8081
8443/websocket"
}
Code Block
languagejs
themeRDark
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Content-Length: 
39
0
Date: Fri, 24 Nov 2017 14:55:35 GMT


 


/logger/enable_client_log

ЗапросОтвет
Code Block
languagejs
themeRDark
POST /rest-api/logger/enable_client_log HTTP/1.1
HOST: 192.168.1.101:8081
content-type: application/json
content-length: 71

{
	"sessionId": "/127.0.0.1:57539/192.168.1.101:8443",
	"logLevel": "DEBUG"
}
Code Block
languagejs
themeRDark
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Content-Length: 0
Date: Wed, 03 Sep 2018 06:58:40 GMT


/logger/disable_client_log

ЗапросОтвет
Code Block
languagejs
themeRDark
POST /rest-api/logger/disable_client_log HTTP/1.1
HOST: 192.168.1.101:8081
content-type: application/json
content-length: 71

{
	"sessionId": "/127.0.0.1:57539/192.168.1.101:8443"
}
Code Block
languagejs
themeRDark
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Content-Length: 0
Date: Wed, 03 Sep 2018 06:58:40 GMT


/cdn/show_nodes

ЗапросОтвет
Code Block
languagejs
themeRDark
POST /rest-api/cdn/show_nodes HTTP/1.1
HOST: 192.168.1.101:8081
content-type: application/json
content-length: 0
Code Block
languagejs
themeRDark
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Content-Length: 224
Date: Thu, 06 Dec 2018 4:16:40 GMT


[
	{
        "globalState": "ACTIVE",
        
{
"id": "192.168.1.64",
        "processingState": "NEW_STREAMS_ALLOWED",
        "role": "TRANSCODER"
    },
    {
        
"globalState": "ACTIVE",
        
"
keys
id": 
[
"192.168.1.39",
        "processingState": "NEW_STREAMS_ALLOWED",
        "role": "ORIGIN"
    
"key1", "key2" ], "name": "test" }
}
]


/cdn/show_routes

ЗапросОтвет
Code Block
languagejs
themeRDark
POST /rest-api/cdn/show_routes HTTP/1.1
HOST: 192.168.1.101:8081
content-type: application/json
content-length: 0
Code Block
languagejs
themeRDark
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Content-Length: 26
Date: Thu, 06 Dec 2018 4:16:40 GMT

{
    "0-192.168.1.5-0": "test"
}


/cdn/show_state

ЗапросОтвет
Code Block
languagejs
themeRDark
POST /rest-api/cdn/show_state HTTP/1.1
HOST: 192.168.1.101:8081
content-type: application/json
content-length: 0
Code Block
languagejs
themeRDark
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Content-Length: 19
Date: Thu, 06 Dec 2018 8:26:44 GMT

[
	"NEW_STREAMS_ALLOWED"
]


/cdn/enforce_state

ЗапросОтвет
Code Block
languagejs
themeRDark
POST /rest-api/cdn/enforce_state HTTP/1.1
HOST: 192.168.1.101:8081
content-type: application/json
content-length: 44

{
	"state": "GROUP_CONNECTIONS_ALLOWED"
}
Code Block
languagejs
themeRDark
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Content-Length: 0
Date: Thu, 06 Dec 2018 8:36:30 GMT


/cdn/stream/show_routes

ЗапросОтвет Code Block
languagejs
themeRDark
POST /rest-api/cdn/stream/access_list/remove HTTP/1.1 Content-Length: 32
ЗапросОтвет
Code Block
languagejs
themeRDark
POST /rest-api/cdn/stream/show_routes HTTP/1.1
HOST: 192.168.1.101:8081
content-type: application/json
content-length: 30

{
	"streamName":"test-profile1"
}
Code Block
languagejs
themeRDark
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Content-Length: 411
Date: Mon, 07 Jan 2018 4:16:40 GMT

{
    "REQUESTED-PROFILE": [
        "AUDIO{bitrate=0, codec='opus', rate=48000, channels=0}",
                 "VIDEO{width=640, height=360, gop=90, fps=30, bitrate=0, codec='h264', codecImpl='OPENH264', quality=null}"
    ],
            
Code Block
languagejs
themeRDark
HTTP/1.1 200 OK
Access-Control-Allow-Origin: *
Content-Type: application/json

/cdn/stream/access_list/remove

"1-NEW-TRANSCODER-95.191.131.64": [],
    "2-PROXY-95.191.130.39": [
        "AUDIO{bitrate=0, codec='opus', rate=48000, channels=2}",
        "VIDEO{width=0, height=0, gop=null, fps=null, bitrate=0, codec='H264', codecImpl='null', quality=null}"
    ]
}


/cdn/stream/access_list/add

ЗапросОтвет
Code Block
languagejs
themeRDark
POST 
/rest-api/cdn/stream/access_list/add HTTP/1.1
Content-Type: application/json
Host: test.flashphoner.com:8081                        
Host: test.flashphoner.com:8081
    
Content-Length: 39                          
      
                                               
{
   
{                                                 
	"keys": [                                     

		"key1",                                   
		"key2"      
    
],
                          
    ],                 
    
"name":
 
"test"
                      

}
    "name": "test"                                

}                                                 
Code Block
languagejs
themeRDark
HTTP/1.1 200 OK
Access-Control-Allow-Origin: *
Content-Type: application/json


/cdn/stream/access_list/

...

remove

ЗапросОтвет
Code Block
languagejs
themeRDark
POST /rest-api/cdn/stream/access_list/
print
remove HTTP/1.1
Content-Length: 
15
32                                   
Content-Type: application/json                       
Host: test.flashphoner.com:8081                       
                                                     
{                                                    
	"
name
keys": 
"test"
[                                  
}
      
		"key1"                                       
    ],                                               
    "name": "test"                                   
}              
Code Block
languagejs
themeRDark
HTTP/1.1
 
200
 
OK
               
Access-Control-Allow-Origin:
 
* Content-Length:
 
8
             
Content-Type:
 
application/json
                              
[
                       
Code Block
languagejs
themeRDark
HTTP/1.1 200 
"key2" ]
OK
Access-Control-Allow-Origin: *
Content-Type: application/json


/cdn/stream/access_list/

...

print

ЗапросОтвет
Code Block
languagejs
themeRDark
POST /rest-api/cdn/stream/access_list/
delete
print HTTP/1.1
Content-Length: 15
                                  
Content-Type: application/json                      

Host: test.flashphoner.com:8081                      

                                                    

{
                                                   
	"name": "test"
                                  
}                                                                                                                                                      
Code Block
languagejs
themeRDark
HTTP/1.1 200 OK               
Access-Control-Allow-Origin: *
Content-
Type: application/json

/cdn/profile/add

ЗапросОтвет Code Block
languagejs
themeRDark
POST /rest-api/cdn/profile/add HTTP/1.1 Content-Length: 502
Length: 8             
Content-Type: application/json
                              
[     
Content-Type:
 
application/json
                       
Host:
 
test.flashphoner.com:8081
   "key2"                    
]                             
{ "name": "-profile1", "profile": {


/cdn/stream/access_list/delete

ЗапросОтвет
Code Block
languagejs
themeRDark
POST /rest-api/cdn/stream/access_list/delete HTTP/1.1
Content-Length: 15        "audio": {
            "type": "audio"
            "bitrate": 0,
Content-Type: application/json           "channels": 0,
            "codec": "opus",

Host: test.flashphoner.com:8081              "rate": 48000,
       	},
		"video": {
			"type": "video",
            "bitrate": 0,
            "codec": "h264",
            "codecImpl": "FF",
              
{               "fps": 30,
                        "gop": 90,
            
	"heightname": 360,
 "test"             "quality": 0,
            "width": 640
        }
	}
}                                                                                                                                                       
Code Block
languagejs
themeRDark
HTTP/1.1 200 OK
Access-Control-Allow-Origin: *
Content-Type: application/json


/cdn/profile/

...

add

ЗапросОтвет
Code Block
languagejs
themeRDark
POST /rest-api/cdn/profile/
modify
add HTTP/1.1
Content-Length: 
15
502                                   
Content-Type: application/json                       
Host: test.flashphoner.com:8081                       
                                  

{
	"name": "-profile1",
	"profile": {
"video
        "audio": {
"bitrate
            "type": 
400, "quality
"audio"
            "bitrate": 
25
0,
         
} } }
Code Block
languagejs
themeRDark
HTTP/1.1 200 OK
Access-Control-Allow-Origin: *
Content-Type: application/json

/cdn/profile/print

ЗапросОтвет Code Block
languagejs
themeRDark
POST /rest-api/cdn/profile/print HTTP/1.1 Content-Length: 0
   "channels": 0,
            "codec": "opus",
            "rate": 48000,
       	},
		"video": 
Content-Type: application/json
{
			"type": "video",
            "bitrate": 0,
           
Host: test.flashphoner.com:8081
 "codec": "h264",
            
"codecImpl": "FF",
            "fps": 30,
            "gop": 90,
            "height": 360,
            "quality": 0,
            "width": 640
        }
	}
}                                                                                                                                                       
Code Block
languagejs
themeRDark
HTTP/1.1 200 OK
Access-Control-Allow-Origin: *
Content-Type: application/json
[ "-240p": {


/cdn/profile/modify

ЗапросОтвет
Code Block
languagejs
themeRDark
POST /rest-api/cdn/profile/modify HTTP/1.1
Content-Length: 15        
"audio":
 
{
        
"bitrate":
 
0,
        
"channels":
 
0,
        
"codec": "opus",

Content-Type: application/json        
"rate":
 
48000,
        
"type": "audio"
      
},

Host: test.flashphoner.com:8081    
"video":
 
{
        
"bitrate":
 
0,
        
"codec":
 
"h264",

        
"codecImpl":
 
"FF",
        
"fps":
 
25,
        
"gop":
 
50,
        
"height":
 
240,
        
"preset":
 
"veryfast",
        
"quality": 0, "type

{
	"name": "
video
-profile1",
	
"width
"profile": 
0
{
	
}
	
}, "-480p
"video": {
	
"audio
		"bitrate": 
{
400,
	
"bitrate
		"quality": 
0,
25
        
"channels": 0, "codec": "opus",
}
	}
}
Code Block
languagejs
themeRDark
HTTP/1.1 200 OK
Access-Control-Allow-Origin: *
Content-Type: application/json


/cdn/profile/print

ЗапросОтвет
Code Block
languagejs
themeRDark
POST /rest-api/cdn/profile/print HTTP/1.1
Content-Length: 0             "rate": 48000,
	        "type": "audio"
	    },
	    "video": {
	   
Content-Type: application/json    "bitrate": 0,
	        "codec": "h264",
	        "codecImpl": "FF",
	 
Host: test.flashphoner.com:8081       "fps": 25,
	        "gop": 50,
	        "height": 480,
	        "preset": "veryfast",
	        "quality": 0,
	        "type": "video",
	        "width": 0
	    }
	}
]

/cdn/profile/remove

ЗапросОтвет Code Block
languagejs
themeRDark
POST
 
/rest-api/cdn/profile/remove
 
HTTP/1.1 Content-Length:
 
15
                                   
Content-Type:
 
application/json
                       
Host:
 
test.flashphoner.com:8081
                       
                                                     
{
                      
Code Block
languagejs
themeRDark
HTTP/1.1 200 OK
Access-Control-Allow-Origin: 
*
Content-Type: application/json

[
	"-240p": {
	    "audio": {
	        "bitrate": 0,
	        
"
name
channels": 
"-profile1" }
0,
	        "codec": "opus",
	        "rate": 48000,
	        "type": "audio"
	    },
	    "video": {
	        "bitrate": 0,
	        "codec": "h264",
	        "codecImpl": "FF",
	        "fps": 25,
	        "gop": 50,
	        "height": 240,
	        "preset": "veryfast",
	        "quality": 0,
	        "type": "video",
	        "width": 0
    	}
	},
	"-480p": {
	    "audio": {
	        "bitrate": 0,
	      
Code Block
languagejs
themeRDark
HTTP/1.1
 
200 OK Access-Control-Allow-Origin: * Content-Type: application/json

/cdn/remove_node

ЗапросОтвет Code Block
languagejs
themeRDark
POST /rest-api/cdn/remove_node HTTP/1.1 Content-Length: 15
 "channels": 0,
	        "codec": "opus",
	        "rate": 48000,
	        "type": "audio"
	    },
	    
Content-Type: application/json
"video": {
	        "bitrate": 0,
	        "codec": "h264",
	      
Host: test.flashphoner.com:8081
  "codecImpl": "FF",
	        "fps": 25,
	        "gop": 50,
	    
    "height": 480,
	        "preset": "veryfast",
	        "quality": 0,
	        "type": "video",
	        "width": 0
	    }
	}
]


/cdn/profile/remove

ЗапросОтвет
Code Block
languagejs
themeRDark
POST /rest-api/cdn/profile/remove HTTP/1.1
Content-Length: 15     
{                              
Content-Type: application/json                       
	"nodeIp"Host: "192test.168.1.207flashphoner.com:8081                       
                                                     
{                                                    
	"name": "-profile1"
}                                                                                                                                                       
Code Block
languagejs
themeRDark
HTTP/1.1 200 OK
Access-Control-Allow-Origin: *
Content-Type: application/json


/cdn/remove_node

ЗапросОтвет
Code Block
languagejs
themeRDark
POST /rest-api/cdn/remove_node HTTP/1.1
Content-Length: 15                                   
Content-Type: application/json                       
Host: test.flashphoner.com:8081                       
                                                     
{                                                    
	"nodeIp": "192.168.1.207"
}
Code Block
languagejs
themeRDark
HTTP/1.1 200 OK
Access-Control-Allow-Origin: *
Content-Type: application/json

/cdn/connection/reset_inbound

ЗапросОтвет
Code Block
languagejs
themeRDark
POST /rest-api/cdn/connection/reset_inbound HTTP/1.1
Content-Length: 15                                   
Content-Type: application/json                       
Host: test.flashphoner.com:8081                       
                                                     
{                                                    
	"nodeId": "192.168.1.207"
}
Code Block
languagejs
themeRDark
HTTP/1.1 200 OK
Access-Control-Allow-Origin: *
Content-Type: application/json

/cdn/connection/reset_outbound

ЗапросОтвет
Code Block
languagejs
themeRDark
POST /rest-api/cdn/connection/reset_outbound HTTP/1.1
Content-Length: 15                                   
Content-Type: application/json                       
Host: test.flashphoner.com:8081                       
                                                     
{                                                    
	"nodeId": "192.168.1.207"
}
Code Block
languagejs
themeRDark
HTTP/1.1 200 OK
Access-Control-Allow-Origin: *
Content-Type: application/json

/cdn/connection/reset_all

ЗапросОтвет
Code Block
languagejs
themeRDark
POST /rest-api/cdn/connection/reset_all HTTP/1.1
Content-Length: 0                                   
Content-Type: application/json                       
Host: test.flashphoner.com:8081                       
Code Block
languagejs
themeRDark
HTTP/1.1 200 OK
Access-Control-Allow-Origin: *
Content-Type: application/json

/recorder/startup

ЗапросОтвет
Code Block
languagejs
themeRDark
POST /rest-api/recorder/startup HTTP/1.1
Content-Length: 52
Content-Type: application/json                       
Host: test.flashphoner.com:8081                       
                                                     
{
	"mediaSessionId": "5a072377-73c1-4caf-abd3",
		"config": {
			"fileTemplate": "{streamName}-{startTime}-{endTime}",
			"rotation": "20M"
		}
}
Code Block
languagejs
themeRDark
HTTP/1.1 200 OK
Access-Control-Allow-Origin: *
Content-Type: application/json


/recorder/terminate

ЗапросОтвет
Code Block
languagejs
themeRDark
POST /rest-api/recorder/terminate HTTP/1.1
Content-Length: 26                                   
Content-Type: application/json                       
HOST: 192.168.1.101:8081
                                                     
{
	"mediaSessionId": "5a072377-73c1-4caf-abd3"
}
Code Block
languagejs
themeRDark
HTTP/1.1 200 OK
Access-Control-Allow-Origin: *
Content-Type: application/json


/recorder/find_all

ЗапросОтвет
Code Block
languagejs
themeRDark
POST /rest-api/recorder/find_all HTTP/1.1
HOST: 192.168.1.101:8081
content-type: application/json
content-length: 0

Code Block
languagejs
themeRDark
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Content-Length: 125
Date: Thu, 06 Dec 2018 4:16:40 GMT

[
    {
        "fileName": "9c3e-test-1563776083752-{endTime}.mp4",
        "mediaSessionId": "5a072377-73c1-4caf-abd3"
    }
]

/multipleRecorder/startup

ЗапросОтвет
Code Block
languagejs
themeRDark
POST /rest-api/multipleRecorder/startup HTTP/1.1
Host: localhost:9091
Content-type: application/json
Content-Length: 22                       
                                                     
{
	"uri": "multi-recorder://test-record"
}
Code Block
languagejs
themeRDark
HTTP/1.1 200 OK
Access-Control-Allow-Origin: *

/multipleRecorder/add

ЗапросОтвет
Code Block
languagejs
themeRDark
POST /rest-api/multipleRecorder/add HTTP/1.1
Host: localhost:9091
Content-type: application/json
Content-Length: 78                       
                                                     
{
	"uri": "multi-recorder://test-record",
    "mediaSessionId": "d010f9a0-fe34-11eb-9d0a-fb2207ead79d"
}
Code Block
languagejs
themeRDark
HTTP/1.1 200 OK
Access-Control-Allow-Origin: *

/multipleRecorder/remove

ЗапросОтвет
Code Block
languagejs
themeRDark
POST /rest-api/multipleRecorder/remove HTTP/1.1
Host: localhost:9091
Content-type: application/json
Content-Length: 78                       
                                                     
{
	"uri": "multi-recorder://test-record",
    "mediaSessionId": "d010f9a0-fe34-11eb-9d0a-fb2207ead79d"
}
Code Block
languagejs
themeRDark
HTTP/1.1 200 OK
Access-Control-Allow-Origin: *

/multipleRecorder/find_all

ЗапросОтвет
Code Block
languagejs
themeRDark
POST /rest-api/multipleRecorder/find_all HTTP/1.1
Host: localhost:9091
Content-type: application/json

Code Block
languagejs
themeRDark
HTTP/1.1 200 OK
Access-Control-Allow-Origin: *
Access-Control-Allow-Credentials: true
Content-Type: application/json
Content-Length: 239

[
  {
    "mediaSessionsId": [
      "d010f9a0-fe34-11eb-9d0a-fb2207ead79d",
      "dca111f0-fe34-11eb-ba46-45d41f052372",
      "e7614c40-fe34-11eb-8d5e-07d6ca1cc7ff"
    ],
    "uri": "multi-recorder://test-record",
    "fileName": "multi-recorder___test-record.mp4"
  }
]


/multipleRecorder/terminate

ЗапросОтвет
Code Block
languagejs
themeRDark
POST /rest-api/multipleRecorder/terminate HTTP/1.1
Host: localhost:9091
Content-type: application/json
Content-Length: 22                       
                                                     
{
	"uri": "multi-recorder://test-record"
}
Code Block
languagejs
themeRDark
HTTP/1.1 200 OK
Access-Control-Allow-Origin: *


/transcoder/startup

ЗапросОтвет
Code Block
languagejs
themeRDark
POST /rest-api/transcoder/startup HTTP/1.1
HOST: 192.168.1.101:8081
content-type: application/json
content-length: 83

{
	"uri": "transcoder://tcode1",
	"remoteStreamName": "test",
	"localStreamName": "testT",
	"encoder": {
		"width": 640,
		"height": 480,
		"keyFrameInterval": 30,
		"fps": 30,
        "watermark": "Test.png"
 	}
}
Code Block
languagejs
themeRDark
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Content-Length: 0
Date: Thu, 06 Dec 2018 4:16:40 GMT


/transcoder/find

ЗапросОтвет
Code Block
languagejs
themeRDark
POST /rest-api/transcoder/find HTTP/1.1
HOST: 192.168.1.101:8081
content-type: application/json
content-length: 30

{
	"remoteStreamName": "test"
}
Code Block
languagejs
themeRDark
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Content-Length: 286
Date: Thu, 06 Dec 2018 4:16:40 GMT

[
    {
        "localMediaSessionId": "42a92132-bcd1-4436-a96f-3fec36b32b37",
        "localStreamName": "testT",
        "remoteStreamName": "test",
        "uri": "transcoder://tcode1",
        "status": "PROCESSED_LOCAL",
        "hasAudio": true,
        "hasVideo": true,
        "record": false,
        "encoder": {
            "width": 640,
            "height": 480,
            "keyFrameInterval": 30,
            "fps": 30,
            "watermark": "Test.png"
        }
    }
]

/transcoder/find_all

ЗапросОтвет
Code Block
languagejs
themeRDark
POST /rest-api/transcoder/find_all HTTP/1.1
HOST: 192.168.1.101:8081
content-type: application/json
content-length: 0

Code Block
languagejs
themeRDark
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Content-Length: 286
Date: Thu, 06 Dec 2018 4:16:40 GMT

[
    {
        "localMediaSessionId": "42a92132-bcd1-4436-a96f-3fec36b32b37",
        "localStreamName": "testT",
        "remoteStreamName": "test",
        "uri": "transcoder://tcode1",
        "status": "PROCESSED_LOCAL",
        "hasAudio": true,
        "hasVideo": true,
        "record": false,
        "encoder": {
            "width": 640,
            "height": 480,
            "keyFrameInterval": 30,
            "fps": 30,
            "watermark": "Test.png"
        }
    }
]

/transcoder/terminate

ЗапросОтвет
Code Block
languagejs
themeRDark
POST /rest-api/transcoder/terminate HTTP/1.1
HOST: 192.168.1.101:8081
content-type: application/json
content-length: 30

{
	"uri":"transcoder://tcode1"
}
Code Block
languagejs
themeRDark
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Content-Length: 0
Date: Thu, 06 Dec 2018 4:16:40 GMT

/transcoder/set_watermark

Запрос

Ответ

Code Block
languagejs
themeRDark
POST /rest-api/transcoder/set_watermark HTTP/1.1
Host: localhost:8081
Accept: */*
Content-Type: application/json
Content-Length: 72

{
 "uri":"transcoder://t1",
 "watermark":"/opt/media/logo.png",
 "x":10,
 "y":10
}
Code Block
languagejs
themeRDark
HTTP/1.1 200 OK
Access-Control-Allow-Origin: *
Access-Control-Allow-Credentials: true
Content-Length: 0
Date: Fri, 19 Aug 2022 14:55:35 GMT


 

/transcoder2/startup

ЗапросОтвет
Code Block
languagejs
themeRDark
POST /rest-api/transcoder2/startup HTTP/1.1
HOST: 192.168.1.101:8081
content-type: application/json
content-length: 242

{
    "uri": "transcoder2://tcode2",
    "localStreamName": "testT",
    "remoteStreamName": "test",
    "encoder": {
      "width": 320,
      "height": 240,
      "keyFrameInterval": 60,
      "fps": 30,
      "bitrate": 1000,
      "audioRate": 44100,
      "audioBitrate": 64000,
      "audioCodec": "mpeg4-generic",
      "videoCodec": "H264"
    }
}
Code Block
languagejs
themeRDark
HTTP/1.1 200 OK
Access-Control-Allow-Origin: *
Access-Control-Allow-Credentials: true

/transcoder2/find

ЗапросОтвет
Code Block
languagejs
themeRDark
POST /rest-api/transcoder2/find HTTP/1.1
HOST: 192.168.1.101:8081
content-type: application/json
content-length: 30

{
	"remoteStreamName": "test"
}
Code Block
languagejs
themeRDark
HTTP/1.1 200 OK
Access-Control-Allow-Origin: *
Access-Control-Allow-Credentials: true
Content-Type: application/json
Content-Length: 387

[
  {
    "localMediaSessionId": "abde0bbf-558f-49e7-88e8-5431824dbc6c",
    "localStreamName": "testT",
    "remoteStreamName": "test",
    "uri": "transcoder2://tcode2",
    "status": "PROCESSED_LOCAL",
    "hasAudio": true,
    "hasVideo": true,
    "record": false,
    "encoder": {
      "width": 320,
      "height": 240,
      "keyFrameInterval": 60,
      "fps": 30,
      "bitrate": 1000,
      "audioRate": 44100,
      "audioCodec": "mpeg4-generic",
      "videoCodec": "H264",
      "videoRate": 90000
    }
  }
]

/transcoder2/find_all

ЗапросОтвет
Code Block
languagejs
themeRDark
POST /rest-api/transcoder2/find_all HTTP/1.1
HOST: 192.168.1.101:8081
content-type: application/json
content-length: 0

Code Block
languagejs
themeRDark
HTTP/1.1 200 OK
Access-Control-Allow-Origin: *
Access-Control-Allow-Credentials: true
Content-Type: application/json
Content-Length: 387

[
  {
    "localMediaSessionId": "abde0bbf-558f-49e7-88e8-5431824dbc6c",
    "localStreamName": "testT",
    "remoteStreamName": "test",
    "uri": "transcoder2://tcode2",
    "status": "PROCESSED_LOCAL",
    "hasAudio": true,
    "hasVideo": true,
    "record": false,
    "encoder": {
      "width": 320,
      "height": 240,
      "keyFrameInterval": 60,
      "fps": 30,
      "bitrate": 1000,
      "audioRate": 44100,
      "audioCodec": "mpeg4-generic",
      "videoCodec": "H264",
      "videoRate": 90000
    }
  }
]

/transcoder2/terminate

ЗапросОтвет
Code Block
languagejs
themeRDark
POST /rest-api/transcoder2/terminate HTTP/1.1
HOST: 192.168.1.101:8081
content-type: application/json
content-length: 30

{
	"uri":"transcoder2://tcode2"
}
Code Block
languagejs
themeRDark
HTTP/1.1 200 OK
Access-Control-Allow-Origin: *
Access-Control-Allow-Credentials: true

/transcoder2/set_watermark

Запрос

Ответ

Code Block
languagejs
themeRDark
POST /rest-api/transcoder2/set_watermark HTTP/1.1
Host: localhost:8081
Accept: */*
Content-Type: application/json
Content-Length: 73

{
 "uri":"transcoder2://t1",
 "watermark":"/opt/media/logo.png",
 "x":10,
 "y":10
}
Code Block
languagejs
themeRDark
HTTP/1.1 200 OK
Access-Control-Allow-Origin: *
Access-Control-Allow-Credentials: true
Content-Length: 0
Date: Fri, 19 Aug 2022 14:55:35 GMT


 

/vod/startup

ЗапросОтвет
Code Block
languagejs
themeRDark
POST /rest-api/vod/startup HTTP/1.1
HOST: 192.168.1.101:8081
content-type: application/json
content-length: 83

{
	"uri":"vod-live://sample.mp4",
	"localStreamName": "test"
}
Code Block
languagejs
themeRDark
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Content-Length: 0
Date: Thu, 06 Dec 2018 4:16:40 GMT


/vod/find

ЗапросОтвет
Code Block
languagejs
themeRDark
POST /rest-api/vod/find HTTP/1.1
HOST: 192.168.1.101:8081
content-type: application/json
content-length: 30

{
	"localStreamName": "test"
}
Code Block
languagejs
themeRDark
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Content-Length: 286
Date: Thu, 06 Dec 2018 4:16:40 GMT

[
    {
        "localMediaSessionId": "29ec3236-1093-42bb-88d6-d4ac37af3ac0",
        "localStreamName": "test",
        "uri": "vod-live://sample.mp4",
        "status": "PROCESSED_LOCAL",
        "hasAudio": true,
        "hasVideo": true,
        "record": false
    }
]


/vod/find_all

ЗапросОтвет
Code Block
languagejs
themeRDark
POST /rest-api/vod/find_all HTTP/1.1
HOST: 192.168.1.101:8081
content-type: application/json
content-length: 0

Code Block
languagejs
themeRDark
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Content-Length: 286
Date: Thu, 06 Dec 2018 4:16:40 GMT

[
    {
        "localMediaSessionId": "29ec3236-1093-42bb-88d6-d4ac37af3ac0",
        "localStreamName": "test",
        "uri": "vod-live://sample.mp4",
        "status": "PROCESSED_LOCAL",
        "hasAudio": true,
        "hasVideo": true,
        "record": false
    }
]


/vod/terminate

ЗапросОтвет
Code Block
languagejs
themeRDark
POST /rest-api/vod/terminate HTTP/1.1
HOST: 192.168.1.101:8081
content-type: application/json
content-length: 30

{
	"uri":"vod://sample.mp4",
	"localStreamName": "test"
}
Code Block
languagejs
themeRDark
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Content-Length: 0
Date: Thu, 06 Dec 2018 4:16:40 GMT

/hls/startup

ЗапросОтвет
Code Block
languagejs
themeRDark
POST /rest-api/hls/startup HTTP/1.1
Host: localhost:8081
Content-Length: 16
Content-Type: application/json

{
    "name": "test"
}
Code Block
languagejs
themeRDark
HTTP/1.1 200 OK
Access-Control-Allow-Origin: *
Content-Type: application/json

/hls/find_all

ЗапросОтвет
Code Block
languagejs
themeRDark
POST /rest-api/hls/find_all HTTP/1.1
Host: localhost:8081
Connection: keep-alive
Content-Length: 22

{
  "offset":0,
  "size":10
}
Code Block
languagejs
themeRDark
HTTP/1.1 200 OK
Access-Control-Allow-Origin: *
Content-Length: 493
Content-Type: application/json

[
  {
    "id": "test",
    "streamName": "test",
    "status": "ACTIVE",
    "waitingSize": 0,
    "profiles": [
      "a_test",
      "v_test"
    ],
    "subscribers": 1,
    "playlist": "#EXTM3U\n#EXT-X-VERSION:9\n#EXT-X-INDEPENDENT-SEGMENTS\n#EXT-X-MEDIA:TYPE=AUDIO,URI=\"a_test/a_test.m3u8\",GROUP-ID=\"audio\",NAME=\"none\",DEFAULT=YES,AUTOSELECT=YES,CHANNELS=\"2\"\n#EXT-X-STREAM-INF:BANDWIDTH=2180097,CODECS=\"avc1.640028,mp4a.40.2\",RESOLUTION=1280x720,FRAME-RATE=29.0,AUDIO=\"audio\"\nv_test/v_test.m3u8\n",
    "createdDate": 1697691514126,
    "logs": []
  }
]

/hls/terminate

ЗапросОтвет
Code Block
languagejs
themeRDark
POST /rest-api/hls/terminate HTTP/1.1
Host: localhost:8081
Content-Length: 16
Content-Type: application/json

{
    
"name": "test"
}
Code Block
languagejs
themeRDark
HTTP/1.1 200 OK
Access-Control-Allow-Origin: *
Content-Type: application/json

/

...

hls/

...

profiles

ЗапросОтвет
Code Block
languagejs
themeRDark
POST /rest-api/
recorder
hls/
startup
profiles HTTP/1.1
Content-Length: 52
Host: localhost:8081
Connection: keep-alive
Content-
Type
Length: 
application/json Host: test.flashphoner.com:8081 { "mediaSessionId": "5a072377-73c1-4caf-abd3", "config": { "fileTemplate": "{streamName}-{startTime}-{endTime}", "rotation": "20M" } }
Code Block
languagejs
themeRDark
HTTP/1.1 200 OK
Access-Control-Allow-Origin: *
Content-Type: application/json

/recorder/terminate

...

Code Block
languagejs
themeRDark
POST /rest-api/recorder/terminate HTTP/1.1
Content-Length: 26                                   
Content-Type: application/json                       
HOST: 192.168.1.101:8081
                                                     
{
	"mediaSessionId": "5a072377-73c1-4caf-abd3"
}

...

Code Block
languagejs
themeRDark
HTTP/1.1 200 OK
Access-Control-Allow-Origin: *
Content-Type: application/json

/recorder/find_all

...

Code Block
languagejs
themeRDark
POST /rest-api/recorder/find_all HTTP/1.1
HOST: 192.168.1.101:8081
content-type: application/json
content-length: 0

...

Code Block
languagejs
themeRDark
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Content-Length: 125
Date: Thu, 06 Dec 2018 4:16:40 GMT

[
    {
        "fileName": "9c3e-test-1563776083752-{endTime}.mp4",
        "mediaSessionId": "5a072377-73c1-4caf-abd3"
    }
]

/transcoder/startup

...

Code Block
languagejs
themeRDark
POST /rest-api/transcoder/startup HTTP/1.1
HOST: 192.168.1.101:8081
content-type: application/json
content-length: 83

{
	"uri": "transcoder://tcode1",
	"remoteStreamName": "test",
	"localStreamName": "testT",
	"encoder": {
		"width": 640,
		"height": 480,
		"keyFrameInterval": 30,
		"fps": 30,
        "watermark": "Test.png"
 	}
}

...

Code Block
languagejs
themeRDark
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Content-Length: 0
Date: Thu, 06 Dec 2018 4:16:40 GMT

...

39

{
  "hlsId":"test",
  "profileName":"v_test"
}
Code Block
languagejs
themeRDark
HTTP/1.1 200 OK
Access-Control-Allow-Origin: *
Content-Length: 1183
Content-Type: application/json

{
  "name": "v_test",
  "stream": {
    "appKey": "defaultApp",
    "sessionId": "test-HLS",
    "mediaSessionId": "94bc92bc-959b-4533-a0e6-7de3d8c89141-test-HLS",
    "name": "test",
    "published": false,
    "hasVideo": false,
    "hasAudio": true,
    "status": "PLAYING",
    "sdp": "v=0\r\no=- 1988962254 1988962254 IN IP4 0.0.0.0\r\nc=IN IP4 0.0.0.0\r\nt=0 0\r\na=sdplang:en\r\nm=video 0 RTP/AVP 112\r\na=rtpmap:112 H264/90000\r\na=fmtp:112 packetization-mode=1; profile-level-id=42001f\r\na=recvonly\r\n",
    "videoCodec": "H264",
    "record": false,
    "width": 1280,
    "height": 720,
    "bitrate": 0,
    "minBitrate": 0,
    "maxBitrate": 0,
    "quality": 0,
    "parentMediaSessionId": "8df817dc-c331-4fb5-949d-03e7764bab11",
    "history": false,
    "gop": 0,
    "fps": 0,
    "audioBitrate": 0,
    "codecImpl": "",
    "transport": "UDP",
    "cvoExtension": true,
    "createDate": 1697691514574,
    "mediaType": "play",
    "audioState": {
      "muted": false
    },
    "videoState": {
      "muted": false
    },
    "mediaProvider": "HLS"
  },
  "keyFrameReceived": true,
  "videoProfile": {
    "type": "video",
    "width": 1280,
    "height": 720,
    "fps": 29,
    "bitrate": 2129,
    "codec": "",
    "quality": 0,
    "audioGroupId": "audio"
  },
  "metrics": {
    "minFPS": 29.962547,
    "avgFPS": 30.000261,
    "maxFPS": 30.04292,
    "countGaps": 0,
    "resolutionChanges": 0,
    "queueSize": 11,
    "startPts": 560866,
    "currentPts": 561133
  },
  "subscribers": 1
}

/hls/subscribers

ЗапросОтвет
Code Block
languagejs
themeRDark
POST /rest-api/transcoderhls/findsubscribers HTTP/1.1
HOSTHost: 192.168.1.101localhost:8081
content-typeConnection: application/json
content-lengthkeep-alive
Content-Length: 3016

{
	  "remoteStreamNamehlsId": "test"
}
Code Block
languagejs
themeRDark
HTTP/1.1 200 OK
ServerAccess-Control-Allow-Origin: Apache-Coyote/1.1*
Content-Length: 286501
Date: Thu, 06 Dec 2018 4:16:40 GMTContent-Type: application/json

[
    {
        "localMediaSessionIdid": "42a92132-bcd1-4436-a96f-3fec36b32b37",
        "localStreamName": "testT",
        "remoteStreamName": "test",
        "uri": "transcoder://tcode1",
    192.168.0.83-55832-Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/118.0.0.0 Safari/537.36",
    "statusip": "PROCESSED_LOCAL192.168.0.83",
        "hasAudioport": true55832,
        "hasVideouserAgent": true,
        "record": false"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/118.0.0.0 Safari/537.36",
        "encoderactive": {true,
            "width"metrics": 640,
     {
       "heightprofileTime": 480,
    {
        "keyFrameIntervaltest": 3066,
            "fps"v_test": 30,598216
      },
      "watermarkrequestsNumber": "Test.png"6537,
        }"requestsStatuses": {
    }
]

/transcoder/find_all

ЗапросОтвет Code Block
languagejs
themeRDark
POST
 
/rest-api/transcoder/find_all
 
HTTP/1.1 HOST:
 
192.168.1.101:8081 content-type: application/json content-length: 0 Code Block
languagejs
themeRDark
HTTP/1.1
 "200 OK
Server
": 
Apache-Coyote/1.1 Content-Length: 286 Date: Thu, 06 Dec 2018 4:16:40 GMT [
6536
      },
    
{
  "profileSwitches": 1,
      "
localMediaSessionId
maxResponseTime": 
"42a92132-bcd1-4436-a96f-3fec36b32b37"
13,
      "
localStreamName
minResponseTime": 
"testT"
0,
      
"
remoteStreamName
avgResponseTime": 
"test",
0.4173168119932691
    }
  }
]

/sfu/stats

ЗапросОтвет
Code Block
languagejs
themeRDark
POST 
"uri": "transcoder://tcode1", "status": "PROCESSED_LOCAL", "hasAudio": true,
/rest-api/sfu/stats HTTP/1.1
Host: localhost:9091
Content-Type: application/json
Content-Length: 20

{
     "roomName":"ROOM1"
}
Code Block
languagejs
themeRDark
HTTP/1.1 200 OK
Access-Control-Allow-Origin: *
Content-Type: application/json
Content-Length: 1154

{
  "participants": [
    {
      "
hasVideo
nickName": 
true
"User1",
      
"
record
outgoingTracks": 
false,
[
        
"encoder":
{
          
"
width
id": 
640
"9de9107c-ce5f-4d6b-b7d6-ea233d691d09",
          
"
height
codec": 
480
"opus",
          "
keyFrameInterval
bitrate": 
30
0,
          
"
fps
sampleRate": 
30
48000,
          
"
watermark
channels": 
"Test.png" } } ]

/transcoder/terminate

...

Code Block
languagejs
themeRDark
POST /rest-api/transcoder/terminate HTTP/1.1
HOST: 192.168.1.101:8081
content-type: application/json
content-length: 30

{
	"uri":"transcoder://tcode1"
}

...

Code Block
languagejs
themeRDark
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Content-Length: 0
Date: Thu, 06 Dec 2018 4:16:40 GMT

/transcoder2/startup

ЗапросОтвет Code Block
languagejs
themeRDark
POST /rest-api/transcoder2/startup HTTP/1.1 HOST: 192.168.1.101:8081 content-type: application/json content-length: 242 { "uri": "transcoder2://tcode2", "localStreamName": "testT", "remoteStreamName": "test", "encoder": {
2,
          "alive": true,
          "type": "AUDIO"
        },
        {
          "id": "237dcef9-c66d-4c72-bd43-0c91aaea3b7e",
          "composite": true,
          "tracks": {
            "h send": {
              "
width
id": 
320
"237dcef9-c66d-4c72-bd43-0c91aaea3b7e",
      
"height": 240,
        "
keyFrameInterval
codec": 
60
"H264",
      
"fps": 30,
        "
bitrate
width": 
1000
1280,
       
"audioRate":
 
44100,
      "
audioBitrate
height": 
64000
720,
      
"audioCodec": "mpeg4-generic",
        "
videoCodec
fps": 
"H264"
30,
    
} } Code Block
languagejs
themeRDark
HTTP/1.1
 
200
 
OK Access-Control-Allow-Origin:
 
* Access-Control-Allow-Credentials: true

/transcoder2/find

ЗапросОтвет
Code Block
languagejs
themeRDark
POST /rest-api/transcoder2/find_all HTTP/1.1
HOST: 192.168.1.101:8081
content-type: application/json
content-length: 0

Code Block
languagejs
themeRDark
HTTP/1.1 200 OK Access-Control-Allow-Origin: * Access-Control-Allow-Credentials: true Content-Type: application/json Content-Length: 387 [ HTTP/1.1 200 OK Access-Control-Allow-Origin: * Access-Control-Allow-Credentials: true Content-Type: application/json Content-Length: 387 [ { "localMediaSessionId": "abde0bbf-558f-49e7-88e8-5431824dbc6c", "localStreamName": "testT"remoteStreamName"test""uri"transcoder2://tcode2""status"PROCESSED_LOCAL""hasAudio":true, "hasVideo":true, recordfalse"encoder": { width320"height": 240, keyFrameInterval60, "fps": 30, "bitrate": 1000,"audioRate": 44100, "audioCodec": "mpeg4-generic"videoCodec"H264","videoRate90000 ]
ЗапросОтвет
Code Block
languagejs
themeRDark
POST /rest-api/transcoder2/find HTTP/1.1
HOST: 192.168.1.101:8081
content-type: application/json
content-length: 30

{
	"remoteStreamName": "test"
}
Code Block
languagejs
themeRDark
       "bitrate": 157976,
              "alive": true,
              "type": "VIDEO"
            },
            "m send": {
              "id": "237dcef9-c66d-4c72-bd43-0c91aaea3b7e",
              "codec": "H264",
    
          "width": 
640,
      
        "height": 
360,
       
       "fps": 
30,
    
 
    
 
    "
bitrate": 
263952,
     
         "
alive": 
true,
      
        "
type": 
"VIDEO"
        
    }
         
 }
      
  }
     
 ],
      "
incomingTracks": 
{
      
  "3c2dcd1c-7acd-4b90-8871-331be80cade0": "h 
send"
      }
    }

/transcoder2/find_all

,
    {
      "nickName": "User2",
      "outgoingTracks": [
        {
    
"localMediaSessionId
      "id": "
abde0bbf
3c2dcd1c-
558f
7acd-
49e7
4b90-
88e8
8871-
5431824dbc6c
331be80cade0",
          "
localStreamName
composite": 
"testT"
true,
          "
remoteStreamName
tracks": 
"test",
{
    
"uri
        "h send": 
"transcoder2://tcode2",
{
    
"status
          "id": "
PROCESSED_LOCAL
3c2dcd1c-7acd-4b90-8871-331be80cade0",
    
"hasAudio":
 
true,
    
"hasVideo":
 
true,
    "
record
codec": 
false
"H264",
    
"encoder": {
          "width": 
320
1280,
              "height": 
240
720,
      
"keyFrameInterval": 60,
        "fps": 30,
      
"bitrate": 1000,
        "
audioRate
bitrate": 
44100
238688,
      
"audioCodec": "mpeg4-generic",
        "
videoCodec
alive": 
"H264"
true,
      
"videoRate":
 
90000
    
}
  
} ]

/transcoder2/terminate

...

Code Block
languagejs
themeRDark
POST /rest-api/transcoder2/terminate HTTP/1.1
HOST: 192.168.1.101:8081
content-type: application/json
content-length: 30

{
	"uri":"transcoder2://tcode2"
}

...

Code Block
languagejs
themeRDark
HTTP/1.1 200 OK
Access-Control-Allow-Origin: *
Access-Control-Allow-Credentials: true

/vod/startup

...

Code Block
languagejs
themeRDark
POST /rest-api/vod/startup HTTP/1.1
HOST: 192.168.1.101:8081
content-type: application/json
content-length: 83

{
	"uri":"vod-live://sample.mp4",
	"localStreamName": "test"
}

...

Code Block
languagejs
themeRDark
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Content-Length: 0
Date: Thu, 06 Dec 2018 4:16:40 GMT

/vod/find

ЗапросОтвет
Code Block
languagejs
themeRDark
POST /rest-api/vod/find HTTP/1.1
HOST: 192.168.1.101:8081
content-type: application/json
content-length: 30

{
	"localStreamName": "test"
}
Code Block
languagejs
themeRDark
HTTP/1.1 200 OK Server: Apache-Coyote/1.1 Content-Length: 286 Date: Thu, 06 Dec 2018 4:16:40 GMT [ {
 "type": "VIDEO"
            },
            "m send": {
              "id": "3c2dcd1c-7acd-4b90-8871-331be80cade0",
              "codec": "H264",
              "width": 640,
              "height": 360,
              "fps": 30,
              "bitrate": 265368,
              "alive": true,
              "
localMediaSessionId
type": "
29ec3236-1093-42bb-88d6-d4ac37af3ac0",
VIDEO"
           
"localStreamName": "test",
 }
        
"uri": "vod-live://sample.mp4",
  }
        
"status": "PROCESSED_LOCAL"
}
      ],
      
"
hasAudio
incomingTracks": 
true,
{
        "
hasVideo
9de9107c-ce5f-4d6b-b7d6-ea233d691d09": 
true
null,
        "
record": false
237dcef9-c66d-4c72-bd43-0c91aaea3b7e": "h send"
      }
    }
  ]
}

/

...

mpegts/

...

startup

ЗапросОтвет
Code Block
languagejs
themeRDark
POST /rest-api/
vod
mpegts/
find_all
startup HTTP/1.1
HOST
Host: 
192.168.1.101:8081 content-type: application/json content-length: 0
localhost:8081
Content-Type: application/json
Content-Length: 44

{
  "localStreamName":"test",
  "transport":"srt"
}
Code Block
languagejs
themeRDark
HTTP/1.1 200 OK
Server
Access-Control-Allow-Origin: 
Apache-Coyote/1.1
*
Content-Type: application/json
Content-Length: 
286 Date: Thu, 06 Dec 2018 4:16:40 GMT [
230

{
  
"localMediaSessionId": "
29ec3236
32ec1a8e-
1093
7df4-
42bb
4484-
88d6
9a95-
d4ac37af3ac0
e7eddc45c508",
  
"localStreamName": "test",
  
"uri": "
vod-live
srt://
sample.mp4
192.168.1.39:31014",
  "status": "CONNECTED",
  "hasAudio": false,
  "
status
hasVideo": 
"PROCESSED_LOCAL"
false,
  "record": false,
  "transport": "SRT",
  "
hasAudio
cdn": 
true
false,
  "timeout": 90000,
  
"
hasVideo
maxTimestampDiff": 
true
1,
  
"
record
allowedList": 
false } ]
[]
}

/

...

mpegts/

...

find

ЗапросОтвет
Code Block
languagejs
themeRDark
POST /rest-api/
vod
mpegts/
terminate
find_all HTTP/1.1
HOST
Host: 
192.168.1.101
localhost:8081
content
Content-
type
Type: application/json
content
Content-
length
Length: 
30
61

{
 "
uri
localStreamName":"
vod://sample.mp4
test",
 "
localStreamName
uri": "
test
srt://192.168.1.39:31014"
} 
Code Block
languagejs
themeRDark
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1 Content-Length: 0 Date: Thu, 06 Dec 2018 4:16:40 GMT

/hls/startup

POST /rest-api/hls/startup HTTP/1.1 Host: centos3.flashphoner.com:8081 Content-Length: 16name }
ЗапросОтвет
Code Block
languagejs
themeRDark
Access-Control-Allow-Origin: *
Content-Type: application/json
Content-Length: 238

[{
  "localMediaSessionId": "32ec1a8e-7df4-4484-9a95-e7eddc45c508",
  "
localStreamName": "test"
Code Block
languagejs
themeRDark
HTTP/1.1 200 OK
Access-Control-Allow-Origin: *
Content-Type: application/json

...

,
  "uri": "srt://192.168.1.39:31014",
  "status": "PROCESSED_LOCAL",
  "hasAudio": false,
  "hasVideo": false,
  "record": false,
  "transport": "SRT",
  "cdn": false,
  "timeout": 90000,
  "maxTimestampDiff": 1,
  "allowedList": []
}]

/mpegts/find_all

Length171Typeapplication/jsontest{ handlercom.flashphoner.server.client.handler.wcs4.WCS4Handler@15b75d07 stateACTIVEwriter"HLS-test" streamStatus"PLAYING" writerStartedtrue }
ЗапросОтвет
Code Block
languagejs
themeRDark
POST /rest-api/hlsmpegts/find_all HTTP/1.1
Host: centos3.flashphoner.comlocalhost:8081
ConnectionContent-Type: keep-aliveapplication/json
Content-Length: 0
Code Block
languagejs
themeRDark
HTTP/1.1 200 OK
Access-Control-Allow-Origin: *
Content-
Type: 
application/json
Content-
Length: 
238

[{
  "
localMediaSessionId": 
"32ec1a8e-7df4-4484-9a95-e7eddc45c508",
  "localStreamName": "test",
  "
uri": "
srt://192.168.1.39:31014",
  
"
status": "
CONNECTED",
  "hasAudio": true,
  "
hasVideo": 
true,
  
"
record": 
false,
  "
timeout": 90000,
  "
maxTimestampDiff"
: 
90000
}]

/

...

mpegts/terminate

ЗапросОтвет
Code Block
languagejs
themeRDark
POST /rest-api/hlsmpegts/terminatestartup HTTP/1.1
Host: centos3.flashphoner.comlocalhost:8081
Content-LengthType: 16application/json
Content-TypeLength: application/json26

{
     "namelocalStreamName": "test"
}
Code Block
languagejs
themeRDark
HTTP/1.1 200 OK
Access-Control-Allow-Origin: *
Content-Type: application/json