Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 43 Next »

/call/startup

Запрос

Ответ

POST /rest-api/call/startup HTTP/1.1
HOST: 192.168.1.59:8081
content-length: 417
content-type: application/json

{
	"callId":"123456711",
	"callee":"10000",
	"rtmpUrl":"rtmp://localhost:1935/live",
	"rtmpStream":"stream1",
	"hasAudio":"true",
	"hasVideo":"true",
	"sipLogin":"10009",
	"sipAuthenticationName":"10009",
	"sipPassword":"1234",
	"sipDomain":"226.226.225.226",
	"sipOutboundProxy":"226.226.225.226",
	"sipPort":"5060",
	"appKey":"defaultApp",
	"sipRegisterRequired":"false",
	"visibleName":"WCS_10009"
}
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Content-Length: 0
Date: Mon, 27 Mar 2017 03:23:54 GMT


/call/find_all

Запрос

Ответ

POST /rest-api/call/find_all HTTP/1.1
Host: 192.168.1.101:8081
Content-Length: 0
Content-Type: application/json
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Content-Type: application/json;charset=UTF-8
Date: Tue, 28 Mar 2017 12:13:24 GMT

[
	{
		"custom" {},
		"nodeId":null,
		"appKey":null,
		"sessionId":null,
		"callId":"83077OWQzZTRkNzIzNjk1NTI5NmUwZWFlOGU1MWU0NDVkN2U",
		"parentCallId":null,
		"incoming":true,
		"status":"ESTABLISHED",
		"sipStatus":null,
		"rtmpUrl":null,
		"rtmpStream":null,
		"rtmpStreamStatus":null,
		"caller":"005",
		"callee":"001",
		"hasAudio":true,
		"hasVideo":true,
		"sdp":".....",
		"visibleName":"005",
		"inviteParameters":null,
		"mediaProvider":"WebRTC",
		"sipMessageRaw":".....",
		"isMsrp":false,
		"target":null,
		"holdForTransfer":false
		},{
		"custom":{},
		"nodeId":null,
		"appKey":null,
		"sessionId":null,
		"callId":"e9516680-13af-11e7-af37-05c788b22e35",
		"parentCallId":null,
		"incoming":false,
		"status":"RING",
		"sipStatus":180,
		"rtmpUrl":null,
		"rtmpStream":null,
		"rtmpStreamStatus":null,
		"caller":"002",
		"callee":"005",
		"hasAudio":true,
		"hasVideo":false,
		"sdp":null,
		"visibleName":"002",
		"inviteParameters":null,
		"mediaProvider":"WebRTC",
		"sipMessageRaw":null,
		"isMsrp":false,
		"target":null,
		"holdForTransfer":false
	}
]


/call/find

Запрос

Ответ

POST /rest-api/call/find HTTP/1.1
Host: 192.168.1.101:8081
Content-Length: 70
Content-Type: application/json

{
	"status" : "ESTABLISHED",
	"rtmpUrl" : "rtmp://localhost:1935/live"
}
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Content-Type: application/json;charset=UTF-8
Date: Tue, 28 Mar 2017 12:37:55 GMT

[
	{
		"custom":{},
		"nodeId":null,
		"appKey":null,
		"sessionId":null,
		"callId":"MzEjol9dY-TIg9FpAy-J3YmhDbyY-g7w771EDq",
		"parentCallId":null,
		"incoming":false,
		"status":"ESTABLISHED",
		"sipStatus":200,
		"rtmpUrl":"rtmp://localhost:1935/live",
		"rtmpStream":"stream1",
		"rtmpStreamStatus":"RTMP_STREAM_ACTIVE",
		"caller":"001",
		"callee":"005",
		"hasAudio":true,
		"hasVideo":true,
		"sdp":null,
		"visibleName":"001",
		"inviteParameters":null,
		"mediaProvider":"Flash",
		"sipMessageRaw":null,
		"isMsrp":false,
		"target":null,
		"holdForTransfer":false
	}
]



