Versions Compared

Key

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

...

Запрос

Ответ

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

{
	"nodeId":"cm2p2VmswiHZ4pO12Ps8anz1NYudEOL1@192.168.1.101",
	"operationId":"d1999750-fde9-11e6-9f1b-913210792936",
	"sessionId":"/192.168.1.102:15422/192.168.1.101:8443",
	"payload":{
    	"message":"hello"
	}
}
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.103:53002/192.168.1.101:8443"
    ],
	"payload":{
    	"message":"hello"
	}
}
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",
	     "payload":{
    	     "message":"hello"
	     }
    },
    {
	     "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: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: Tue, 28 Mar 2017 16:42:07 GMT

[
	{
		"custom":{},
		"nodeId":null,
		"appKey":"roomApp",
		"sessionId":"/192.168.1.102:31049/192.168.1.101:8080",
		"sipRegisterRequired":false,
		"sipLogin":"a5ledkh95o57os4ge5i4ihpqio",
		"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":"/192.168.1.102:31049/192.168.1.101:8080",
		"status":null,
		"restClientConfig":null,
		"clientVersion":"2.3.0",
		"clientOSVersion":null,
		"clientBrowserVersion":null
	},{
		"custom":{},
		"nodeId":null,
		"appKey":"defaultApp",
		"sessionId":"/192.168.1.102:15422/192.168.1.101:8443",
		"sipRegisterRequired":false,
		"sipLogin":"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":["WebRTC","WSPlayer"],
		"appMainClass":null,
		"appCallbackClass":null,
		"authToken":"/192.168.1.102:15422/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 ..."
	}
]

...

Запрос

Ответ

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

{
 "uri":"mixer://m1",
 "mixerLayoutDir":"/opt/GridLayout"
}
Code Block
languagejs
themeRDark
HTTP/1.1 200 OK
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/mixer/
test/start
set_stream_avatar HTTP/1.1
HOST
Host: 
192.168.1.101
localhost:8081
Content-
type
Type: application/json
Content-
length
Length: 
107
74

{
 "
feedingStreams
uri":
[ "s1
"mixer://m1",
 "
s2" ], "mixerCount": 3
remoteStreamName":"user2",
 
"
streamsInMixer
avatar":
1, "intervalInSeconds": 60 }
"/opt/avatar.png"
}
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

...

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


 

/mixer/remove_stream_avatar

Запрос

Ответ

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

{
}
 "uri":"mixer://m1",
 "remoteStreamName":"user2"
}
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
Access-Control-Allow-Origin: *
Access-Control-Allow-Credentials: true


 

/mixer/test/

...

start

...

Запрос

Ответ

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: 0107

{
}


	"feedingStreams": [
		"s1",
		"s2"
    ],
    "mixerCount": 3,
    "streamsInMixer": 1,
    "intervalInSeconds": 60
}
Code Block
languagejs
themeRDark
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Content-Length: 1070
Date: Wed, 22 Aug 2018 08:53:26 GMT

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


/pull/pull

Запрос

Ответ

Code Block
languagejs
themeRDark
POST /rest-api/pull/pull


/mixer/test/stop

Запрос

Ответ

Code Block
languagejs
themeRDark
POST /rest-api/mixer/test/stop HTTP/1.1
HostHOST: 192.168.1.101:8081
Content-Typetype: application/json;charset=UTF-8
Content-Lengthlength: 600

{
	"uri":"wss://demo.flashphoner.com:8443/websocket",
	"localStreamName": "6602",
	"remoteStreamName": "6602"
}}


Code Block
languagejs
themeRDark
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Content-Length: 0
Date: ThuWed, 2322 NovAug 20172018 0908:4753:2326 GMT


/mixer/

...

test/

...

get_start_

...

example

Запрос

Ответ

Code Block
languagejs
themeRDark
POST /rest-api/mixer/pulltest/findget_start_allexample HTTP/1.1
HostHOST: 192.168.1.101:8081
Content-Lengthtype: 0application/json
Content-Typelength: application/json0

