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.
API Endpoint
- HTTP Method: GET
- Endpoint:
/api/v1/lpr/monitored
- 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.
- 500 Internal Server Error: An issue occurred on the server side.
- 401 Unauthorized: Missing or invalid JWT token.
Example Response
[
{
"externalId": "ABC123",
"enrolled": 1,
"expected": 0,
"status": [
{
"serverName": "Server1",
"enrolled": true
},
{
"serverName": "Server2",
"enrolled": true
}
]
},
{
"externalId": "XYZ789",
"enrolled": 1,
"expected": 0,
"status": [
{
"serverName": "Server1",
"enrolled": true
}
]
}
]
Field Descriptions
- externalId: The unique identifier supplied by the partner during enrollment, used to track the monitored license plate.
- enrolled: Indicates the number of servers this plate is enrolled in.
- expected: Indicates the number of expected servers this plate should be enrolled in.
- status: An array of objects showing the monitoring status for each server connected to Events Bridge.
- serverName: The name of the server where the license plate is being monitored.
- enrolled: A boolean value that indicates whether the plate is actively monitored on the specific server.
Synchronization Use Case
This API provides an accounting of the vehicles that the partner’s system has requested to monitor, allowing for synchronization between the partner's system and Events Bridge. Even though Events Bridge may be monitoring additional plates that the partner is unaware of, this call will only return those plates that the partner has explicitly enrolled. Partners can use this API to keep their system fully aligned with Events Bridge by periodically retrieving and updating their records based on the response.
Additional Notes
- This endpoint retrieves all license plates that the partner has enrolled for monitoring, ensuring they are aware of every plate they have requested the system to track.
- The externalId should be used by the partner to uniquely identify and manage the monitored vehicles in their own system. This ID does not need to be the Plate itself.