/call/terminate

Запрос

Ответ

POST /rest-api/call/terminate HTTP/1.1
Host: 192.168.1.101:8081
Content-Length: 53
Content-Type: application/json

{
	"callId" : "yOh8vRDfr-lko7fXTg-pKJDHXQ-TW8PhcS"
}
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Content-Length: 0
Date: Tue, 28 Mar 2017 12:48:29 GMT


/call/send_dtmf

Запрос

Ответ

POST /rest-api/call/send_dtmf HTTP/1.1
Host: 192.168.1.101:8081
Content-Length: 83
Content-Type: application/json

{
	"callId" : "yOh8vRDfr-lko7fXTg-pKJDHXQ-TW8PhcS",
	"dtmf":"9",
	"type":"RFC2833"
}
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Content-Length: 0
Date: Tue, 28 Mar 2017 13:00:34 GMT


/call/inject_sound

Запрос

Ответ

POST /rest-api/call/inject_sound HTTP/1.1
Host: 192.168.1.101:8081
Content-Type: application/json;charset=UTF-8
Content-Length: 69

{
	"callId":"yOh8vRDfr-lko7fXTg-pKJDHXQ-TW8PhcS",
	"fileName":"test.wav"
}
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Content-Length: 0
Date: Thu, 23 Nov 2017 09:37:23 GMT


/call/inject_stream/startup

Запрос

Ответ

POST /rest-api/call/inject_stream/startup HTTP/1.1
Host: 192.168.1.101:8081
Content-Type: application/json;charset=UTF-8
Content-Length: 69

{
	"callId":"yOh8vRDfr-lko7fXTg-pKJDHXQ-TW8PhcS",
	"streamName":"mixer1"
}
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Content-Length: 0
Date: Thu, 23 Nov 2017 09:47:57 GMT


/call/inject_stream/terminate

Запрос

Ответ

POST /rest-api/call/inject_stream/terminate HTTP/1.1
Host: 192.168.1.101:8081
Content-Type: application/json;charset=UTF-8
Content-Length: 50

{
	"callId":"yOh8vRDfr-lko7fXTg-pKJDHXQ-TW8PhcS"
}
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Content-Length: 0
Date: Thu, 23 Nov 2017 12:42:52 GMT


/rtsp/startup

Запрос

Ответ

POST /rest-api/rtsp/startup HTTP/1.1
Host: 192.168.1.101:8081
Content-Length: 56
Content-Type: application/json

{
	"uri": "rtsp://s1.media-planet.sk:80/live/bardejov1",
    "localStreamName": "stream1"
}
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Content-Length: 0
Date: Tue, 28 Mar 2017 13:18:01 GMT


/rtsp/find_all

Запрос

Ответ

POST /rest-api/rtsp/find_all HTTP/1.1
Host: 192.168.1.101:8081
Content-Length: 0
Content-Type: application/json
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Content-Type: application/json;charset=UTF-8
Date: Tue, 28 Mar 2017 14:47:08 GMT

[
	{
	  "uri":"rtsp://s1.media-planet.sk:80/live/bardejov1",
      "toStream":"stream1",
      "status":"PLAYING"
	},{
	  "uri":"rtsp://str81.creacast.com/grandlilletv/high",
      "toStream":"rtsp://str81.creacast.com/grandlilletv/high",
      "status":"PLAYING"
	}
]


/rtsp/find

Запрос

Ответ

POST /rest-api/rtsp/find HTTP/1.1
Host: 192.168.1.101:8081
Content-Length: 72
Content-Type: application/json

{
"uri":"rtsp://str81.creacast.com/grandlilletv/high","status":"PLAYING"
}
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Content-Type: application/json;charset=UTF-8
Date: Tue, 28 Mar 2017 14:57:05 GMT

