26.09 26.06 26.05 25.12
26.09 26.06 26.05 25.12 Russian English

Reserve edge device

POST  /api/v1/billing/devices/reserve

Reserves a device so it is no longer available for addition.

If a device is reserved, it cannot be added unless the skip_reserve_check parameter is also passed in the activation request.

JSON
{
    "type": "mediaagent",
    "mac": "fake_mac_5",
    "serial_number": "sn"
}

Possible error codes:

  • 33600 – Device not found

  • 33603 – Device already activated

  • 33610 – Device is being deactivated

  • 33622 – Device is initializing (it has just registered in the system and will soon become available)

  • 33599 – Device is reserved

Method parameters

string type  required , Device type. Possible values: `mediabridge` – Bridge, `mediaagent` – Camera (Agent)


string mac, Device MAC address


string serial_number, Device serial number

200  OK

Successful response

JSON
{
    "id": 25,
    "type": "mediaagent",
    "uuid": "7a593d26-8cfd-47e9-8647-1fb18a36fedb",
    "serial_number": "sn",
    "mac": "mac",
    "name": null,
    "version": "1.1.1.1",
    "created_at": null,
    "last_updated_at": null,
    "is_online": true
}

400  Bad Request

Reservation error

JSON
{
    "message": "The reason for the error is described here",
    "code": 1000
}

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/devices/reserve' \
	--header 'Content-Type: application/json' \
	--header 'Accept: application/json' \
	--data '{
    "type": "string",
    "mac": "string",
    "serial_number": "string"
}'
PHP
PHP
$data = array (
  'type' => 'string',
  'mac' => 'string',
  'serial_number' => 'string',
);
$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/devices/reserve', false, $context);