From 921b06adac0275ddb3f7bc7a1ee2b6c64233d62a Mon Sep 17 00:00:00 2001 From: aler9 Date: Sat, 7 Aug 2021 17:03:49 +0000 Subject: [PATCH] deploy: 20ac1b81dbc23ceeec187ecf593b2d7b9016196b --- .nojekyll | 0 index.html | 431 ++++++++++++++++++++++++++++++++++++++++++++++++ openapi.yaml | 456 +++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 887 insertions(+) create mode 100644 .nojekyll create mode 100644 index.html create mode 100644 openapi.yaml diff --git a/.nojekyll b/.nojekyll new file mode 100644 index 00000000..e69de29b diff --git a/index.html b/index.html new file mode 100644 index 00000000..93c4e0cf --- /dev/null +++ b/index.html @@ -0,0 +1,431 @@ + + + + + + rtsp-simple-server API + + + + + + + + + +

rtsp-simple-server API (1.0.0)

Download OpenAPI specification:Download

License: MIT

API of rtsp-simple-server, a RTSP / RTMP / HLS server and proxy.

+

returns the current configuration.

Responses

Response samples

Content type
application/json
{
  • "logLevel": "string",
  • "logDestinations": [
    ],
  • "logFile": "string",
  • "readTimeout": 0,
  • "writeTimeout": 0,
  • "readBufferCount": 0,
  • "api": true,
  • "apiAddress": "string",
  • "metrics": true,
  • "metricsAddress": "string",
  • "pprof": true,
  • "pprofAddress": "string",
  • "runOnConnect": "string",
  • "runOnConnectRestart": true,
  • "rtspDisable": true,
  • "protocols": [
    ],
  • "encryption": "string",
  • "rtspAddress": "string",
  • "rtspsAddress": "string",
  • "rtpAddress": "string",
  • "rtcpAddress": "string",
  • "multicastIPRange": "string",
  • "multicastRTPPort": 0,
  • "multicastRTCPPort": 0,
  • "serverKey": "string",
  • "serverCert": "string",
  • "authMethods": [
    ],
  • "readBufferSize": 0,
  • "rtmpDisable": true,
  • "rtmpAddress": "string",
  • "hlsDisable": true,
  • "hlsAddress": "string",
  • "hlsAlwaysRemux": true,
  • "hlsSegmentCount": 0,
  • "hlsSegmentDuration": 0,
  • "hlsAllowOrigin": "string",
  • "paths": {
    }
}

changes the current configuration.

all fields are optional.

+
Request Body schema: application/json
logLevel
string
logDestinations
Array of strings
logFile
string
readTimeout
integer
writeTimeout
integer
readBufferCount
integer
api
boolean
apiAddress
string
metrics
boolean
metricsAddress
string
pprof
boolean
pprofAddress
string
runOnConnect
string
runOnConnectRestart
boolean
rtspDisable
boolean
protocols
Array of strings
encryption
string
rtspAddress
string
rtspsAddress
string
rtpAddress
string
rtcpAddress
string
multicastIPRange
string
multicastRTPPort
integer
multicastRTCPPort
integer
serverKey
string
serverCert
string
authMethods
Array of strings
readBufferSize
integer
rtmpDisable
boolean
rtmpAddress
string
hlsDisable
boolean
hlsAddress
string
hlsAlwaysRemux
boolean
hlsSegmentCount
integer
hlsSegmentDuration
integer
hlsAllowOrigin
string
object

Responses

Request samples

