26.09 26.06 26.05 25.12
26.09 26.06 26.05 25.12 Russian English

Copy BLE controller access

Copy BLE controller access

POST  /api/v1/billing/ble-controllers/{ble_controller}/copy-access

Makes the access permissions of the BLE controller specified in the URL an exact copy of those of the source controller source_uuid: user virtual keys, physical BLE keys, and user floor settings if both controllers are elevator controllers.

The target controller specified in the URL is cleared first: all its virtual keys are revoked and its physical keys are unlinked. As a result, its access matches the source controller rather than combining both sets.

  • Virtual keys are reissued with new id: temporary keys – with the same validity period as on the source controller; permanent keys – for a new validity period.

  • Expired temporary keys on the source controller aren't copied; their count is returned in skipped_expired.

  • Floor settings are copied only between two elevator controllers; otherwise, key_settings is 0.

  • If a source key owner can't be issued a key because the account has expired, the request is rejected with a 422 error under user_ids.

Response fields:

  • virtual_keys – number of issued virtual keys;

  • physical_keys – number of copied physical keys;

  • key_settings – number of copied floor settings;

  • skipped_expired – number of skipped expired temporary keys.

JSON
{
    "source_uuid": "00000000-0000-0000-0000-000000000002"
}

Method parameters

string ble_controller  required , UUID of the target BLE controller (in the URL)


string source_uuid  required , UUID of the source BLE controller. Must differ from the controller in the URL

200  OK

Successful response

JSON
{
    "virtual_keys": 12,
    "physical_keys": 3,
    "key_settings": 0,
    "skipped_expired": 1
}

404  Not Found

BLE controller not found

JSON
{
    "error": "resource not found"
}

422  Unprocessable Entity

Returns a JSON error object. For more information, see General information > Validation.

JSON
{
    "message": "The source controller must differ from the target.",
    "errors": {
        "source_uuid": [
            "The source controller must differ from the target."
        ]
    }
}
cURL
Bash
curl -k --request POST \
	--url 'https://your-domain/api/v1/billing/ble-controllers/{ble_controller}/copy-access' \
	--header 'Content-Type: application/json' \
	--header 'Accept: application/json' \
	--data '{
    "ble_controller": "string",
    "source_uuid": "string"
}'
PHP
PHP
$data = array (
  'ble_controller' => 'string',
  'source_uuid' => '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/ble-controllers/{ble_controller}/copy-access', false, $context);