Breadcrumbs

Delete a stream: Stream.Delete

The method and parameters

The Stream.Delete method stops stream processing and deletes the stream from the server. The saved archive will also be deleted.

string Stream.Delete(array uids)

array uids  required – the list of the unique identifiers of the streams that must be deleted.


POST  /api/

JSON-RPC
JSON
{
    "jsonrpc": "2.0",
    "method": "Stream.Delete",
    "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.Delete",
    "params": [
        "uids"
    ],
    "id": 1
}'
PHP
PHP
$data = array (
  'jsonrpc' => '2.0',
  'method' => 'Stream.Delete',
  '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: stream deleted – true, stream not deleted – 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

A server error