{
}


Code Block
languagejs
themeRDark
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Content-TypeLength: application/json;charset=UTF-8107
Date: FriWed, 2422 NovAug 20172018 1408:2753:3526 GMT

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

...

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



/pull/pull

Запрос

Ответ

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": "0d406602",
	"remoteStreamName": "0d406602"
}
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/

...

find_all

Запрос

Ответ

Code Block
languagejs
themeRDark
POST /rest-api/pull/terminatefind_all HTTP/1.1
HOSTHost: 192.168.1.101:8081
contentContent-typeLength: application/json0
contentContent-lengthType: 31

{
	"uri": "wss://demo.flashphoner.com:8443/websocket"
}application/json
Code Block
languagejs
themeRDark
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Content-LengthType: 0application/json;charset=UTF-8
Date: Fri, 24 Nov 2017 14:5527: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

...



[
	{
		"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/
logger/disable_client_log
pull/pull HTTP/1.1
HOST
Host: 192.168.1.101:8081
content
Content-
type
Type: application/json
content-length
;charset=UTF-8
Content-Length: 
71
60

{
	"
sessionId
uri":
"wss:/
127
/demo.
0
flashphoner.
0.1
com:
57539/192.168.1.101:8443
8443/websocket",
	"localStreamName": "0d40",
	"remoteStreamName": "0d40"
}
Code Block
languagejs
themeRDark
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Content-Length: 0
Date: 
Wed
Thu, 
03
23 
Sep
Nov 
2018
2017 
06
09:
58
47:
40
23 GMT


/

...

pull/

...

terminate

Запрос

Ответ

Code Block
languagejs
themeRDark
POST /rest-api/
cdn
pull/
show_nodes
terminate HTTP/1.1
HOST: 192.168.1.101:8081
content-type: application/json
content-length
: 0
: 31

{
	"uri": "wss://demo.flashphoner.com:8443/websocket"
}
Code Block
languagejs
themeRDark
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Content-Length: 
224
0
Date: 
Thu
Fri, 
06
24 
Dec
Nov 
2018
2017 
4
14:
16
55:
40 GMT [ { "globalState": "ACTIVE", "id": "192.168.1.64", "processingState": "NEW_STREAMS_ALLOWED", "role": "TRANSCODER" }, { "globalState": "ACTIVE", "id": "192.168.1.39", "processingState": "NEW_STREAMS_ALLOWED", "role": "ORIGIN" } ]

/cdn/show_routes

ЗапросОтвет
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
POST /rest-api/cdn/show_routes
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: 
26
0
Date: 
Thu
Wed, 
06
03 
Dec
Sep 2018 
4
06:
16
58:40 GMT
{ "0-192.168.1.5-0": "test" }


/cdn/show_

...

nodes

ЗапросОтвет
Code Block
languagejs
themeRDark
POST /rest-api/cdn/show_
state
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: 
19
224
Date: Thu, 06 Dec 2018 
8
4:
26
16:
44
40 GMT


[
	
"NEW_STREAMS_ALLOWED" ]

/cdn/enforce_state

ЗапросОтвет Code Block
languagejs
themeRDark
POST /rest-api/cdn/enforce_state HTTP/1.1 HOST:
{
        "globalState": "ACTIVE",
        "id": "192.168.1.
101:8081 content-type: application/json content-length: 44 { "state
64",
        "processingState": "
GROUP
NEW_
CONNECTIONS
STREAMS_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

...

,
        "role": "TRANSCODER"
    },
    {
        "globalState": "ACTIVE",
        "id": "192.168.1.39",
        "processingState": "NEW_STREAMS_ALLOWED",
        "role": "ORIGIN"
    }
]


/cdn/show_routes

ЗапросОтвет
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" }
0
Code Block
languagejs
themeRDark
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Content-Length: 
411
26
Date: 
Mon
Thu, 
07
06 
Jan
Dec 2018 4:16:40 GMT

{
    "
REQUESTED-PROFILE
0-192.168.1.5-0": 
[ "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}" ] }

/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
"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/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}"
    ],
    "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                            
Content-Length: 39                                
                                                  
{                                                 
	"keys": [                                     
		"key1",                                   
		"key2"                                    
    ],                                            
    "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/remove HTTP/1.1
Content-Length: 32                                   
Content-Type: application/json                       
Host: test.flashphoner.com:8081                       
                                                     
{                                                    
	"keys": [                                        
		"key1"                                       
    ],                                               
    "name": "test"                                   
}                                                                                                    
Code Block
languagejs
themeRDark
HTTP/1.1 200 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/print HTTP/1.1
Content-Length: 15                                  
Content-Type: application/json                      
Host: test.flashphoner.com:8081                      
                                                    
Content-Length: 39
{                                    
               
	"name": "test"                                  
{
}                                                 
"keys":
 
[
                                     
"key1",
                                   
"key2"
                            
Code Block
languagejs
themeRDark
HTTP/1.1 200 OK      
    
],
     
Access-Control-Allow-Origin: *
Content-Length: 8             
Content-Type: application/json
                       
    
"name":
 
"test"
  
[                             

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


/cdn/stream/access_list/

...

delete

ЗапросОтвет
Code Block
languagejs
themeRDark
POST /rest-api/cdn/stream/access_list/removedelete HTTP/1.1
Content-Length: 3215                                   
Content-Type: application/json                       
Host: test.flashphoner.com:8081                       
                                                     
{                                                    
	"keys": [                                        
		"key1"    name": "test"                                   
    ],                                  }             
    "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/
stream/access_list/print
profile/add HTTP/1.1
Content-Length: 
15
502                                   
Content-Type: application/json                       
Host: test.flashphoner.com:8081
                       
       
{
                           
{
	"name": "-profile1",
	"profile": {
        "audio": {
            
"
name
type": "
test
audio"
            "bitrate": 0,
            "channels": 0,
        
}
    "codec": "opus",
            "rate": 48000,
       	},
		"video": {
			"type": "video",
            "bitrate": 0,
            "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-Length:
 
8
             
Content-Type:
 
application/json
                              
[
                             
    
"key2"
                    
]
                         
Code Block
languagejs
themeRDark
HTTP/1.1 200 OK
Access-Control-Allow-Origin: *
Content-Type: application/json


/cdn/

...

profile/modify

ЗапросОтвет
Code Block
languagejs
themeRDark
POST /rest-api/cdn
/stream/access_list/delete HTTP/1.1 Content-Length: 15
/profile/modify HTTP/1.1
Content-Length: 15                                   
Content-Type: application/json                       
Host: test.flashphoner.com:8081                       
                  
Content-Type:
 
application/json
                       
Host:
 
test.flashphoner.com:8081
          
{
	"name": "-profile1",
	"profile": {
		"video": {
			"bitrate": 400,
			"quality": 25
        }
	}
}
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                                   
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


[
	"-240p": {
	    "audio": {
	        "bitrate": 0,
	        "channels": 0,
	        "codec": "opus",
	        "rate": 48000,
	        "type": "audio"
	    },
	    "video": {
	        "bitrate": 0,
	        "codec": "h264",
	        "codecImpl": "FF",
	        "fps": 
Content-Type: application/json
25,
	        "gop": 50,
	        "height": 240,
	        "preset": "veryfast",
	       
Host: test.flashphoner.com:8081
 "quality": 0,
	        "type": "video",
	        "width": 0
    	}
	},
	"-480p": {
	    "audio": {
	        "bitrate": 0,
	        
"channels": 0,
	        
{
"
name
codec": "
-profile1
opus",
	
"profile":
 
{
       
"
audio
rate": 
{
48000,
	        
"type": "audio"
	    },
	    "video": {
	        "bitrate": 0,
	        
"
channels
codec": 
0
"h264",
	        
"
codec
codecImpl": "
opus
FF",
	        "
rate
fps": 
48000
25,
	       
}, "video":
 
{
"
type
gop": 
"video"
50,
	        
"
bitrate
height": 
0
480,
	        "
codec
preset": "
h264
veryfast",
	        
"
codecImpl
quality": 
"FF"
0,
	        
"
fps
type": 
30
"video",
	        
"
gop
width": 
90,
0
	    
"height": 360,
}
	}
]


/cdn/profile/remove

ЗапросОтвет
Code Block
languagejs
themeRDark
POST /rest-api/cdn/profile/remove HTTP/1.1
Content-Length: 15             
"quality":
 
0,
            
"width":
 
640
        
} } }

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

/cdn/profile/modify

ЗапросОтвет
Code Block
languagejs
themeRDark
POST /rest-api/cdn/profile/modify HTTP/1.1
Content-Length: 15
	"name": "-profile1"
}                                     
Content-Type: application/json                       
Host: test.flashphoner.com:8081                       
                                                     
{
	"name": "-profile1",
	"profile": {
		"video": {
			"bitrate": 400,
			"quality": 25
        }
	}
}
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/
profile/print
remove_node HTTP/1.1
Content-Length: 
0
15                                   
Content-Type: application/json
Host: test.flashphoner.com:8081
                       
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
[ "-240p": { "audio": {

/cdn/connection/reset_inbound

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

Content-Type: application/json      
"type":
 
"audio"
    
},
    
"video":
 
{
       
"bitrate": 0,

Host: test.flashphoner.com:8081          
"codec":
 
"h264",
        
"codecImpl":
 
"FF",
   
     
"fps":
 
25,
        
"gop":
 
50,
        
"height":
 
240,
        
"preset":
 
"veryfast",
        
"quality":
 
0,
        
"type":
 
"video",
  
{      
"width":
 
0
    
} }, "-480p":
 
{
    
"audio":
 
{
        
"bitrate":
 
0,
        
"channels":
 
0,
        
"codec":
 
"opus",
        
	"
rate
nodeId": 
48000, "type": "audio" }, "video": {
"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        
"bitrate":
 
0,
       
"codec":
 
"h264",
        
"codecImpl":
 
"FF",
        
"fps":
 
25,

Content-Type: application/json     
"gop": 50,
        
"height":
 
480,
        
"preset":
 
"veryfast",

Host: test.flashphoner.com:8081    
"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                       
         
	"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   
	"name": "-profile1"
}     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/
cdn
recorder/
remove_node
terminate HTTP/1.1
Content-Length: 
15
26                                   
Content-Type: application/json                       
Host
HOST: 
test
192.168.
flashphoner
1.
com
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",
        
"
nodeIp": "192.168.1.207" }
Code Block
languagejs
themeRDark
HTTP/1.1 200 OK
Access-Control-Allow-Origin: *
Content-Type: application/json

...

mediaSessionId": "5a072377-73c1-4caf-abd3"
    }
]

/multipleRecorder/startup

ЗапросОтвет
Code Block
languagejs
themeRDark
POST /rest-api/
cdn/connection/reset_inbound
multipleRecorder/startup HTTP/1.1
Content-Length: 15
Host: localhost:9091
Content-
Type
type: application/json
Host: test.flashphoner.com:8081

Content-Length: 22                       
                                                     
{

	"
nodeId
uri": "
192.168.1.207
multi-recorder://test-record"
}
Code Block
languagejs
themeRDark
HTTP/1.1 200 OK
Access-Control-Allow-Origin: *
Content-Type: application/json

/

...

multipleRecorder/add

ЗапросОтвет
Code Block
languagejs
themeRDark
POST /rest-api/
cdn/connection/reset_outbound
multipleRecorder/add HTTP/1.1
Host: localhost:9091
Content-type: application/json
Content-Length: 
15
78                       
            
Content-Type:
 
application/json
                       
Host:
 
test.flashphoner.com:8081
                
{
	"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",
    
"nodeId
"mediaSessionId": "
192.168.1.207
d010f9a0-fe34-11eb-9d0a-fb2207ead79d"
}
Code Block
languagejs
themeRDark
HTTP/1.1 200 OK
Access-Control-Allow-Origin: *
Content-Type: application/json

/

...

multipleRecorder/

...

find_all

ЗапросОтвет
Code Block
languagejs
themeRDark
POST /rest-api/
cdn
multipleRecorder/
connection/reset
find_all HTTP/1.1
Host: localhost:9091
Content-
Length
type: 
0
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",
      
Host: test.flashphoner.com:8081
"dca111f0-fe34-11eb-ba46-45d41f052372",
      "e7614c40-fe34-11eb-8d5e-07d6ca1cc7ff"
    ],
    "uri": "multi-recorder://test-record",
    
Code Block
languagejs
themeRDark
HTTP/1.1 200 OK
Access-Control-Allow-Origin: *
Content-Type: application/json

...

"fileName": "multi-recorder___test-record.mp4"
  }
]


/multipleRecorder/terminate

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


/

...

transcoder/

...

startup

ЗапросОтвет
Code Block
languagejs
themeRDark
POST /rest-api/recorder/terminate HTTP/1.1 Content-Length: 26 Content-Type: application/json
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,
        
{
"
mediaSessionId
watermark": "
5a072377-73c1-4caf-abd3"
Test.png"
 	}
}
Code Block
languagejs
themeRDark
HTTP/1.1 200 OK
Access-Control-Allow-Origin: * Content-Type: application/json

...

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/
recorder
transcoder/find
_all
 HTTP/1.1
HOST: 192.168.1.101:8081
content-type: application/json
content-length: 
0
30

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

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",
        "
fileName
status": "
9c3e-test-1563776083752-{endTime}.mp4
PROCESSED_LOCAL",
        "
mediaSessionId
hasAudio": true,
      
"5a072377-73c1-4caf-abd3"
  "hasVideo": true,
    
} ]

/multipleRecorder/startup

ЗапросОтвет Code Block
languagejs
themeRDark
POST /rest-api/multipleRecorder/startup HTTP/1.1 Host: localhost:9091 Content-type: application/json Content-Length: 22
    "record": false,
        "encoder": {
            "width": 640,
            "height": 480,
            "keyFrameInterval": 30,
            "fps": 30,
            "watermark": "Test.png"
        
}
    
{ "uri": "multi-recorder://test-record"
}
Code Block
languagejs
themeRDark
HTTP/1.1 200 OK
Access-Control-Allow-Origin: *

...


]

