Skip to main content
Skip table of contents

Аctivate a device

The method and parameters

You can pass either MAC or serial_number

JSON
{
    "login": "user-login",
    "name": "name",
    "type": "mediaagent",
    "mac": "fake_mac_5",
    "serial_number": "sn",
    "skip_reserve_check": false
}

POST /api/v1/billing/devices/activate

string login REQUIRED – the login of the user who needs to add the device


string name REQUIRED – the name for the device


string type REQUIRED – a device type


string mac – the MAC address of the device


string serial_number – the device serial number


bool skip_reserve_check – this parameter is required to activate a device that is reserved

201 Created

Successful response

JSON
{
    "id": 25,
    "serial_number": "sn",
    "mac": "mac",
    "name": "test",
    "version": "1.1.1.1",
    "created_at": "2000-00-00T00:00:00.000000Z",
    "last_updated_at": null,
    "is_online": true,
    "user": {
        "id": 6,
        "login": "user@mail.com",
        "name": "user",
        "type": "special",
        "status": "active",
        "created_at": "2000-00-00T00:00:00.000000Z",
        "updated_at": "2000-00-00T00:00:00.000000Z",
        "deleted_at": null,
        "can_update_password": true,
        "billing_properties": []
    },
    "storages": [
        {
            "id": 39,
            "path": "/storage1",
            "usage": 73.723,
            "capacity": 137
        }
    ],
    "cameras_count": 0
}

422 Unprocessable Entity

Returns a JSON object with an error. See Validation.

JSON
{
    "message": "There will be no informative message here",
    "errors": {
        "any_key": [
            "The cause of the error will be described here"
        ]
    }
}
cURL
BASH
curl -k --request POST \
	--url 'https://your-domain/api/v1/billing/devices/activate' \
	--header 'Content-Type: application/json' \
	--header 'Accept: application/json' \
	--data '{
    "login": "string",
    "name": "string",
    "type": "string",
    "mac": "string",
    "serial_number": "string",
    "skip_reserve_check": true
}'
PHP
PHP
$data = array (
  'login' => 'string',
  'name' => 'string',
  'type' => 'string',
  'mac' => 'string',
  'serial_number' => 'string',
  'skip_reserve_check' => 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/devices/activate', false, $context);
JavaScript errors detected

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

If this problem persists, please contact our support.