Content type
application/json
{
  • "logLevel": "string",
  • "logDestinations": [
    ],
  • "logFile": "string",
  • "readTimeout": 0,
  • "writeTimeout": 0,
  • "readBufferCount": 0,
  • "api": true,
  • "apiAddress": "string",
  • "metrics": true,
  • "metricsAddress": "string",
  • "pprof": true,
  • "pprofAddress": "string",
  • "runOnConnect": "string",
  • "runOnConnectRestart": true,
  • "rtspDisable": true,
  • "protocols": [
    ],
  • "encryption": "string",
  • "rtspAddress": "string",
  • "rtspsAddress": "string",
  • "rtpAddress": "string",
  • "rtcpAddress": "string",
  • "multicastIPRange": "string",
  • "multicastRTPPort": 0,
  • "multicastRTCPPort": 0,
  • "serverKey": "string",
  • "serverCert": "string",
  • "authMethods": [
    ],
  • "readBufferSize": 0,
  • "rtmpDisable": true,
  • "rtmpAddress": "string",
  • "hlsDisable": true,
  • "hlsAddress": "string",
  • "hlsAlwaysRemux": true,
  • "hlsSegmentCount": 0,
  • "hlsSegmentDuration": 0,
  • "hlsAllowOrigin": "string",
  • "paths": {
    }
}

adds the configuration of a path.

all fields are optional.

+
path Parameters
name
required
string

the name of the path.

+
Request Body schema: application/json
source
string
sourceProtocol
string
sourceAnyPortEnable
boolean
sourceFingerprint
string
sourceOnDemand
boolean
sourceOnDemandStartTimeout
integer
sourceOnDemandCloseAfter
integer
sourceRedirect
string
disablePublisherOverride
boolean
fallback
string
publishUser
string
publishPass
string
publishIPs
Array of strings
readUser
string
readPass
string
readIPs
Array of strings
runOnInit
string
runOnInitRestart
boolean
runOnDemand
string
runOnDemandRestart
boolean
runOnDemandStartTimeout
integer
runOnDemandCloseAfter
integer
runOnPublish
string
runOnPublishRestart
boolean
runOnRead
string
runOnReadRestart
boolean

Responses

Request samples

Content type
application/json
{
  • "source": "string",
  • "sourceProtocol": "string",
  • "sourceAnyPortEnable": true,
  • "sourceFingerprint": "string",
  • "sourceOnDemand": true,
  • "sourceOnDemandStartTimeout": 0,
  • "sourceOnDemandCloseAfter": 0,
  • "sourceRedirect": "string",
  • "disablePublisherOverride": true,
  • "fallback": "string",
  • "publishUser": "string",
  • "publishPass": "string",
  • "publishIPs": [
    ],
  • "readUser": "string",
  • "readPass": "string",
  • "readIPs": [
    ],
  • "runOnInit": "string",
  • "runOnInitRestart": true,
  • "runOnDemand": "string",
  • "runOnDemandRestart": true,
  • "runOnDemandStartTimeout": 0,
  • "runOnDemandCloseAfter": 0,
  • "runOnPublish": "string",
  • "runOnPublishRestart": true,
  • "runOnRead": "string",
  • "runOnReadRestart": true
}

changes the configuration of a path.

all fields are optional.

+
path Parameters
name
required
string

the name of the path.

+
Request Body schema: application/json
source
string
sourceProtocol
string
sourceAnyPortEnable
boolean
sourceFingerprint
string
sourceOnDemand
boolean
sourceOnDemandStartTimeout
integer
sourceOnDemandCloseAfter
integer
sourceRedirect
string
disablePublisherOverride
boolean
fallback
string
publishUser
string
publishPass
string
publishIPs
Array of strings
readUser
string
readPass
string
readIPs
Array of strings
runOnInit
string
runOnInitRestart
boolean
runOnDemand
string
runOnDemandRestart
boolean
runOnDemandStartTimeout
integer
runOnDemandCloseAfter
integer
runOnPublish
string
runOnPublishRestart
boolean
runOnRead
string
runOnReadRestart
boolean

Responses

Request samples

Content type
application/json
{
  • "source": "string",
  • "sourceProtocol": "string",
  • "sourceAnyPortEnable": true,
  • "sourceFingerprint": "string",
  • "sourceOnDemand": true,
  • "sourceOnDemandStartTimeout": 0,
  • "sourceOnDemandCloseAfter": 0,
  • "sourceRedirect": "string",
  • "disablePublisherOverride": true,
  • "fallback": "string",
  • "publishUser": "string",
  • "publishPass": "string",
  • "publishIPs": [
    ],
  • "readUser": "string",
  • "readPass": "string",
  • "readIPs": [
    ],
  • "runOnInit": "string",
  • "runOnInitRestart": true,
  • "runOnDemand": "string",
  • "runOnDemandRestart": true,
  • "runOnDemandStartTimeout": 0,
  • "runOnDemandCloseAfter": 0,
  • "runOnPublish": "string",
  • "runOnPublishRestart": true,
  • "runOnRead": "string",
  • "runOnReadRestart": true
}