/transcoder/find_all

ЗапросОтвет
Code Block
languagejs
themeRDark
POST /rest-api/
multipleRecorder
transcoder/
add
find_all HTTP/1.1
Host
HOST: 
localhost:9091 Content
192.168.1.101:8081
content-type: application/json
Content
content-
Length
length: 
78
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": "
multi-recorder
transcoder://
test-record
tcode1",
        "
mediaSessionId
status": "
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
PROCESSED_LOCAL",
        "hasAudio": true,
        "hasVideo": true,
        "record": false,
       
 "encoder": {
            "width": 640,
            "height": 480,
            "keyFrameInterval": 30,
            
{
"
uri
fps": 
"multi-recorder://test-record"
30,
            "
mediaSessionId
watermark": "
d010f9a0-fe34-11eb-9d0a-fb2207ead79d" }
Code Block
languagejs
themeRDark
HTTP/1.1 200 OK
Access-Control-Allow-Origin: *

...

Test.png"
        }
    }
]

/transcoder/terminate

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

{
	"uri":"transcoder://tcode1"
}
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: 
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" } ]

...

0
Date: Thu, 06 Dec 2018 4:16:40 GMT

/transcoder/set_watermark

Запрос

Ответ

Code Block
languagejs
themeRDark
POST /rest-api/
multipleRecorder
transcoder/
terminate
set_watermark HTTP/1.1
Host: localhost:
9091
8081
Accept: */*
Content-
type
Type: application/json
Content-Length: 
22 { "uri": "multi-recorder://test-record"
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: *

...

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/transcodertranscoder2/startup HTTP/1.1
HOST: 192.168.1.101:8081
content-type: application/json
content-length: 83242

{
	    "uri": "transcodertranscoder2://tcode1tcode2",
	"remoteStreamName    "localStreamName": "testtestT",
	"localStreamName    "remoteStreamName": "testTtest",
	    "encoder": {
		      "width": 640320,
		      "height": 480240,
		      "keyFrameInterval": 3060,
		      "fps": 30,
      "bitrate": 1000,
      "audioRate": 44100,
      "audioBitrate": 64000,
      "audioCodec": "mpeg4-generic",
      "watermarkvideoCodec": "Test.png"
 	H264"
    }
}
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

...

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

/transcoder2/find

ЗапросОтвет
Code Block
languagejs
themeRDark
POST /rest-api/transcodertranscoder2/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
ServerAccess-Control-Allow-Origin: Apache-Coyote/1.1*
Access-Control-Allow-Credentials: true
Content-LengthType: 286
Date: Thu, 06 Dec 2018 4:16:40 GMTapplication/json
Content-Length: 387

[
    {
        "localMediaSessionId": "42a92132abde0bbf-bcd1558f-443649e7-a96f88e8-3fec36b32b375431824dbc6c",
        "localStreamName": "testT",
        "remoteStreamName": "test",
        "uri": "transcodertranscoder2://tcode1tcode2",
        "status": "PROCESSED_LOCAL",
        "hasAudio": true,
        "hasVideo": true,
        "record": false,
        "encoder": {
            "width": 640320,
            "height": 480240,
        "keyFrameInterval": 60,
      "keyFrameIntervalfps": 30,
      "bitrate": 1000,
      "fpsaudioRate": 3044100,
      "audioCodec": "mpeg4-generic",
      "watermarkvideoCodec": "Test.pngH264",
      "videoRate": 90000
    }
    }
]

/

...

transcoder2/find_all

ЗапросОтвет
Code Block
languagejs
themeRDark
POST /rest-api/transcodertranscoder2/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
ServerAccess-Control-Allow-Origin: Apache-Coyote/1.1*
Access-Control-Allow-Credentials: true
Content-LengthType: 286
Date: Thu, 06 Dec 2018 4:16:40 GMTapplication/json
Content-Length: 387

[
    {
        "localMediaSessionId": "42a92132abde0bbf-bcd1558f-443649e7-a96f88e8-3fec36b32b375431824dbc6c",
        "localStreamName": "testT",
        "remoteStreamName": "test",
        "uri": "transcodertranscoder2://tcode1tcode2",
        "status": "PROCESSED_LOCAL",
        "hasAudio": true,
        "hasVideo": true,
        "record": false,
        "encoder": {
            "width": 640320,
      "height": 240,
      "heightkeyFrameInterval": 48060,
            "keyFrameIntervalfps": 30,
      "bitrate": 1000,
      "fpsaudioRate": 3044100,
      "audioCodec": "mpeg4-generic",
      "watermarkvideoCodec": "Test.pngH264",
      "videoRate": 90000
    }
    }
]

/

...

transcoder2/terminate

ЗапросОтвет
Code Block
languagejs
themeRDark
POST /rest-api/transcodertranscoder2/terminate HTTP/1.1
HOST: 192.168.1.101:8081
content-type.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
Content-
length
Length: 
30
73

{
 "uri":
"transcoder://tcode1"
"transcoder2://t1",
 "watermark":"/opt/media/logo.png",
 "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: 
Thu
Fri, 
06
19 
Dec
Aug 
2018
2022 
4
14:
16
55:
40
35 GMT


 

/

...

vod/

...

startup

ЗапросОтвет
Code Block
languagejs
themeRDark
POST /rest-api/
transcoder
vod/
set_watermark
startup HTTP/1.1
Host
HOST: 
localhost
192.168.1.101:8081
Accept: */* Content-Type
content-type: application/json
Content
content-
Length
length: 
72
83