[
	{
		"uri":"rtsp://str81.creacast.com/grandlilletv/high",
        "toStream":"rtsp://str81.creacast.com/grandlilletv/high",
        "status":"PLAYING"
	}
]


/rtsp/terminate

Запрос

Ответ

POST /rest-api/rtsp/terminate HTTP/1.1
Host: 192.168.1.101:8081
Content-Length: 53
Content-Type: application/json

{
	"uri":"rtsp://s1.media-planet.sk:80/live/bardejov1"
}
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Content-Length: 0
Date: Tue, 28 Mar 2017 15:02:07 GMT


/stream/find_all

Запрос

Ответ

POST /rest-api/stream/find_all HTTP/1.1
Host: 192.168.1.101:8081
Content-Length: 0
Content-Type: application/json
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Content-Type: application/json;charset=UTF-8
Date: Tue, 28 Mar 2017 15:10:38 GMT

[
	{
		"custom":{},
		"nodeId":null,
		"appKey":"defaultApp",
		"sessionId":"/192.168.1.102:13252/192.168.1.101:8443",
		"mediaSessionId":"9e7a6da0-13c8-11e7-a92a-b50084e40e7d",
		"remoteMediaElementId":null,
		"name":"stream1",
		"published":false,
		"hasVideo":true,
		"hasAudio":true,
		"status":"PLAYING",
		"sdp":".....",
		"info":null,
		"record":false,
		"recordName":null,
		"width":0,
		"height":0,
		"bitrate":0,
		"quality":0,
		"rtmpUrl":null,
		"streamInfo":{
		    "custom":{},
		    "nodeId":null,
		    "appKey":null,
		    "sessionId":null,
		    "mediaSessionId":"9e7a6da0-13c8-11e7-a92a-b50084e40e7d",
		    "name":"stream1",
		    "samplingTime":null,
		    "recordTimestamp":null,
		    "recordStarted":false
		},
		"mediaProvider":"WebRTC"
		},{
			"custom":{},
			"nodeId":null,
			"appKey":"flashStreamingApp",
			"sessionId":"398c1948-5510-4842-b647-53c2f0d36c45",
			"mediaSessionId":"06844ffd-1dce-4a77-a2c2-37629f0e4d13",
			"remoteMediaElementId":null,
			"name":"stream1",
			"published":true,
			"hasVideo":false,
			"hasAudio":true,
			"status":"PUBLISHING",
			"sdp":".....",
			"info":null,
			"record":false,
			"recordName":null,
			"width":0,
			"height":0,
			"bitrate":0,
			"quality":0,
			"rtmpUrl":null,
			"streamInfo":{
		    "custom":{},
		    "nodeId":null,
		    "appKey":null,
		    "sessionId":null,
		    "mediaSessionId":"06844ffd-1dce-4a77-a2c2-37629f0e4d13",
		    "name":"stream1",
		    "samplingTime":null,
		    "recordTimestamp":null,
		    "recordStarted":false
		},
		"mediaProvider":"Flash"
	}
]


/stream/find

Запрос

Ответ

POST /rest-api/stream/find HTTP/1.1
Host: 192.168.1.101:8081
Content-Length: 57
Content-Type: application/json

{
	"name":"stream1",
	"published":true,
    "display":["metrics"]
}
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Content-Type: application/json;charset=UTF-8
Date: Tue, 26 Mar 2021 11:05:16 GMT

