Skip to main content
Skip table of contents

Videо streams: creation

The method and parameters

POST /api/v1/billing/streams

This request can be specified as a callback from the DHCP server to automatically install cameras when they are assigned an IP address. It can also be used for any other automation.

If DHCP is not configured, you can use the skip_dhcp_reservation flag to exclude the DHCP-related logic.

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

string mac – the MAC address of the camera.


string ip – the IP address of the camera.


bool skip_dhcp_reservation using this flag, you can skip the step of creating a reservation in the DHCP server.

204 No Content

Successful response

400 Bad Request

400_error

422 Unprocessable Entity

Returns a JSON object with an error. For details, see General information > Validation.

JSON
{
    "message": "No error message here",
    "errors": {
        "any_key": [
            "Error details"
        ]
    }
}
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);
JavaScript errors detected

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

If this problem persists, please contact our support.