{
	"uri":"
transcoder
vod-live://
t1", "watermark":"/opt/media/logo.png
sample.mp4",
	"
x
localStreamName":
10,
 "
y
test"
:10

}
Code Block
languagejs
themeRDark
HTTP/1.1 200 OK
Access-Control-Allow-Origin
Server: 
* Access-Control-Allow-Credentials: true
Apache-Coyote/1.1
Content-Length: 0
Date: 
Fri
Thu, 
19
06 
Aug
Dec 
2022
2018 
14
4:
55
16:
35
40 GMT
 


/

...

vod/

...

find

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

{
"uri
	"localStreamName": "
transcoder2://tcode2
test"
, "localStreamName": "testT", "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

[
    
"encoder":
{
        "
width
localMediaSessionId":
320,
 
"height": 240, "keyFrameInterval": 60,
"29ec3236-1093-42bb-88d6-d4ac37af3ac0",
        "
fps
localStreamName": 
30
"test",
        "
bitrate
uri": 
1000
"vod-live://sample.mp4",
        "
audioRate
status": 
44100
"PROCESSED_LOCAL",
        "
audioBitrate
hasAudio": 
64000
true,
        "
audioCodec
hasVideo": 
"mpeg4-generic"
true,
        "
videoCodec
record": 
"H264"
false
    }
}
Code Block
languagejs
themeRDark
HTTP/1.1 200 OK
Access-Control-Allow-Origin: *
Access-Control-Allow-Credentials: true

...

]