[
  {
    "appKey": "defaultApp",
    "sessionId": "/5.129.23.83:51294/95.191.130.39:8443-118f9784-d3b0-4e2b-8837-425eb71efcbe",
    "mediaSessionId": "86108970-8de5-11eb-afa9-0d709beccf93",
    "name": "test",
    "published": true,
    "hasVideo": true,
    "hasAudio": true,
    "status": "PUBLISHING",
    "sdp": "...",
    "audioCodec": "opus",
    "videoCodec": "H264",
    "record": false,
    "width": 640,
    "height": 360,
    "bitrate": 0,
    "minBitrate": 0,
    "maxBitrate": 0,
    "quality": 0,
    "history": false,
    "gop": 0,
    "fps": 0,
    "audioBitrate": 0,
    "codecImpl": "",
    "transport": "UDP",
    "cvoExtension": false,
    "createDate": 1616730250682,
    "mediaType": "publish",
    "mediaProvider": "WebRTC",
    "metrics": {
      "VIDEO_SYNC": 3825719227118,
      "VIDEO_K_FRAMES": 87,
      "AUDIO_SYNC": 3825719227166,
      "VIDEO_NACK": 0,
      "AUDIO_RATE": 32912,
      "AUDIO_LOST": 112,
      "VIDEO_LOST": 0,
      "VIDEO_CODEC": 119,
      "VIDEO_B_FRAMES": 0,
      "VIDEO_PLI": 0,
      "AUDIO_CODEC": 111,
      "VIDEO_RATE": 542200,
      "VIDEO_WIDTH": 640,
      "VIDEO_GOP_SIZE": 60,
      "VIDEO_HEIGHT": 360,
      "VIDEO_FPS": 13,
      "VIDEO_P_FRAMES": 4972
    }
  }
]


/stream/terminate

Запрос

Ответ

POST /rest-api/stream/terminate HTTP/1.1
Host: 192.168.1.101:8081
Content-Length: 57
Content-Type: application/json

{
	"mediaSessionId":"4f112b20-13d0-11e7-b521-59a9cb7eddeb"
}
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Content-Length: 0
Date: Tue, 28 Mar 2017 16:11:48 GMT


/stream/snapshot 

Запрос

Ответ

POST /rest-api/stream/snapshot HTTP/1.1
Host: 192.168.1.101:8081
Content-Length: 57
Content-Type: application/json

{
	"streamName" : "64966f33"
}
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Content-Length: 858
Date: Tue, 28 Mar 2017 16:11:48 GMT

{
	"data":"iVBORw0KGgoAAAANSUhEUgAAAUAAAADwCAYAAABxLb1rAAAACXBIWXMAAAAAAAAAAQCEeRdzAAAQAElEQVR4nOzd95Pcd37feVjhrFKwXT6fr+r+gPvh6nx1V5bvLMt3liXbkiWtrF1v1O5qVxu4icucwUyABAMIAgSIQOQcBzlnzAADDIDJuadzzjmH173f7+/302l6gO4GiCHIZtWjeqZnejAAu5/9+XzD57tgwYIF6Ojo6PiSmvdfoKOjo2O+zPsv0NHR0TFf5v0X6Ojo6Jgv8/4LdHR0dMyXef8FOjo6OubLvP8CHR0dHfNl3n+Bjo6Ojvky779AR0dHx3yZ91+go6OjY77M+y/Q0dHRMV/m/Rfo6OjomC/z/gt0dHR0zJd5/wU6Ojo65su8/wIdHR0d82Xef4GOjo6O+TLvv0BHR0fHfJn3X6Cjo6Njvsz7L9DR0dExX+b9F+jo6OiYL/P+C3R0dHTMl3n/BTo6Ojrmy7z/Ah0dHR1t+Ue636rzGzr19Tv8jPn/S3R0dHS04z4E8HfR0dHR8XD5DaGC94/rdALY0dHxBXafAlj/wI6OjofPb7foXh//edcJYEfHl4gaCd0tDPXf0+rjHxbNT4F/6/fR0dHxkPsNnhb+DvnNO7zYf1P7nt/8vTYf/3nzj8hvk/+B/GPt76DIfey3dHP8jN/8g/8JHR0dD7d/9Hv/Ixb87j/Hgt/5ZzSt+6dY8D/8Eyz47T+o4Pv4a/Q9v/H7/6L1x3+e8O+m/134d/+tf/Iv8dv/9H/G7/zz/6Xs9/7ZvxS//8/+hfiDP/gD/P7v/z5+7/d+D7/7u7+L3/md3xELVl6PoaOj4"
}


