Versions Compared

Key

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

...

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


/cdn/remove_node

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

/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

...

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

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

/transcoder2/startup

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

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

/transcoder2/find

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

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

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

/transcoder2/find_all

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

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

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

/transcoder2/terminate

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

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

/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

...