Carrida ANPR Server API documentation

Revision: 1.1
Date: 2018-05-29
Contact: support@carrida-technologies.com
Copyright: 2018 Carrida GmbH, Germany
Author: Carrida Support

Home page

Table of Contents

1   Introduction

The following API methods are specific to Carrida cameras. They are mostly used to get and set parameters related to HW/SW specific properties. The API offers most functionalities available in Carrida ANPR Web Applications. Implemented functionalities are split into the four separate groups, in correspondence to the organization of the mentioned Carrida Application. There are following groups available in the REST API implementation:

ANPR Properties section integrates endpoints used for the ANPR Server configuration providing possibilities
to retrieve and set all parameters relevant to the running server.
System Properties component offers the configuration of the operating system settings, allowing the user
to set time, network properties, or to restart/reboot server or the device as well.
Access Properties section groups endpoints for the manipulation of lists, as well as endpoints for the action
management (only action listing available in current release).

Results group combines endpoints used for retrieval of live and text results.

Beside mentioned groups there are also endpoints not belonging to any group, but used for login or to retrieve HW/SW information from the server. These endpoints will be mentioned in continuation of this section.

At the end there is a section General Error Responses which contains a list of errors that can occur in any API call.

1.1   Login

Description
This API Endpoint is used to login with own credentials on the server. The login is required in order to perform any other action taken on the server.

Format

URL Method URL Parameter Data Parameter
/login POST None login_string

Parameters

  • login_string:

    • string with following format : "username=your_username&password=your_password"

Sample Call

# login
curl --cookie cookies.log --cookie-jar cookies.log http://192.168.13.231/login --data "username=admin&password=secret"

1.2   Current Apps

Description
This API Endpoint returns a list of currently running carrida applications on the device such as the ANPR server.

Format

URL Method URL Parameter Data Parameter
/live/apps GET None None

Success Response

HTTP Status Code Method Sample Response
200 GET
[
    {
        "id": 0,
        "name": "default"
    }
]

Sample Call

# login
curl --cookie cookies.log --cookie-jar cookies.log http://192.168.13.231/login --data "username=admin&password=secret"

# get list
curl --cookie cookies.log --cookie-jar cookies.log http://192.168.13.231/live/apps

1.3   Current Status

Description
This API Endpoint returns common properties of the camera such as library versions, uptime and so on.
Format
URL Method URL Parameter Data Parameter
/live/status GET None None

Sample Call

# login
curl --cookie cookies.log --cookie-jar cookies.log http://192.168.13.231/login --data "username=admin&password=secret"

# get list
curl --cookie cookies.log --cookie-jar cookies.log http://192.168.13.231/live/status

Success Response

HTTP Status Code Method Sample Response
200 GET
{
  "addresses": "192.168.13.231",
  "carrida": {
    "active": "eu_006.dat",
    "anpr": "2.6.0",
    "classifiers": [
      "au_003.dat",
      "eu_006.dat",
      "nz_002.dat",
      "usa_004.dat"
    ],
    "lpr": "4.2.1"
  },
  "os": "Linux version 3.14.79-vc-z (root@vcbuilder2)
  (gcc version 4.8.4 (Ubuntu/Linaro 4.8.4-2ubuntu1~14.04.1) )
  #2 SMP PREEMPT Wed Mar 21 11:12:01 CET 2018\n",
  "serialnumber": "4000702",
  "system-time": "2018-08-16T10:00:40.811701",
  "uptime": "1118641.87"
}

1.4   List all Properties

Description
Parameters from the first three mentioned groups (anpr, system, access, action) can be listed using this endpoint. As response it returns an array of properties for a section.

Section List

  • anpr
  • system
  • access
  • action

Format

URL Method URL Parameter Data Parameter
/properties/:section GET :section None

Parameters

  • section:

    string that defines the section for which the parameters should be listed

Sample Call

