Versions Compared

Key

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

...

Request

Response

Code Block
languagejs
themeRDark
POST /rest-api/mixer/setAudioVideo HTTP/1.1
Host: localhost:8081
Accept: */*
Content-Type: application/json
Content-Length: 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-Length: 0
Date: Fri, 24 Nov 2020 14:55:35 GMT



/mixer/

...

set_body_watermark

Request

Response

Code Block
languagejs
themeRDark
POST /rest-api/mixer/
test/start
set_body_watermark HTTP/1.1
HOST
Host: 
192.168.1.101
localhost:8081
Accept: */*
Content-
type
Type: application/json
Content-
length
Length: 
107
68

{
 "
feedingStreams
uri":
[ "s1
"mixer://m1",
 "
s2" ], "mixerCount": 3, "streamsInMixer": 1, "intervalInSeconds": 60 }
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: 
Wed
Fri, 
22
19 Aug 
2018
2022 
08
14:
53
55:
26
35 GMT


 

/mixer/

...

set_stream_watermark

Request

Response

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

{
}
 "uri":"mixer://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: 
Wed
Fri, 
22
19 Aug 
2018
2022 
08
14:
53
55:
26
35 GMT


 

/mixer/test/

...

start

...

Request

Response

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

{
}


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": [
		"s1",
		"s2"
    ],
    "mixerCount": 3,
    "feedingStreamsstreamsInMixer": [1,
        "stream1intervalInSeconds",
        "stream2",
        "stream3"
    ],
    "mixerCount": 3,
    "streamsInMixer": 1,
    "intervalInSeconds": 60
}


...

: 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

Request

Response

Code Block
languagejs
themeRDark
POST /rest-api/pullmixer/test/pullstop 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

Request

Response

Code Block
languagejs
themeRDark
POST /rest-api/pull/find_allmixer/test/get_start_example 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

Request

Response

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

Request

Response

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

 

...



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


/pull/push

Request

Response

Code Block
languagejs
themeRDark
POST /rest-api/
logger/enable_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",
	"
logLevel
remoteStreamName": "
DEBUG
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

Request

Response

Code Block
languagejs
themeRDark
POST /rest-api/
logger/disable_client_log
pull/terminate HTTP/1.1
HOST: 192.168.1.101:8081
content-type: application/json
content-length: 
71
31

{
	"
sessionId
uri": "
/127.0.0.1:57539/192.168.1.101:8443
wss://demo.flashphoner.com:8443/websocket"
}
Code Block
languagejs
themeRDark
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Content-Length: 0
Date: 
Wed
Fri, 
03
24 
Sep
Nov 
2018
2017 
06
14:
58
55:
40
35 GMT


 


/

...

logger/

...

enable_client_

...

log

RequestResponse
Code Block
languagejs
themeRDark
POST /rest-api/
cdn
logger/
show
enable_client_
nodes
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: 
224
0
Date: 
Thu
Wed, 
06
03 
Dec
Sep 2018 
4
06:
16
58:40 GMT
[ {


/logger/disable_client_log

RequestResponse
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

RequestResponse
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",
        "id": "192.168.1.39",
        "processingState": "NEW_STREAMS_ALLOWED",
        "role": "ORIGIN"
    }
]

...

RequestResponse
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"
         "fps": 30,
            "watermark": "Test.png"
        }
    }
]

...

   }
    }
]


/transcoder/terminate

RequestResponse
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

Request

Response

Code Block
languagejs
themeRDark
POST /rest-api/transcoder/
terminate
set_watermark HTTP/1.1
HOST
Host: 
192.168.1.101
localhost:8081
content-type
Accept: */*
Content-Type: application/
json content-length: 30 { "uri":"transcoder://tcode1"
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
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


 

/transcoder2/startup

RequestResponse
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

...

RequestResponse
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
        "videoCodec": "H264",
      "videoRate": 90000
    }
  }
]

...

}
  }
]

/transcoder2/terminate

RequestResponse
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

Request

Response

Code Block
languagejs
themeRDark
POST /rest-api/transcoder2/
terminate
set_watermark HTTP/1.1
HOST
Host: 
192.168.1.101
localhost:8081
content-type
Accept: */*
Content-Type: application/json
content
Content-
length
Length: 
30
73

{
 "uri":"transcoder2://
tcode2"
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

RequestResponse
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

...