/stream/startRecording

Запрос

Ответ

POST /rest-api/stream/startRecording HTTP/1.1
Host: 192.168.1.101:8081
Content-Length: 65
Content-Type: application/json

{
	"mediaSessionId":"b8ffd290-bcfa-11e9-9482-17706e285ec5",
		"config": {
			"fileTemplate": "{streamName}-{startTime}-{endTime}",
			"rotation": "20M"
	}
}
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Content-Length: 0
Date: Tue, 28 Mar 2017 16:11:48 GMT


/stream/stopRecording

Запрос

Ответ

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"
}
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

Запрос

Ответ

POST /rest-api/stream/event/send HTTP/1.1
Host: localhost:8081
Content-Type: application/json
Content-Length: 77

{
    "streamName":"test",
    "payload":{
        "number":33,
        "string":"hello",
        "boolean":true
    }
}
HTTP/1.1 200 OK
Access-Control-Allow-Origin: *
Access-Control-Allow-Credentials: true


/data/send

Запрос

Ответ

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"
	}
}
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

Запрос

Ответ

POST /rest-api/connection/find_all HTTP/1.1
Host: 192.168.1.101:8081
Content-Length: 0
Content-Type: application/json
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 ..."
	}
]


/connection/find

Запрос

Ответ

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"
}
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":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

Запрос

Ответ

POST /rest-api/connection/terminate HTTP/1.1
Host:192.168.1.101:8081
Content-Length: 55
Content-Type: application/json

{
	"sessionId":"/192.168.1.102:39564/192.168.1.101:8443"
}
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Content-Length: 0
Date: Tue, 28 Mar 2017 17:21:40 GMT


/push/startup

Запрос

Ответ

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
}
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

Ответ

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"
}
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

Запрос

Ответ

POST /rest-api/push/find_all HTTP/1.1
Host: 192.168.1.101:8081
Content-Length: 0
Content-Type: application/json
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

Запрос

Ответ

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

{
	"mediaSessionId": "6dk1l0m3cm17c68232bccm52f1"
}
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Content-Length: 0
Date: Fri, 28 Apr 2017 12:56:51


/push/mute

Запрос

Ответ

POST /rest-api/push/mute HTTP/1.1
Host: 192.168.1.101:8081
Content-Length: 48
Content-Type: application/json

{
	"mediaSessionId": "gocrv1ncahlkcqht9k2nbs8tbc"
}
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Content-Length: 0
Date: Mon, 03 Jul 2017 09:06:14 GMT


/push/unmute

Запрос

Ответ

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

{
	"mediaSessionId": "gocrv1ncahlkcqht9k2nbs8tbc"
}
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

Запрос

Ответ

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
}


 

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

Запрос

Ответ

POST /rest-api/push/sound_off HTTP/1.1
Host: 192.168.1.101:8081
Content-Length: 48
Content-Type: application/json

{
	"mediaSessionId": "gocrv1ncahlkcqht9k2nbs8tbc"
}
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Content-Length: 0
Date: Mon, 03 Jul 2017 09:12:25 GMT


/pull/rtmp/pull

Запрос

Ответ

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

{
	"uri":"rtmp://rtmp.flashphoner.com:1935/live/rtmp_stream1",
    "localStreamName":"stream1"
}
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

Запрос

Ответ

POST /rest-api/pull/rtmp/find_all HTTP/1.1
Host: 192.168.1.101:8081
Content-Length: 0
Content-Type: application/json
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Content-Type: application/json;charset=UTF-8
Date: Fri, 24 Nov 2017 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
	}
]


/pull/rtmp/terminate

Запрос

Ответ

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

{
	"uri":"rtmp://rtmp.flashphoner.com:1935/live/rtmp_stream1"
}
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Content-Length: 0
Date: Thu, 23 Nov 2017 09:47:31 GMT