# login
curl --cookie cookies.log --cookie-jar cookies.log http://192.168.13.231/login --data "username=admin&password=secret"

# get the system property list
curl --cookie cookies.log --cookie-jar cookies.log http://192.168.13.231/properties/anpr

Success Response

200
{
    "time",
    "dhcp",
    "ntp"
}

Error Response

HTTP Status Code Sample Response
404
{
    "status": "error",
    "msg": "Unkown component"
}

1.5   Retrieve a Live Image

Description
This API Endpoint returns a snapshot of the current image from the Carrida camera. The image is encoded as JPEG.

Format

URL Method URL Parameter Data Parameter
/live/snapshot GET None None

Sample Call

# login
curl --cookie cookies.log --cookie-jar cookies.log http://192.168.13.231/login --data "username=admin&password=secret"

# retrieve and save the snapshot
curl --cookie cookies.log --cookie-jar cookies.log http://192.168.13.231/live/snapshot > image.jpg

Success Response

HTTP Status Code Method Sample Response
200 GET image encoded as JPEG

2   System Properties

API Endpoints from this group are used for the configuration of operating system, such as time and network configuration. Furthermore there are endpoints in this section which are used to remotely restart/reboot the server/device. Via API editable system properties are listed in section Available System Properties.

2.1   Available System Properties

Property Name Value Format
time ISO 8601 formatted date
ntp true or false (enable or disable)
dhcp true (only activate)

2.2   Get and set System Properties

Description
API Endpoints for getting or setting a system property of a Carrida camera. Use the GET method to retrieve the property and the PATCH method for setting it.

Format

URL Method URL Parameter Data Parameter
/system/:property GET :property None
/system/:property PATCH :property :property=:value

Parameters

  • :property

    Name of a property from the list above.

  • :value

    Value to be set for specified property. The format of the value is also specified in the property list from above.

Sample Call

# login
curl --cookie cookies.log --cookie-jar cookies.log http://192.168.13.231/login --data "username=admin&password=secret"

# get a system property
curl --cookie cookies.log --cookie-jar cookies.log http://192.168.13.231/system/time

# set a system property
curl --cookie cookies.log --cookie-jar cookies.log http://192.168.13.231/system/time --request PATCH --data-urlencode
    "time=2018-03-23T16:30:02+0100"

Success Response

HTTP Status Code Method Sample Response
200 GET
{
    "time":"2019-05-14T05:48:20"
}
200 PATCH
{
    "status": "success",
    "msg": "ok"
}

Error Response

HTTP Status Code Method Sample Response
400 PATCH
{
    "status": "error",
    "msg": "Property value missing"
}
400 PATCH
{
    "status": "error",
    "msg": "Property not set (check the value)"
}
404 GET, PATCH
{
    "status": "error",
    "msg": "Unknown Property"
}

2.3   Restart ANPR Server

Description
This API Endpoint is used to restart the ANPR server on the camera.

Format

URL Method URL Parameter Data Parameter
/camera/reset POST None None

Sample Call

# login
curl --cookie cookies.log --cookie-jar cookies.log http://192.168.13.231/login --data "username=admin&password=secret"

# get a system property
curl --cookie cookies.log --cookie-jar cookies.log -X POST http://192.168.13.231/camera/reset

Success Response

HTTP Status Code Method Sample Response
200 POST
{
    "status": "ok",
    "msg": "Resetting..."
}

2.4   Reboot Camera

Description
This API Endpoint is used for reboot of the camera.
Format
URL Method URL Parameter Data Parameter
/camera/reboot POST None None

Sample Call

# login
curl --cookie cookies.log --cookie-jar cookies.log http://192.168.13.231/login --data "username=admin&password=secret"

# get a system property
curl --cookie cookies.log --cookie-jar cookies.log -X POST http://192.168.13.231/camera/reboot

Success Response

HTTP Status Code Method Sample Response
200 POST
{
    "status": "ok",
    "msg": "Rebooting..."
}

