26.09 26.06 26.05 25.12
26.09 26.06 26.05 25.12 Russian English

Create video stream. API

Create a video stream

POST  /api/v1/billing/streams

This request can be configured as a callback from a DHCP server to automatically add cameras when IP addresses are assigned to them. It can also be used for other automation.

If DHCP isn't configured, the skip_dhcp_reservation flag can be used to skip DHCP-related logic.

Both standard cameras and intercom cameras are supported. If the MAC address belongs to an intercom, the system automatically detects this and creates the corresponding streams for the intercom camera. The system retrieves intercom camera streams through ONVIF. If the intercom doesn't provide streams through ONVIF, their URLs are generated using the vendor template. This is supported for Rubetek, Beward, and Interconnection intercoms.

JSON
{
    "mac": "11:11:11:11:11:11",
    "ip": "127.0.0.1",
    "skip_dhcp_reservation": true
}

Method parameters

string mac, Camera MAC address


string ip, Camera IP address used to access it


bool skip_dhcp_reservation, This flag skips creating a reservation on the DHCP server

204  No Content

Successful response

400  Bad Request

400_error

422  Unprocessable Entity

Returns a JSON error object.

For more information, see General information > Validation.

JSON
{
    "message": "No informative message is provided here",
    "errors": {
        "any_key": [
            "The reason for the error is described here"
        ]
    }
}
cURL
Bash
curl -k --request POST \
	--url 'https://your-domain/api/v1/billing/streams' \
	--header 'Content-Type: application/json' \
	--header 'Accept: application/json' \
	--data '{
    "mac": "string",
    "ip": "string",
    "skip_dhcp_reservation": true
}'
PHP
PHP
$data = array (
  'mac' => 'string',
  'ip' => 'string',
  'skip_dhcp_reservation' => true,
);
$context = stream_context_create([
	'ssl'=>['verify_peer' => false],
	'http' => [
		'method' => 'POST',
		'header' => "Content-Type: application/json\r
Accept: application/json",
		'content'=>json_encode($data)
	]
]);
$result = file_get_contents('https://your-domain/api/v1/billing/streams', false, $context);