A Logical ID is a short numeric identifier of maximal 3 numeric digits that you can use instead of a long camera ID when making API requests. You can assign, remove, or update a Logical ID using either the Desktop Client or the REST API.
Assign a Logical ID in the Desktop Client
To assign a short numeric identifier to a camera:
Right-click the camera and select Camera Settings.
Go to the Expert tab.
In the Logical ID field, enter a number.
NOTE: If you already use 1-to-3 digit identifiers, click Generate to automatically find and fill in the smallest available number.
Click Apply.
Remove a Logical ID in the Desktop Client
To remove a camera's Logical ID:
Right-click the camera and select Camera Settings.
Go to the Expert tab.
Click Reset. This sets the value to
0, which removes the Logical ID.Click Apply.
Manage the Logical ID with the API
You can manage Logical IDs programmatically by sending a PATCH request to the devices endpoint.
Endpoints and payloads
Base URL path:
PATCH /rest/v4/devices/{id}Request body to assign an ID:
{ "logicalId": "<number>" }Request body to remove an ID:
{ "logicalId": "" }
Example: Assigning and using an ID
The following example assigns a Logical ID of 7 to a specific camera:
Request: PATCH https://localhost:7001/rest/v4/devices/27eaf5e3-a709-0d29-681a-f01fac2b6503
Body:
{
"logicalId": "7"
}Once assigned, you can call the camera using its short Logical ID instead of the long device ID:
https://localhost:7001/rest/v4/devices/7
Comments
0 comments
Article is closed for comments.