3   ANPR Properties

ANPR Properties are related to the ANPR server application. They are used to configure:

In the next section all of those parameters are listed together with the value formats. For the detailed description of listed properties please visit ???.

3.1   Available ANPR Properties

Property Name Value Format Short Description
binning true or false Camera low resolution on/off
rotate_image floating number [-180.0-180.0] Rotation of the image before ANPR detection in degrees
use_anpr_autolum true or false Activate/deactivate automatic Brightness Control
min_shutter integer number [10-] Sensor minimum exposure time in micro sec
min_gain integer number [0-10] Sensor minimum gain in dB
max_shutter integer number [10-50000] Sensor maximum exposure time in micro sec
max_gain integer number [0-10] Sensor maximum gain in dB
accepted_brightness_min_amount float number [0.0.-100.0] Brightness Control minimum amount of well lighted pixels inside ROI (%)
saturated_max_amount float number [0.0-100.0] Brightness Control maximum amount of accepted saturated pixels inside ROI
lightenabled true or false Enable/Disable LED Flash
lightduration integer number [0-1000] Duration of the flash in micro sec
lightcurrent integer number [0-1500] Flash current in mA [0-1500]. Note: at VC cameras flash is off for values < 150 mA
lightbrightness

integer number [0-2]

  • 0 ... Dark
  • 1 ... Middle
  • 2 ... Bright
Set the brightness of the flash
triggermode

integer number

  • 0 ... FreeRun
  • 1 ... SingleLine
  • 2 ... Start-Stop
  • 3 ... Start-Time
  • 4 ... Start-Sequence
Set trigger mode in combination with IO lines
stopdio integer number Input line for stop signal, used for trigger mode Start-Stop
startdio integer number (depending on camera HW) Input line for start signal, used for all trigger modes except free run
startdiopolarity true or false Define the trigger signal polarity: high->low when enabled, low->high when disabled
stopdiopolarity true or false Define the stop signal polarity: high->low when enabled, low->high when disabled
timemax integer number [100-999999] Max waiting time in millisec for ANPR reading after trigger signal, used in mode Start-Time
sequencelength integer number [0-] The number of frames read after trigger signal, used for trigger mode Start-Sequence
mode

integer number

  • 1 ... Fastest
  • 2 ... Fast
  • 3 ... Standard
  • 4 ... High
  • 5 ... Best
Engine performance modes
minletterheight integer number [6-1000] Minimum height of a plate letter in pixels
maxletterheight integer number [0 - 1000] Maximum height of a plate letter in pixels
maxplateangle integer number [0-90] Maximum allowed license plate rotation angle in degrees
minplateconfidence integer number [0-100] Minimum confidence for a plate to be accepted, plates below this confidence will be dismissed
mincontrast integer number [7-100] Min contrast to differentiate characters from the license plate. Reducing this parameter can increase reading performance but also processing time
maxplates integer number [0-10, 0 = unlimited] Maximum number of plates which can be detected in a single image
scalewidth integer number [1-200] Scale the image width by this factor (in percent) before ANPR processing
scaleheight integer number [1-200] Scale the image height by this factor (in percent) before ANPR processing
searchinverted

integer number

  • 0 ... disabled
  • 1 ... search
  • 2 ... always
Detection mode for white-on-black (inverted) License Plates (Disabled, Search only if no black-on-white plate found, or Always search). Search or Always will result in a lower processing frame rate
streammode

integer number

  • 0 ... Single
  • 1 ... Parking
  • 2 ... Offline
  • 3 ... Freeflow
