Retrieve All Monitored License Plates
The Get All Monitored License Plates API allows partners to retrieve a list of all vehicles they have requested to be monitored by the Events Bridge system. This ensures that partners can track which license plates they have enrolled for monitoring, even though the system may contain additional plates that they are unaware of. This API can be used to synchronize the partner's system with Events Bridge.
It is also the only call that shows per-server enrollment. A plate where enrolled is lower than expected reached some LPR servers but not all of them, and re-sending the enrollment is usually the fix.
API Endpoint
- HTTP Method:
GET - Endpoint:
/api/v1/lpr/monitored - Private Server Base URL:
https://10.0.0.123:5022 - Cloud Server Base URL:
https://customername.econnectcloud.com/eventsbridge
Authentication
This API call requires authentication with a JWT token, which must be passed in the header of the request.
Code Examples
- C#
- Curl
- PowerShell
using eConnect.EventsBridge.Sdk;
// Assuming sdk is already initialized with authentication
// Retrieve all monitored license plates
var monitoredPlates = await sdk.LprMonitorGetAllAsync();
// Process the results
foreach (var item in monitoredPlates)
{
Console.WriteLine($"External ID: {item.ExternalId}, Enrolled: {item.Enrolled}, Expected: {item.Expected}");
}
# Define variables
API_URL="https://your-domain.com/eventsbridge"
TOKEN="your_token"
# Retrieve all monitored license plates
curl -X GET "$API_URL/api/v1/lpr/monitored" \
-H "Authorization: Bearer $TOKEN"
# Define variables
$API_URL = "https://your-domain.com/eventsbridge"
$TOKEN = "your_token"
# Retrieve all monitored license plates
$monitoredPlates = Invoke-RestMethod -Uri "$API_URL/api/v1/lpr/monitored" -Method Get -Headers @{ "Authorization" = "Bearer $TOKEN" }
# Process the results
$monitoredPlates | ForEach-Object {
Write-Output "External ID: $($_.externalId), Enrolled: $($_.enrolled), Expected: $($_.expected)"
}
Raw Sample
Here's an example of how to use the GET method to retrieve all monitored license plates:
Request
GET https://10.0.0.123:5022/api/v1/lpr/monitored
Authorization: Bearer <your_jwt_token>
Content-Type: application/json
Response
- 200 OK: The list of monitored license plates was successfully retrieved.
- 401 Unauthorized: Missing or invalid JWT token.
- 500 Internal Server Error: An issue occurred on the server side.
Example Response
[
{
"externalId": "ABC123",
"enrolled": 2,
"expected": 2,
"status": [
{
"serverName": "Server1",
"enrolled": true
},
{
"serverName": "Server2",
"enrolled": true
}
]
},
{
"externalId": "XYZ987",
"enrolled": 1,
"expected": 2,
"status": [
{
"serverName": "Server1",
"enrolled": true
},
{
"serverName": "Server2",
"enrolled": false
}
]
}
]
Field Descriptions
- externalId (String): The unique identifier supplied by the partner during enrollment, used to track the monitored vehicle. This is the partner's ID, not the plate.
- enrolled (Integer): How many LPR systems this plate is currently enrolled in.
- expected (Integer): How many LPR systems this plate is expected to be enrolled in.
- status (Array of Objects): The monitoring status for each server connected to Events Bridge.
- serverName (String): The name of the server where the plate is being monitored.
- enrolled (Boolean): Whether the plate is actively monitored on that specific server.
enrolled means different things at the two levelsAt the top level it is a count of servers. Inside status it is a boolean for one server. In the second example above, "enrolled": 1 of "expected": 2 corresponds to Server1 being true and Server2 being false.
Additional Notes
- This endpoint returns only the plates the partner enrolled, not everything Events Bridge is monitoring.
- The
externalIdshould be used by the partner to uniquely identify and manage the monitored vehicles in their own system. - A partial enrollment (
enrolled<expected) also makes License Plate Monitoring Status returnfalsefor that plate, since that call requires every server to agree.