Skip to main content
Skip table of contents

ReconfigureStream. Strеam. Mediaserver

Controlling playback and capturing of a stream. The state is not saved. It is only used for temporarily changing the state and is reset to the initial state after server reboot.

PUT /api/streams/{stream-uid}/reconfigure/
Body
json
JSON
{
    "enable": true,
    "restart": true,
    "broadcast": true,
    "dvr": true,
    "timeout": 50,
    "reload": true,
    "secondary-url": "rtsp://hostname:4554/live/stream-uid-1/",
    "secondary-duration": "5m"
}
stream-uidoptional
uid
Unique identifier of the stream {@hint:uid}
tokenrequired
string
Authorization token for API requests. see Mediaserver/Web API/Authorization/CreateApiToken
enableoptional
bool

restartoptional
bool
Restart the stream. The current connection with the source is interrupted, the DVR is reloaded, the stream state and buffers are cleared.
broadcastoptional
bool
Stop the stream broadcast. All clients are disconnected, new clients cannot connect for playback. DVR continues to record.
reloadoptional
bool
Reload the DVR indices.
dvroptional
bool
Stop DVR recording. Interrupts the DVR recording. Previously saved archive remains available. If the timeout parameter is specified, DVR recording will resume after the specified interval.
timeoutoptional
seconds
The time interval after which DVR recording will resume.
Response
200
Returns the UID of the stream.
JSON
{
                "uid": "0a20f93c-d370-4107-8548-97bb64c53ed2"
            }
404
The stream with such UID was not found.
403
Authorization error. Invalid or missing API access token. see Mediaserver/Web API/Authorization/CreateApiToken.
Example
JSON
curl -k --location --request PUT 'https://localhost:8080/api/streams/{stream-uid}/reconfigure/?token=string' \
--header 'Content-Type: application/json \
--data-raw '{
    "enable": true,
    "restart": true,
    "broadcast": true,
    "dvr": true,
    "timeout": 50,
    "reload": true,
    "secondary-url": "rtsp://hostname:4554/live/stream-uid-1/",
    "secondary-duration": "5m"
}'
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.