Step 5: Set up the Monitor
At this step, the new monitor filters are set up so that the alarms appear on the monitor to report when and where the plate "5PPP064" was seen. To do so:
Run the request ...
| PUT Request Sample | |
| /api/v2/alarm-monitors/{id}/filter | |
... where
id Required | integer($int32) | The alarm monitor identifier Obtained at step 4. |
... and the request body holds an Event Filter Model JSON file. In this file, all the parameters are irrelevant to the problem we are trying to solve except for the plate, which should be:
|
plate Required | BasicEventFilter_Plate object |
| |
| list_ids | Identifiers of the lists that contain the plate to track. Obtained at step 2 | ||
| plate_ids | Identifiers of the plate to track. Obtained at step 3. | ||
| number | License plate number to track "5PPP064" in this example | ||
| states | Acronym of the country the vehicle belongs to | ||
| statuses | Set "statuses": identified |
For example:
{
"plate": {
"list_ids": [
See step 2
],
"plate_ids": [
See step 3
],
"number": "5PPP064",
"states": [
"US"
],
"statuses": [
"identified"
]
},
}The request returns an AlarmMonitor JSON object, in which:
- name, max_event_count and webhook are as confirmed at step 4.
- filter= Event Filter Model with the plate as requested.
For example:
{
"id": 0 // See step 4,
"name": "string", //See step 4
"response_protocol": "string",
"status": "ACTIVE",
"max_events_count": 0, // See step 4
"webhook": { //See step 4
"url": "string",
"method": "GET",
"enabled": true,
"send_snapshots": true
},
"plate": {
"list_ids": [
0
],// See step 2
"plate_ids": [
0
], // See step 3
"number": "5PPP064",
"states": [
"US"
],
"statuses": [
"identified"
]
},
}It is almost all done now; the only thing left is to switch the monitor on at the next step.