Versions Compared

Key

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

...

Запрос

Ответ

Code Block
languagejs
themeRDark
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"
}}
Code Block
languagejs
themeRDark
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Content-Length: 0
Date: Tue, 28 Mar 2017 16:11:48 GMT

...

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

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


/recorder/startup

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


/recorder/terminate

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


/recorder/find_all

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

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


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


/transcoder/startup

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


{
 "uri": "transcoder://tcode1",
 "remoteStreamName": "test",
 "localStreamName": "testT",
 "encoder": {
  "width": 640,
  "height": 480,
  "keyFrameInterval": 30,
  "fps": 30
 }
}
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

...