/vod/find_all

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

Code Block
languagejs
themeRDark
HTTP/1.1 200 OK
Access-Control-Allow-Origin
Server: 
* Access-Control-Allow-Credentials: true Content-Type: application/json Content-Length: 387
Apache-Coyote/1.1
Content-Length: 286
Date: Thu, 06 Dec 2018 4:16:40 GMT

[
    {
        "localMediaSessionId": "
abde0bbf
29ec3236-
558f
1093-
49e7
42bb-
88e8
88d6-
5431824dbc6c
d4ac37af3ac0",
        "localStreamName": "
testT
test",
    
"remoteStreamName":
 
"test",
   
"uri": "
transcoder2
vod-live://
tcode2
sample.mp4",
        "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 } } ]

...

}
]


/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/
transcoder2
hls/find_all HTTP/1.1
HOST
Host: 
192.168.1.101
localhost:8081
content-type
Connection: 
application/json content-length: 0
keep-alive
Content-Length: 22

{
  "offset":0,
  "size":10
}
Code Block
languagejs
themeRDark
HTTP/1.1 200 OK
Access-Control-Allow-Origin: *
Access-Control-Allow-Credentials
Content-Length: 
true
493
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
id": "test",
    "
record
streamName": 
false
"test",
    "
encoder
status": 
{
"ACTIVE",
    "
width
waitingSize": 
320
0,
    
"
height
profiles": 
240,
[
      "
keyFrameInterval": 60
a_test",
      "
fps": 30
v_test"
    ],
    
"
bitrate
subscribers": 
1000
1,
    
"audioRate": 44100, "audioCodec": "mpeg4-generic
"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",
    
"
videoCodec
createdDate": 
"H264"
1697691514126,
    
"
videoRate
logs": 
90000 }
[]
  }
]