License plate sequence processing mode, Parking mode is recommended for access control
minreadings integer number [0-20] Minimum detections of the same plate before accepting it-considering Maximum Characters Mismatch for comparison
maxstringmatchingdistance integer number [0-10] Maximum difference between two license plates to be regarded as identical, recommended value: 1, 2
noreadinterval integer number [0-99] Specifies the interval of images without plate reading after which the defined noread actions are triggered
lowconflimit integer number [0-100] The threshold for which a confidence is considered low, this value must be >= Min Plate Confidence. Used in action type Low Confidence Read
listfromftp true or false If set to true, server is trying to download lists from specified ftp server using set credentials after camera boot or server restart
listserver

string

s?ftp://xxx.xxx.xxx.xxx
Ftp server address to download list files from
listserveruserpass

string

username:password
Ftp server credentials
hud_size

integer number

  • 0 ... small
  • 1 ... medium
  • 2 ... large
Size of the HUD
hud_position

integer number

  • 0 ... Upper Left
  • 1 ... Upper Right
  • 2 ... Lower Left
  • 3 ... Lower Right
Position of the HUD
cam_prefix string Text shown as info overlay
draw_info true or false Turn on/off info overlay in the HUD
draw_time true or false Turn on/off time display in the HUD
draw_date true or false Turn on/off date display in the HUD
draw_shutter true or false Turn on/off shutter display in the HUD
draw_gain true or false Turn on/off gain display in the HUD
displaylprrate true or false Display the current reading frame rate of the camera
displayframerate true or false Turn on/off camera framerate display in the HUD
visualiseplate true or false Draw licence plate result into the result image
visualisestate true or false Draw licence plate result into the result image
visualisecharconf true or false Draw single character confidences into the result image buffer
jpeg_compression integer number [1-100] JPEG compression level for live images in the user interface
maxhistoryentries integer number [0-10000] The maximum number of ANPR results which are kept in the history
historyhours integer number [0-10000] The maximum time span in hours for which ANPR results are kept in the history buffer
sendutf true or false Send result string UTF-8 encoded

3.2   Get and Set ANPR Properties

Description

API Endpoints for getting or setting an ANPR property of a Carrida camera. Use the GET method to retrieve the property and the PATCH method to set it.

URL Method URL Parameter Data Parameter
/anpr/:property GET :property None
/anpr/:property PATCH :property :property=:value
  • :property

    Name of one of properties listed above.

  • :value

    Value to be set for specified property. The format of the value is also specified in the property list from above.

Sample Call

# login
curl --cookie cookies.log --cookie-jar cookies.log http://192.168.13.231/login --data "username=admin&password=secret"

# get an anpr property
curl --cookie cookies.log --cookie-jar cookies.log http://192.168.13.231/anpr/mode

# set an anpr property
curl --cookie cookies.log --cookie-jar cookies.log http://192.168.13.231/anpr/mode --request PATCH --data-urlencode "mode=1"

Success Response

HTTP Status Code Method Sample Response
200 GET
{
    :property: :value
}
200 PATCH
{
    "status": "success",
    "msg": "ok"
}

Error Response

HTTP Status Code Method Sample Response
400 PATCH
{
    "status": "error",
    "msg": "Property value missing"
}
400 PATCH
{
    "status": "error",
    "msg": "Invalid value given"
}
404 GET, PATCH
{
    "status": "error",
    "msg": "Unknown Property"
}

4   Access Properties

API Endpoints from this section are used to handle Access feature that is consisted of two parts:

Available Lists

List Key List Name
white.txt Whitelist
black.txt Blacklist
ignore.txt Ignorelist

4.1   Lists handling

Description

List handling can be done using single API Endpoint with 3 separate methods.

*Retrieving an Access List*
With a GET request, a list of plates is returned. The plates can be filtered by sending the JSON containing a pattern field that contains a RegEx.
*Add a Plate to an Access List*
With a POST request, a new entry for the list can be added. The body of the request should contain a JSON document that looks like the document for a successful GET request (see example response below).
*Delete a Plate from an Access List*

With a DELETE request, one or more entries can be deleted by either specifing one of the two fields in a JSON document inside the request body:

  • index - delete a single item with the given index number
  • pattern - delete every plate that matches the given pattern

