Export all Licence plates with API, each day ?
AnsweredHello,
One of our customer uses Nx Witness v5 and a Hikvision LPR camera.
To retrieve the information of plates, we created a rule to associate a plate to a bookmark.
It works very well and the customer uses it every day.
Now, the boss asks if it is possible with the API to generate the list of detected plates every day.
And send it by mail (in CSV or XML format).
I know how to ask the list thanks to "/rest/v1/devices/{deviceId}/bookmarks".
And I get results like :
"<?xml version="1.0" encoding="UTF-8"?>
<reply>
<element>
<creationTimeMs>1668502289438</creationTimeMs>
<creatorUserId>{51723d00-51bd-4420-8116-75e5f85dfcf4}</creatorUserId>
<description>Plate No. EY480CC (ITA): Other list</description>
<deviceId>{e64bcec2-1df7-e9d1-beae-2a4af24d12b7}</deviceId>
<durationMs>7000</durationMs>
<id>{78be1eb8-b241-42a7-9c9e-b0e8e7655938}</id>
<name>Plate No. EY480CC (ITA) at Reading Registration LAPI (192.168.0.191)</name>
<startTimeMs>1668502287000</startTimeMs>
</element>
<element>
<creationTimeMs>1668502409977</creationTimeMs>
<creatorUserId>{51723d00-51bd-4420-8116-75e5f85dfcf4}</creatorUserId>
<description>Plate No. FK588KM (FRA): Other list</description>
......"
Is it possible to request only the "description" lines ?
To have an XML with only a list of plates of the day, like that :
"Plate No. EY480CC (ITA)
Plate No. FK588KM (FRA)
Plate No. AEQ65KM (FRA)
..."
Hope you can help !
Best regards
-
Hi Loïc TONON,
I'm confident this can be done, since you can filter the output of the API call:
/rest/v1/devices/{deviceId}/bookmarks
If you check the API documentation, you'll find an option to filter:
And you can filter on either the description or name and in your code you remove the appendix starting from :. Like : Other list.
If you use Python, there are options to filter as well, as described HERE.
Then you have the filtered data, which you can use to email this according to a desired schedule.
Ps. I'll move this thread to our For Developers section, so in case you have additional questions, feel free to ask it there.
-
Hi Loïc TONON,
The timestamp is an epoch timestamp, which you can convert to your timezone in the chosen formatting.
Some examples can be found HERE.
Please sign in to leave a comment.
Comments
4 comments