License Plate Monitoring Status
The Check License Plate Status API allows you to verify if a specific vehicle (identified by its externalId) is currently being monitored in the Events Bridge system. This can help you ensure that the license plate is actively monitored or confirm its removal.
API Endpoint
- HTTP Method: GET
- Endpoint:
/api/v1/lpr/monitor/{externalId}
- 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.
Path Parameter
- externalId: The unique ID provided by the partner’s system to identify the vehicle during enrollment.
Code Examples
- C#
- Curl
- PowerShell
using eConnect.EventsBridge.Sdk;
// Assuming sdk is already initialized with authentication
// Define the externalId
string externalId = "12345";
// Check enrollment status
var status = await sdk.LprMonitorStatusCheckAsync(externalId);
// Process the result
Console.WriteLine($"License Plate with External ID {externalId} is {(status.Enrolled ? "enrolled" : "not enrolled")}.");
# Define variables
API_URL="https://your-domain.com/eventsbridge"
TOKEN="your_token"
EXTERNAL_ID="12345"
# Check enrollment status
curl -X GET "$API_URL/api/v1/lpr/monitor/$EXTERNAL_ID" \
-H "Authorization: Bearer $TOKEN"
# Define variables
$API_URL = "https://your-domain.com/eventsbridge"
$TOKEN = "your_token"
$EXTERNAL_ID = "12345"
# Check enrollment status
$statusResponse = Invoke-RestMethod -Uri "$API_URL/api/v1/lpr/monitor/$EXTERNAL_ID" -Method Get -Headers @{ "Authorization" = "Bearer $TOKEN" }
# Process the result
Write-Output "License Plate with External ID $EXTERNAL_ID is $($statusResponse.enrolled ? 'enrolled' : 'not enrolled')."
Raw Sample
Here’s an example of how to use the GET method to check the monitoring status of a license plate:
Request
GET https://10.0.0.123:5022/api/v1/lpr/monitor/ABC123
Authorization: Bearer <your_jwt_token>
Content-Type: application/json
Response
- 200 OK: The license plate’s monitoring status was successfully retrieved.
- 500 Internal Server Error: An issue occurred on the server side.
- 401 Unauthorized: Missing or invalid JWT token.
Example Response
{
"enrolled": true
}
In this response, the enrolled
field will return:
- true: if the license plate is currently being monitored.
- false: if the license plate is not monitored.
Additional Notes
- Ensure that the externalId provided in the URL is the same one used during enrollment.
- This endpoint is useful for confirming whether a license plate is actively being monitored or has been removed from monitoring.
- If there are multiple eConnect LPR services behind the event bridge, true will only return if all systems are monitoring. A partial monitoring will return false.