Format

URL Method URL Parameter Data Parameter
/access/:listkey GET :listkey :filter (optional, can be empty)
/access/:listkey POST :listkey :entry
/access/:listkey DELETE :listkey :specifier

Parameters

  • listkey

    Key used to specify list from table from Available Lists.

  • filter

    JSON string of following format:

    {
      "pattern":"your_pattern"
    }
    
  • entry

    JSON string of following format:

    {
      "always": true or false,  % if true specified plate will be always valid, otherwise it will be valid for defined schedules %
      "plate": "plate string",
      "schedules":  % if always set to false %
                  [
                    {
                        "period":
                        {
                          "end": "yyyy-mm-dd",
                          "start": "yyyy-mm-dd"
                        },
                        "time-span":
                          {
                              "from": "hh:mm",
                              "to": "hh:mm"
                          },
                          "weekdays": ["Mo"] % list of days for which entry is valid ("Mo", "Tu", "We", "Th", "Fr", "Sa", "So") %
                      } % this can be repeated 0 or more times %
                  ]
    }
    
  • specifier

    JSON string of one of following 2 formats:

    {
       "index" : "entry_index<integer>"
    }
    
    {
       "pattern":"your_pattern"
    }
    

Sample Call

# login
curl --cookie cookies.log --cookie-jar cookies.log http://192.168.13.231/login --data "username=admin&password=secret"

# get all Whitelist entries
curl --cookie cookies.log --cookie-jar cookies.log http://192.168.13.231/access/white.txt

# get filtered Whitelist entries
curl --cookie cookies.log --cookie-jar cookies.log -X GET http://192.168.13.231/access/white.txt --data '{"pattern":"ABC*"}'

# delete entries using pattern
curl --cookie cookies.log --cookie-jar cookies.log -X DELETE http://192.168.13.231/access/white.txt --data '{"pattern":"ABC*"}'

# delete an entry using index
curl --cookie cookies.log --cookie-jar cookies.log -X DELETE http://192.168.13.231/access/white.txt --data '{"index":0}'

# add an entry to Whitelist
curl --cookie cookies.log --cookie-jar cookies.log -X POST http://192.168.13.231/access/white.txt --data
    '{"always": false, "plate": "new","schedules":[{"period":{"end":"2018-10-31", "start":"2018-10-01"},
    "time-span":{"from":"16:13","to":"19:13"},"weekdays": ["Mo","Tu","We"]},
    {"period":{"end":"2018-11-3","start":"2018-12-01"},"time-span":{"from":"1:25","to":"12:00"},
    "weekdays": ["Fr","Sa", "So"]}] }'

Success Response

HTTP Status Code Method Sample Response
200 GET
[
    {
        "always":false,
        "index":0,
        "plate":"foo",
        "schedules":[
            {
                "period":
                {
                    "end":"2018-10-31",
                    "start":"2018-10-01"
                },
                "time-span":
                {
                    "from":"16:13",
                    "to":"19:13"
                },
                "weekdays": ["Mo","Tu","We"]
            }
        ]
    },
    {
        "always":true,
        "index":1,
        "plate":"bar"
    },
    {
        "always":true,
        "index":2,
        "plate":"foobar"
    }
]
200 POST
{
    "status": "success",
    "msg": "Entry added."
}
200 DELETE
{
    "status": "success",
    "msg": "Entry removed."
}

Error Response

HTTP Status Code Method Sample Response
400 PATCH
{
    "status": "error",
    "msg": "Property value missing"
}
400 PATCH
{
    "status": "error",
    "msg": "Invalid value given"
}
404 GET, PATCH
{
    "status": "error",
    "msg": "Unknown Property"
}

5   Results

This section contains API Endpoints for manipulation of results captured by the camera. There are two types of results available on the camera:

5.1   Retrieve a Live Result