/mixer/startup

Запрос

Ответ

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

{
	"uri": "mixer://mixer1",
	"localStreamName": "mixer1_stream",
    "hasVideo": true,
    "hasAudio": false,
    "watermark": "watermark.png",
    "background": "background.png",
    "mixerLayoutClass": "com.flashphoner.mixerlayout.TestLayout"
}
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Content-Length: 0
Date: Fri, 24 Nov 2017 14:55:26 GMT


/mixer/add

Запрос

Ответ

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": "rtmp://rtmp.flashphoner.com:1935/live/stream1"
}
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Content-Length: 0
Date: Fri, 24 Nov 2017 15:21:06 GMT


/mixer/remove

Запрос

Ответ

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"
}
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Content-Length: 0
Date: Fri, 24 Nov 2017 15:21:12 GMT


/mixer/find_all

Запрос

Ответ

POST /rest-api/mixer/find_all HTTP/1.1
HOST: 192.168.1.101:8081
content-type: application/json
content-length: 0
HTTP/1.1 200 OK
Access-Control-Allow-Origin: *
Access-Control-Allow-Credentials: true
Content-Type: application/json
Content-Length: 574
 
[
  {
    "localMediaSessionId": "e2fa5c8b-16f3-4917-9d5f-557dde75db07",
    "localStreamName": "m1",
    "uri": "mixer://m1",
    "status": "PROCESSED_LOCAL",
    "hasAudio": true,
    "hasVideo": true,
    "record": false,
    "mediaSessions": [
      {
        "localMediaSessionId": "3dd763b0-2ae7-11eb-aa72-37b2cbcbf6b9",
        "audioLevel": 0,
        "videoMuted": true,
        "localStreamName": "stream1"
      },
      {
        "localMediaSessionId": "8af64760-2ae7-11eb-b086-cdf035231b9d",
        "audioLevel": 100,
        "videoMuted": false,
        "localStreamName": "desktop"
      },
      {
        "localMediaSessionId": "7cc4b410-2ae7-11eb-b34c-a5240fe9f151",
        "audioLevel": 0,
        "videoMuted": false,
        "localStreamName": "stream2"
      }
    ]
  }
]


/mixer/terminate

Запрос

Ответ

POST /rest-api/mixer/terminate HTTP/1.1
HOST: 192.168.1.101:8081
content-type: application/json
content-length: 31

{
	"uri": "mixer://mixer1"
}
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Content-Length: 0
Date: Fri, 24 Nov 2017 14:55:35 GMT


 

/mixer/setAudioVideo

Запрос

Ответ

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
}
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/test/start

Запрос

Ответ

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"
    ],
    "mixerCount": 3,
    "streamsInMixer": 1,
    "intervalInSeconds": 60
}
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

Запрос

Ответ

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

{
}


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

Запрос

Ответ

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

{
}


HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Content-Length: 107
Date: Wed, 22 Aug 2018 08:53:26 GMT

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



/pull/pull

Запрос

Ответ

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": "6602"
	"remoteStreamName": "6602"
}
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

Запрос

Ответ

POST /rest-api/pull/find_all HTTP/1.1
Host: 192.168.1.101:8081
Content-Length: 0
Content-Type: application/json
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Content-Type: application/json;charset=UTF-8
Date: Fri, 24 Nov 2017 14:27: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

Запрос

Ответ

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"
}
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Content-Length: 0
Date: Thu, 23 Nov 2017 09:47:23 GMT


/pull/terminate

Запрос

Ответ

POST /rest-api/pull/terminate HTTP/1.1
HOST: 192.168.1.101:8081
content-type: application/json
content-length: 31

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


 


/logger/enable_client_log

ЗапросОтвет
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"
}
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

ЗапросОтвет
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"
}
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

