Skip to main content
Skip table of contents

Stоp strеam processing: Stream.Revoke

The method and parameters

With the Stream.Revoke method, the Mediaserver stops processing of a stream, deregisters it, but retains the stream and its archive.

string Stream.Revoke (array uids)

array uids REQUIRED – the list of streams, processing of which will be stopped.

POST /api/

JSON-RPC
JSON
{
    "jsonrpc": "2.0",
    "method": "Stream.Revoke",
    "params": [
        "uids"
    ],
    "id": 1
}
cURL
BASH
curl -k --request POST \
	--url 'https://your-domain/api/' \
	--header 'Content-Length: 106' \
	--header 'Content-Type: application/json' \
	--header 'Accept: application/json' \
	--header 'Authorization: Bearer <api-authorization-token>' \
	--header 'Content-Length: <Content Length>' \
	--data '{
    "jsonrpc": "2.0",
    "method": "Stream.Revoke",
    "params": [
        "uids"
    ],
    "id": 1
}'
PHP
PHP
$data = array (
  'jsonrpc' => '2.0',
  'method' => 'Stream.Revoke',
  'params' => 
  array (
    0 => 'uids',
  ),
  'id' => 1,
);
$context = stream_context_create([
	'ssl'=>['verify_peer' => false],
	'http' => [
		'method' => 'POST',
		'header' => "Content-Type: application/json\r
Accept: application/json\r
Authorization: Bearer <api-authorization-token>\r
Content-Length: <Content Length>",
		'content'=>json_encode($data)
	]
]);
$result = file_get_contents('https://your-domain/api/', false, $context);

200 OK

A list of stream UIDs and a flag: processing of a stream is stopped – true, processing of a stream isn’t stopped – false.

JSON
{
    "<stream-uid-1>": true,
    "<stream-uid-N>": false
}

400 Bad Request

A JSON RPC error

JSON
{
    "error": {
        "code": -32601,
        "message": "Method not found"
    }
}

500 Internal Server Error

The server error

JavaScript errors detected

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

If this problem persists, please contact our support.