ANPRScanner

Events

Get last scanned item

Returns the last scanned number plate, with the scanned timestamp.

URL parameters

  • hostIp: ip address of the API host.

  • deviceId: id of the device.

GET https://{hostIp}:7081/hal/devices/{deviceId}/anprscanner/lastscanned

Example request:

GET /hal/devices/anpr1/anprscanner/lastscanned HTTP/1.1
Accept: application/json
Authorization: Bearer eyJhbGciOiJS...

Example response:

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8

{
  "licensePlate": "1-ABC-123",
  "country": "BE",
  "score": 80,
  "base64Image": "string (base64)",
  "timeStampUtc": "datetime (utc)",
  "context": "IN",
}
Status Codes:
Response Headers:
  • Content-Type – defines the serialization format for the response body (this depends on the Accept header of the request)

Response JSON Object:
  • licensePlate (string) – licenseplate (max 20 chars)

  • country (string) – country of issued licenseplate (max 20 chars)

  • score (integer) – reading score indicating the quality of the image analysis (from 0 until 100)

  • base64Image (string) – base64 encoded string that can be converted to an image (max 300000 chars)

  • context (string) – custom field (max 20 chars)

ANPRScanner Events

The websocket server will send an event to a registered websocket client when a license plate is recognized.

The event has the following format:

"messageType":1,
"data":
{
        "methodName":"receiveAnpr",
        "arguments": [{
        "anprTags": [{
            "licensePlate": "1-ABC-123",
            "country": "BE",
            "score": 80,
            "base64Image": "string (base64)",
            "timeStampUtc": "datetime (utc)",
            "context": "IN",
          }],
        "deviceId": "anpr1",
        "version": "1.0"
        }]
 }