Description
This API Endpoint returns the latest result that was captured by the Carrida camera.
Format
URL Method URL Parameter Data Parameter
/live/result GET None None

Sample Call

# login
curl --cookie cookies.log --cookie-jar cookies.log http://192.168.13.231/login --data "username=admin&password=secret"

# retrieve and save the snapshot
curl --cookie cookies.log --cookie-jar cookies.log http://192.168.13.231/live/result

Success Response

HTTP Status Code Method Sample Response
200 GET
{
    "plates": [
        {
            "value": "LPR12345",
            "confidence": 90,
            "state": "AT",
            "state_confidence": 89,
            "position": {
                "x": 342,
                "y": 440,
                "width": 59,
                "height": 28
            },
            "rows": 1,
            "platecolor": "#FFFFFF",
            "charactercolor": "#000000"
        }
    ],
    "timestamp": 1525690269,
    "message": "",
    "image": {
        "width": 1920,
        "height": 1080,
          "step": 1920,
          "type": 0,
          "data": "YmFzZTY0IGVuY29kZWQgaW1hZ2U......"
    }
}

Error Response

HTTP Status Code Method Sample Response
404 GET
{
    "status": "error",
    "msg": "No results found"
}

5.2   Retrieve saved Results (without images)

Description
This API Endpoint returns a specified count of results that were last captured by the Carrida camera. The image data is not included. The URL parameter specifies the number of returned results.
Note

This API Endpoint parses the results saved at the camera. The maximal count of saved results is set by the anpr parameter "MaxHistoryEntries" and has a default value 0. In order to enable saving the results at the camera, this parameter should be set to some value >0. In the case that the specified count of results has a larger value than MaxHistoryEntries parameter, only the results found saved at the camera will be sent.

URL Method URL Parameter Data Parameter
/text/results/:count GET :count None

Parameters

-count
Number of results to be parsed by the server and returned as JSON.

Sample Call

# login
curl --cookie cookies.log --cookie-jar cookies.log http://192.168.13.231/login --data "username=admin&password=secret"

# retrieve and  save the snapshot
curl --cookie cookies.log --cookie-jar cookies.log http://192.168.13.231/text/results/5

Success Response

HTTP Status Code Method Sample Response
200 GET
[
    {
        "plates": [
            {
                "value": "LPR12345",
                "confidence": 90,
                "state": "AT",
                "state_confidence": 89,
                "position": {
                    "x": 342,
                    "y": 440,
                    "width": 59,
                    "height": 28
                },
                "rows": 1,
                "platecolor": "#FFFFFF",
                "charactercolor": "#000000"
            }
        ],
        "timestamp": 1525690269,
        "message": ""
    },
    ...
    ...
    ...
]

5.3   Retrieve saved Results (with images)

Description
This API Endpoint returns a specified amount of results that were last captured by the Carrida camera. The image data is included. The URL parameter specifies the number of returned results.
Note
This API Endpoint parses the results saved at the camera. The maximal count of saved results is set by the parameter "MaxHistoryEntries" and has a default value 0. In order to enable saving the results at the camera, this parameter should be set to some value >0. In the case that the specified count of results has a larger value than MaxHistoryEntries parameter, only the results found saved at the camera will be sent.
Format
URL Method URL Parameter Data Parameter
/text/results-with-images/:count GET :count None

Parameters

-count
Number of results to be parsed by the server and returned as JSON.

Sample Call

# login
curl --cookie cookies.log --cookie-jar cookies.log http://192.168.13.231/login --data "username=admin&password=secret"

