How to get Hikvision DeepinViews license plate number from URL?

3.2k Views Asked by At

I cant find the solution anywhere and mine doesn't seem to work. I just want to see the last plate string in the browser,or the few last plates,doesn't matter.

http://login:[email protected]/ISAPI/Traffic/channels/1/vehicleDetect/plates/
<AfterTime><picTime>2021-12-09T09:07:15Z</picTime></AfterTime>

I do have a plate taken exactly at the time im using in pictime,but the result im getting is;

This XML file does not appear to have any style information associated with it. The document tree is shown below.
<ResponseStatus xmlns="
http://www.hikvision.com/ver20/XMLSchema
" version="2.0">
<requestURL>
/ISAPI/Traffic/channels/1/vehicleDetect/plates/
<AfterTime>
<picTime>2021-12-09T09:01:15Z</picTime>
</AfterTime>
</requestURL>
<statusCode>4</statusCode>
<statusString>Invalid Operation</statusString>
<subStatusCode>invalidOperation</subStatusCode>
</ResponseStatus>

POSTMAN
Edit:POSTMAN

3

There are 3 best solutions below

11
wbg0 On BEST ANSWER

Are you certain that the ISAPI setting is enabled in the camera configuration? It's not possible in the browser without some tool to send and process your API request. Have you tried using Postman? Don't forget to use a Digest Auth header.

0
Atul Kanse On
from requests.auth import HTTPDigestAuth
import requests
url = 'http://<Your IP>/ISAPI/Traffic/channels/1/vehicleDetect/plates/'
data = "<AfterTime><picTime>20220912T192011+0400</picTime></AfterTime>"
r=requests.get(url, data =data,auth=HTTPDigestAuth('admin', 'password'))
print(r.text)

Try this one after enabling this setting in camera
Screenshot
enter image description here

0
Quixote On

You have to send a PUT request and is better if you add username and password on Auth Digest.

You can do all that on Postman.