removes the configuration of a path.

path Parameters
name
required
string

the name of the path.

+

Responses

returns all active paths.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

returns all active RTSP sessions.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

kicks out a RTSP session from the server.

path Parameters
id
required
string

the ID of the session.

+

Responses

returns all active RTMP connections.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

kicks out a RTMP connection from the server.

path Parameters
id
required
string

the ID of the connection.

+

Responses

+ + + + \ No newline at end of file diff --git a/openapi.yaml b/openapi.yaml new file mode 100644 index 00000000..6b8cdbe8 --- /dev/null +++ b/openapi.yaml @@ -0,0 +1,456 @@ +openapi: 3.0.0 + +info: + version: 1.0.0 + title: rtsp-simple-server API + description: API of rtsp-simple-server, a RTSP / RTMP / HLS server and proxy. + license: + name: MIT + url: https://opensource.org/licenses/MIT + +servers: + - url: http://localhost:9997/v1 + +components: + schemas: + Conf: + type: object + properties: + # general + logLevel: + type: string + logDestinations: + type: array + items: + type: string + logFile: + type: string + readTimeout: + type: integer + writeTimeout: + type: integer + readBufferCount: + type: integer + api: + type: boolean + apiAddress: + type: string + metrics: + type: boolean + metricsAddress: + type: string + pprof: + type: boolean + pprofAddress: + type: string + runOnConnect: + type: string + runOnConnectRestart: + type: boolean + + # rtsp + rtspDisable: + type: boolean + protocols: + type: array + items: + type: string + encryption: + type: string + rtspAddress: + type: string + rtspsAddress: + type: string + rtpAddress: + type: string + rtcpAddress: + type: string + multicastIPRange: + type: string + multicastRTPPort: + type: integer + multicastRTCPPort: + type: integer + serverKey: + type: string + serverCert: + type: string + authMethods: + type: array + items: + type: string + readBufferSize: + type: integer + + # rtmp + rtmpDisable: + type: boolean + rtmpAddress: + type: string + + # hls + hlsDisable: + type: boolean + hlsAddress: + type: string + hlsAlwaysRemux: + type: boolean + hlsSegmentCount: + type: integer + hlsSegmentDuration: + type: integer + hlsAllowOrigin: + type: string + + paths: + type: object + additionalProperties: + $ref: '#/components/schemas/PathConf' + + PathConf: + type: object + properties: + # source + source: + type: string + sourceProtocol: + type: string + sourceAnyPortEnable: + type: boolean + sourceFingerprint: + type: string + sourceOnDemand: + type: boolean + sourceOnDemandStartTimeout: + type: integer + sourceOnDemandCloseAfter: + type: integer + sourceRedirect: + type: string + disablePublisherOverride: + type: boolean + fallback: + type: string + + # authentication + publishUser: + type: string + publishPass: + type: string + publishIPs: + type: array + items: + type: string + readUser: + type: string + readPass: + type: string + readIPs: + type: array + items: + type: string + + # custom commands + runOnInit: + type: string + runOnInitRestart: + type: boolean + runOnDemand: + type: string + runOnDemandRestart: + type: boolean + runOnDemandStartTimeout: + type: integer + runOnDemandCloseAfter: + type: integer + runOnPublish: + type: string + runOnPublishRestart: + type: boolean + runOnRead: + type: string + runOnReadRestart: + type: boolean + + Path: + type: object + properties: + confName: + type: string + conf: + $ref: '#/components/schemas/PathConf' + source: + oneOf: + - $ref: '#/components/schemas/PathSourceRTSPSession' + - $ref: '#/components/schemas/PathSourceRTMPConn' + sourceReady: + type: boolean + readers: + type: array + items: + oneOf: + - $ref: '#/components/schemas/PathReaderRTSPSession' + - $ref: '#/components/schemas/PathReaderRTMPConn' + - $ref: '#/components/schemas/PathReaderHLSMuxer' + + PathSourceRTSPSession: + type: object + properties: + type: + type: string + enum: [rtspsession] + id: + type: string + + PathSourceRTMPConn: + type: object + properties: + type: + type: string + enum: [rtmpconn] + id: + type: string + + PathReaderRTSPSession: + type: object + properties: + type: + type: string + enum: [rtspsession] + id: + type: string + + PathReaderRTMPConn: + type: object + properties: + type: + type: string + enum: [rtmpconn] + id: + type: string + + PathReaderHLSMuxer: + type: object + properties: + type: + type: string + enum: [hlsmuxer] + + RTSPSession: + type: object + properties: + remoteAddr: + type: string + + RTMPConn: + type: object + properties: + remoteAddr: + type: string + +paths: + /config/get: + get: + operationId: configGet + summary: returns the current configuration. + description: '' + responses: + '200': + description: the request was successful. + content: + application/json: + schema: + $ref: '#/components/schemas/Conf' + '500': + description: internal server error. + + /config/set: + post: + operationId: configSet + summary: changes the current configuration. + description: all fields are optional. + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/Conf' + responses: + '200': + description: the request was successful. + '400': + description: invalid request. + '500': + description: internal server error. + + /config/paths/add/{name}: + post: + operationId: configPathsAdd + summary: adds the configuration of a path. + description: all fields are optional. + parameters: + - name: name + in: path + required: true + description: the name of the path. + schema: + type: string + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/PathConf' + responses: + '200': + description: the request was successful. + '400': + description: invalid request. + '500': + description: internal server error. + + /config/paths/edit/{name}: + post: + operationId: configPathsEdit + summary: changes the configuration of a path. + description: all fields are optional. + parameters: + - name: name + in: path + required: true + description: the name of the path. + schema: + type: string + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/PathConf' + responses: + '200': + description: the request was successful. + '400': + description: invalid request. + '500': + description: internal server error. + + /config/paths/remove/{name}: + post: + operationId: configPathsRemove + summary: removes the configuration of a path. + description: '' + parameters: + - name: name + in: path + required: true + description: the name of the path. + schema: + type: string + responses: + '200': + description: the request was successful. + '400': + description: invalid request. + '500': + description: internal server error. + + /paths/list: + get: + operationId: pathsList + summary: returns all active paths. + description: '' + responses: + '200': + description: the request was successful. + content: + application/json: + schema: + items: + type: object + additionalProperties: + $ref: '#/components/schemas/Path' + '400': + description: invalid request. + '500': + description: internal server error. + + /rtspsessions/list: + get: + operationId: rtspSessionsList + summary: returns all active RTSP sessions. + description: '' + responses: + '200': + description: the request was successful. + content: + application/json: + schema: + items: + type: object + additionalProperties: + $ref: '#/components/schemas/RTSPSession' + '400': + description: invalid request. + '500': + description: internal server error. + + /rtspsessions/kick/{id}: + post: + operationId: rtspSessionsKick + summary: kicks out a RTSP session from the server. + description: '' + parameters: + - name: id + in: path + required: true + description: the ID of the session. + schema: + type: string + responses: + '200': + description: the request was successful. + '400': + description: invalid request. + '500': + description: internal server error. + + /rtmpconns/list: + get: + operationId: rtmpConnsList + summary: returns all active RTMP connections. + description: '' + responses: + '200': + description: the request was successful. + content: + application/json: + schema: + items: + type: object + additionalProperties: + $ref: '#/components/schemas/RTMPConn' + '400': + description: invalid request. + '500': + description: internal server error. + + /rtmpconns/kick/{id}: + post: + operationId: rtmpConnsKick + summary: kicks out a RTMP connection from the server. + description: '' + parameters: + - name: id + in: path + required: true + description: the ID of the connection. + schema: + type: string + responses: + '200': + description: the request was successful. + '400': + description: invalid request. + '500': + description: internal server error.