/

...

hls/terminate

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

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

/transcoder2/set_watermark

Запрос

Ответ

Content-Type: application/json

/hls/profiles

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

{
  "hlsId":"test",
  "profileName":"v_test"
}
Code Block
languagejs
themeRDark
POST /rest-api/transcoder2/set_watermark
HTTP/1.1
Host: localhost:8081 Accept: */*
 200 OK
Access-Control-Allow-Origin: *
Content-Length: 1183
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
    }
]

...


{
  "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/
vod
hls/
terminate
subscribers HTTP/1.1
HOST
Host: 
192.168.1.101
localhost:8081
content-type
Connection: 
application/json content-length
keep-alive
Content-Length: 
30
16

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

/hls/startup

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

{Content-Type: application/json

[
  {
    "id": "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",
    "ip": "192.168.0.83",
    "port": 55832,
    "nameuserAgent": "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: centos3.flashphoner.com:8081
Connection: keep-alive
Content-Length: 0

...

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

{
  "test": {
    "handler": "com.flashphoner.server.client.handler.wcs4.WCS4Handler@15b75d07",
    "state": "ACTIVE",
    "writer": "HLS-test",
    "streamStatus": "PLAYING",
    "writerStarted": "true"
  }
}

/hls/terminate

ЗапросОтвет
Code Block
languagejs
themeRDark
POST /rest-api/hls/terminate HTTP/1.1
Host: centos3.flashphoner.com: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/jsonMozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/118.0.0.0 Safari/537.36",
    "active": true,
    "metrics": {
      "profileTime": {
        "test": 66,
        "v_test": 598216
      },
      "requestsNumber": 6537,
      "requestsStatuses": {
        "200 OK": 6536
      },
      "profileSwitches": 1,
      "maxResponseTime": 13,
      "minResponseTime": 0,
      "avgResponseTime": 0.4173168119932691
    }
  }
]

/sfu/stats

ЗапросОтвет
Code Block
languagejs
themeRDark
POST /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": [
    {
      "nickName": "User1",
      "outgoingTracks": [
        {
          "id": "9de9107c-ce5f-4d6b-b7d6-ea233d691d09",
          "codec": "opus",
          "bitrate": 0,
          "sampleRate": 48000,
          "channels": 2,
          "alive": true,
          "type": "AUDIO"
        },
        {
          "id": "237dcef9-c66d-4c72-bd43-0c91aaea3b7e",
          "composite": true,
          "tracks": {
            "h send": {
              "id": "237dcef9-c66d-4c72-bd43-0c91aaea3b7e",
              "codec": "H264",
              "width": 1280,
              "height": 720,
              "fps": 30,
              "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"
      }
    },
    {
      "nickName": "User2",
      "outgoingTracks": [
        {
          "id": "3c2dcd1c-7acd-4b90-8871-331be80cade0",
          "composite": true,
          "tracks": {
            "h send": {
              "id": "3c2dcd1c-7acd-4b90-8871-331be80cade0",
              "codec": "H264",
              "width": 1280,
              "height": 720,
              "fps": 30,
              "bitrate": 238688,
              "alive": true,
              "type": "VIDEO"
            },
            "m send": {
              "id": "3c2dcd1c-7acd-4b90-8871-331be80cade0",
              "codec": "H264",
              "width": 640,
              "height": 360,
              "fps": 30,
              "bitrate": 265368,
              "alive": true,
              "type": "VIDEO"
            }
          }
        }
      ],
      "incomingTracks": {
        "9de9107c-ce5f-4d6b-b7d6-ea233d691d09": null,
        "237dcef9-c66d-4c72-bd43-0c91aaea3b7e": "h send"
      }
    }
  ]
}

...

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

{
  "localStreamName":"test",
  "transport":"srt"
}
Code Block
languagejs
themeRDark
HTTP/1.1 200 OK
Access-Control-Allow-Origin: *
Content-Type: application/json
Content-Length: 230

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

/mpegts/find

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

{
 "localStreamName":"test",
 "uri": "srt://192.168.1.39:31014"
} 
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": "CONNECTEDPROCESSED_LOCAL",
  "hasAudio": truefalse,
  "hasVideo": truefalse,
  "record": false,
  "transport": "SRT",
  "cdn": false,
  "timeout": 90000,
  "maxTimestampDiff": 1,
  "allowedList": 90000[]
}]

/mpegts/find_all

ЗапросОтвет
Code Block
languagejs
themeRDark
POST /rest-api/mpegts/find_all HTTP/1.1
Host: localhost:8081
Content-Type: application/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
}]

...