ЗапросОтвет
POST /rest-api/cdn/show_nodes HTTP/1.1
HOST: 192.168.1.101:8081
content-type: application/json
content-length: 0
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"
    }
]


/cdn/show_routes

ЗапросОтвет
POST /rest-api/cdn/show_routes HTTP/1.1
HOST: 192.168.1.101:8081
content-type: application/json
content-length: 0
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

ЗапросОтвет
POST /rest-api/cdn/show_state HTTP/1.1
HOST: 192.168.1.101:8081
content-type: application/json
content-length: 0
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

ЗапросОтвет
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"
}
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

ЗапросОтвет
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"
}
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

ЗапросОтвет
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"                                
}                                                 
HTTP/1.1 200 OK
Access-Control-Allow-Origin: *
Content-Type: application/json


/cdn/stream/access_list/remove

ЗапросОтвет
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"                                   
}                                                                                                    
HTTP/1.1 200 OK
Access-Control-Allow-Origin: *
Content-Type: application/json


/cdn/stream/access_list/print

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


/cdn/stream/access_list/delete

ЗапросОтвет
POST /rest-api/cdn/stream/access_list/delete HTTP/1.1
Content-Length: 15                                   
Content-Type: application/json                       
Host: test.flashphoner.com:8081                       
                                                     
{                                                    
	"name": "test"                                   
}                                                                                                                                                       
HTTP/1.1 200 OK
Access-Control-Allow-Origin: *
Content-Type: application/json


/cdn/profile/add

ЗапросОтвет
POST /rest-api/cdn/profile/add HTTP/1.1
Content-Length: 502                                   
Content-Type: application/json                       
Host: test.flashphoner.com:8081                       
                                  
{
	"name": "-profile1",
	"profile": {
        "audio": {
            "type": "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
        }
	}
}                                                                                                                                                       
HTTP/1.1 200 OK
Access-Control-Allow-Origin: *
Content-Type: application/json


/cdn/profile/modify

ЗапросОтвет
POST /rest-api/cdn/profile/modify HTTP/1.1
Content-Length: 15                                   
Content-Type: application/json                       
Host: test.flashphoner.com:8081                       
                                                     
{
	"name": "-profile1",
	"profile": {
		"video": {
			"bitrate": 400,
			"quality": 25
        }
	}
}
HTTP/1.1 200 OK
Access-Control-Allow-Origin: *
Content-Type: application/json


/cdn/profile/print

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

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


/cdn/profile/remove

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


/cdn/remove_node

ЗапросОтвет
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"
}                                                                                                                                                       
HTTP/1.1 200 OK
Access-Control-Allow-Origin: *
Content-Type: application/json

/recorder/startup

ЗапросОтвет
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"
		}
}
HTTP/1.1 200 OK
Access-Control-Allow-Origin: *
Content-Type: application/json


/recorder/terminate

ЗапросОтвет
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"
}
HTTP/1.1 200 OK
Access-Control-Allow-Origin: *
Content-Type: application/json


/recorder/find_all

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

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

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


/transcoder/find

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

{
	"remoteStreamName": "test"
}
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

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

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

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

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

/transcoder2/startup

ЗапросОтвет
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"
    }
}
HTTP/1.1 200 OK
Access-Control-Allow-Origin: *
Access-Control-Allow-Credentials: true

/transcoder2/find

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

{
	"remoteStreamName": "test"
}
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

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

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

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

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

/vod/startup

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


/vod/find

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

{
	"localStreamName": "test"
}
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

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

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

ЗапросОтвет
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"
}
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: 16
Content-Type: application/json

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

/hls/find_all

ЗапросОтвет
POST /rest-api/hls/find_all HTTP/1.1
Host: centos3.flashphoner.com:8081
Connection: keep-alive
Content-Length: 0
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

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

{
    "name": "test"
}
HTTP/1.1 200 OK
Access-Control-Allow-Origin: *
Content-Type: application/json
  • No labels