# retrieve and save the snapshot
curl --cookie cookies.log --cookie-jar cookies.log http://192.168.13.231/text/results-with-images/5
Success response
HTTP Status Code Method Sample Response
200 GET
[
    {
        "plates": [
            {
                "value": "LPR12345",
                "confidence": 90,
                "state": "AT",
                "state_confidence": 89,
                "position": {
                    "x": 342,
                    "y": 440,
                    "width": 59,
                    "height": 28
                },
                "rows": 1,
                "platecolor": "#FFFFFF",
                "charactercolor": "#000000"
            }
        ],
        "timestamp": 1525690269,
        "message": "",
        "image": {
            "width": 1920,
            "height": 1080,
              "step": 1920,
              "type": 0,
              "data": "YmFzZTY0IGVuY29kZWQgaW1hZ2U......"
        }
    },
    ...
    ...
    ...
]

5.4   Delete All Saved Results

Description
This API Endpoint is used to clear all text results saved on the camera. The return message contains count of deleted results and count of errors, which appeared during deletion.
Format
URL Method URL Parameter Data Parameter
/text/remove-all PATCH None None

Sample Call

# login
curl --cookie cookies.log --cookie-jar cookies.log http://192.168.13.231/login --data "username=admin&password=secret"

# retrieve and save the snapshot
curl --cookie cookies.log --cookie-jar cookies.log -X PATCH http://192.168.13.231/text/remove-all

Success Response

HTTP Status Code Method Sample Response
200 PATCH
{"deletion_errors": 0,
"msg": "ok", "removed_results": 4, "status": "success"}

5.5   Delete Saved Results Using Pattern

Description
This API Endpoint is used to delete specified text results saved on the camera. The return message contains count of deleted results and count of errors appeared during deletion.
Note
When using pattern that contains character range there have to be used either quotation marks with backslash in front of squared brackets, or -g flag in front of URL. (See sample calls) Otherwise there will be returned error similar to the following one: "curl: (3) [globbing] bad range in column".
Format
URL Method URL Parameter Data Parameter
/text/remove-pattern/:pattern PATCH :pattern None

Parameters

  • pattern

    String used as pattern for entry deletion.

Sample Call

# login
curl --cookie cookies.log --cookie-jar cookies.log http://192.168.13.231/login --data "username=admin&password=secret"

# delete plates starting with an "A"
curl --cookie cookies.log --cookie-jar cookies.log -X PATCH http://192.168.13.231/text/remove-pattern/A*

# delete plates ending with a "B"
curl --cookie cookies.log --cookie-jar cookies.log -X PATCH http://192.168.13.231/text/remove-pattern/*B

# delete plates containing "CD" as substring (at any position of the string)
curl --cookie cookies.log --cookie-jar cookies.log -X PATCH http://192.168.13.231/text/remove-pattern/*CD*

# delete plates having a "B" at the position 2 in the string
curl --cookie cookies.log --cookie-jar cookies.log -X PATCH http://192.168.13.231/text/remove-pattern/?B*

# delete plates starting either with an "A" or a "B"
curl --cookie test.txt --cookie-jar test.txt -X PATCH "http://192.168.13.245/text/remove-pattern/\[AB\]*"
curl --cookie test.txt --cookie-jar test.txt -g -X PATCH http://192.168.13.245/text/remove-pattern/[AB]*

# delete all plates
curl --cookie test.txt --cookie-jar test.txt -X PATCH http://192.168.13.245/text/remove-pattern/*

Success Response

HTTP Status Code Method Sample Response
200 PATCH
{
    "deletion_errors": 0,
    "msg": "ok",
    "removed_results": 4,
    "status": "success"
}

6   General Error Responses

In the documentation for each API Endpoint there are errors listed that are specific to that Endpoint. This section contains errors that can occur on every request. Those errors are produced in following cases:

Following table contains example errors that can be produced if one of listed cases appears:

HTTP Status Code Sample Response
400
{
    "status": "error",
    "msg": "The browser (or proxy) sent a request that this server could not understand."
}
403
{
   "msg": "Token invalid",
   "status": "error"
}
405
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<title>405 Method Not Allowed</title>
<h1>Method Not Allowed</h1>
<p>The method is not allowed for the requested URL.</p>
500
{
    "status": "error",
    "msg": "Request failed"
}