ISAPI documentation

nameisnour

n3wb
Joined
Mar 12, 2021
Messages
3
Reaction score
0
Location
Morocco
Hi all,

I am a developer trying to get acquainted with IP cameras especially ANPR/LPR (license plate recognition) cameras, my goal is to retrieve the data about the plates via some APi and integrate them in my own app.

While browsing, I came across ISAPI that sort of does the job but I couldn't find any documentation about it,

I would like to know where I can possibly download the ISAPI documentation, if am I in the right direction

Thank you all.
 

wittaj

IPCT Contributor
Joined
Apr 28, 2019
Messages
25,004
Reaction score
48,762
Location
USA
See this thread...the companies do not publish this, so it is a lot of trial and error and hoping someone posts there results...

 
Joined
Apr 13, 2021
Messages
1
Reaction score
0
Location
South africa
Hi all,

I am a developer trying to get acquainted with IP cameras especially ANPR/LPR (license plate recognition) cameras, my goal is to retrieve the data about the plates via some APi and integrate them in my own app.

While browsing, I came across ISAPI that sort of does the job but I couldn't find any documentation about it,

I would like to know where I can possibly download the ISAPI documentation, if am I in the right direction

Thank you all.
Hey.

Have you got any help wwith this cause i am struggling with the samething
 

Sentu

n3wb
Joined
May 5, 2021
Messages
2
Reaction score
0
Location
India
Thank you very much!
Were you able to download all the plates. I am only getting the last 20 plates. But I have a requirement where I have to go back and search for the last 24 hours and so on. So is there someway we can download all the plates stored in the SD card?
 

iTuneDVR

Pulling my weight
Joined
Aug 23, 2014
Messages
846
Reaction score
153
Location
Россия
Were you able to download all the plates. I am only getting the last 20 plates. But I have a requirement where I have to go back and search for the last 24 hours and so on. So is there someway we can download all the plates stored in the SD card?
I have not dived too deeply into this topic yet.
20 numbers seem to be a temporary cache from online.
I carefully read the documentation and of course I will have to experiment on something.
 

MicM

n3wb
Joined
Jun 18, 2019
Messages
10
Reaction score
11
Location
Portugal
Going to leave here some preliminary findings of mine regarding this issue in case it is relevant to anyone else in the future.

First of all it would seem that at least on a Hikvision ANPR camera model iDS-2CD7A26G0/P-IZHS which is a fairly recent model, the "/ISAPI/Traffic/channels/<ID>/vehicleDetect/plates" call no longer works, in fact it seems to no longer be part of the ISAPI API, this might be ANPR related assuming there is a difference between ANPR and LPR cameras, hard to know without having more than 1 camera to test this on.

While not necessarily the same result as that other API call, there is a way to fetch those records which is to use the API call "/ISAPI/Traffic/vehicleInfoCond", seems to collect the same information with the exception of the picture name.

To test to see if this API call works for your camera, on the program postman do the following:

1) Create a POST call to the address http://YourCameraIpHere:YourHttpPortHere/ISAPI/Traffic/vehicleInfoCond
2) In the Authorization add a Digest Auth with your username and password.
3) On the body select raw then XML and add the following:

XML:
<?xml version="1.0" encoding="UTF-8"?>
<VehicleInfoCond>
   <searchID>WhatEverHereDoesntMatter</searchID>
   <TimeSpan>
      <startTime>2021-03-30T23:00:00Z</startTime>
      <stopTime>2021-05-31T22:59:59Z</stopTime>
   </TimeSpan>
   <maxResults>40</maxResults>
   <plateLicense />
   <downloadResultPosition>0</downloadResultPosition>
</VehicleInfoCond>
4) Press send.

This will return up to 40 results as set by maxResults (which can be changed to higher or lower values), if the return XML specifies that the totalMatches is greater than the number set in maxResults, one can use downloadResultPosition to get records beyond the limit of the maxResults, so for example if the with the above call one got an XML that contained this:

XML:
   <numOfMatches>40</numOfMatches>
   <totalMatches>65</totalMatches>
Another call to this api would have to be issued, but this time with downloadResultPosition set to 40, to get the remaining matches.

This is the returned XML from such a call (only 2 records shown for my convenience, since these are fake plate numbers)

XML:
<?xml version="1.0" encoding="UTF-8"?>
<VehicleInfoResult xmlns="http://www.hikvision.com/ver20/XMLSchema" version="2.0">
   <downloadID>WhatEverHereDoesntMatter</downloadID>
   <responseStatus>true</responseStatus>
   <responseStatusStrg>OK</responseStatusStrg>
   <numOfMatches>2</numOfMatches>
   <totalMatches>2</totalMatches>
   <deviceID>ANPR</deviceID>
   <MonitoringSiteID />
   <VehicleInfoList>
      <VehicleInfo>
         <indexID>1</indexID>
         <plateNo>33-33-AA</plateNo>
         <timeSpan>2021-05-31T09:35:19Z</timeSpan>
         <country>FRA</country>
         <laneID>1</laneID>
         <direction>forward</direction>
         <believe>83</believe>
         <matchingResult>otherlist</matchingResult>
      </VehicleInfo>
      <VehicleInfo>
         <indexID>2</indexID>
         <plateNo>44-44-BB</plateNo>
         <timeSpan>2021-05-31T09:43:49Z</timeSpan>
         <country>SVN</country>
         <laneID>1</laneID>
         <direction>reverse</direction>
         <believe>97</believe>
         <matchingResult>otherlist</matchingResult>
      </VehicleInfo>
   </VehicleInfoList>
</VehicleInfoResult>


This only works for a camera set to "Vehicle Detection" for cameras set to "Mixed-traffic Detection" this does not work since pictures and information saved on "Mixed-traffic Detection" has a different structure and at least on my camera doesn't have things like direction.

As for obtaining the pictures I haven't got that far yet, and there is a chance I might never bother with it, since I currently have it uploading pictures to an FTP server, and it is trivial to match the pictures on the FTP server to the information obtained from the camera. Will however create another post in this thread if I ever end up looking into that ("/ISAPI/ContentMgmt/search" probably plays a part though).



As a side note when something can be accessed from a web page, and there is no readily available documentation to see what API calls should be made, or as is this case the documentation that does exist is shoddy at best, using something like Telerik Fiddler is of great help, since it captures the calls made by the browser, giving a pretty good idea of what one has to do.


Were you able to download all the plates. I am only getting the last 20 plates. But I have a requirement where I have to go back and search for the last 24 hours and so on. So is there someway we can download all the plates stored in the SD card?
Just quoting you, so you get notified as well in case this is still relevant for you.

With that being said, search the API for xml that contains <maxResults> (if you use word search be careful with what software you are using, it might be there and not find it), this should give you an idea what API calls will support what you want, although at least as far as the ISAPI Traffic api documment is concerned "/ISAPI/Traffic/ContentMgmt/dataOperation" seems to be the best contender (doesn't seem work on my camera though).
 
Last edited:

NoFate

Getting the hang of it
Joined
Oct 24, 2020
Messages
479
Reaction score
63
Location
Belgium
No idea, i only use Isapi on my video intercom, I dont have other devices... But my intercom didnt support all ISAPi commands, i needed a custom firmware
 

black1906

n3wb
Joined
Dec 9, 2021
Messages
25
Reaction score
1
Location
USA
Going to leave here some preliminary findings of mine regarding this issue in case it is relevant to anyone else in the future.

First of all it would seem that at least on a Hikvision ANPR camera model iDS-2CD7A26G0/P-IZHS which is a fairly recent model, the "/ISAPI/Traffic/channels/<ID>/vehicleDetect/plates" call no longer works, in fact it seems to no longer be part of the ISAPI API, this might be ANPR related assuming there is a difference between ANPR and LPR cameras, hard to know without having more than 1 camera to test this on.

While not necessarily the same result as that other API call, there is a way to fetch those records which is to use the API call "/ISAPI/Traffic/vehicleInfoCond", seems to collect the same information with the exception of the picture name.

To test to see if this API call works for your camera, on the program postman do the following:

1) Create a POST call to the address http://YourCameraIpHere:YourHttpPortHere/ISAPI/Traffic/vehicleInfoCond
2) In the Authorization add a Digest Auth with your username and password.
3) On the body select raw then XML and add the following:

XML:
<?xml version="1.0" encoding="UTF-8"?>
<VehicleInfoCond>
   <searchID>WhatEverHereDoesntMatter</searchID>
   <TimeSpan>
      <startTime>2021-03-30T23:00:00Z</startTime>
      <stopTime>2021-05-31T22:59:59Z</stopTime>
   </TimeSpan>
   <maxResults>40</maxResults>
   <plateLicense />
   <downloadResultPosition>0</downloadResultPosition>
</VehicleInfoCond>
4) Press send.

This will return up to 40 results as set by maxResults (which can be changed to higher or lower values), if the return XML specifies that the totalMatches is greater than the number set in maxResults, one can use downloadResultPosition to get records beyond the limit of the maxResults, so for example if the with the above call one got an XML that contained this:

XML:
   <numOfMatches>40</numOfMatches>
   <totalMatches>65</totalMatches>
Another call to this api would have to be issued, but this time with downloadResultPosition set to 40, to get the remaining matches.

This is the returned XML from such a call (only 2 records shown for my convenience, since these are fake plate numbers)

XML:
<?xml version="1.0" encoding="UTF-8"?>
<VehicleInfoResult xmlns="http://www.hikvision.com/ver20/XMLSchema" version="2.0">
   <downloadID>WhatEverHereDoesntMatter</downloadID>
   <responseStatus>true</responseStatus>
   <responseStatusStrg>OK</responseStatusStrg>
   <numOfMatches>2</numOfMatches>
   <totalMatches>2</totalMatches>
   <deviceID>ANPR</deviceID>
   <MonitoringSiteID />
   <VehicleInfoList>
      <VehicleInfo>
         <indexID>1</indexID>
         <plateNo>33-33-AA</plateNo>
         <timeSpan>2021-05-31T09:35:19Z</timeSpan>
         <country>FRA</country>
         <laneID>1</laneID>
         <direction>forward</direction>
         <believe>83</believe>
         <matchingResult>otherlist</matchingResult>
      </VehicleInfo>
      <VehicleInfo>
         <indexID>2</indexID>
         <plateNo>44-44-BB</plateNo>
         <timeSpan>2021-05-31T09:43:49Z</timeSpan>
         <country>SVN</country>
         <laneID>1</laneID>
         <direction>reverse</direction>
         <believe>97</believe>
         <matchingResult>otherlist</matchingResult>
      </VehicleInfo>
   </VehicleInfoList>
</VehicleInfoResult>


This only works for a camera set to "Vehicle Detection" for cameras set to "Mixed-traffic Detection" this does not work since pictures and information saved on "Mixed-traffic Detection" has a different structure and at least on my camera doesn't have things like direction.

As for obtaining the pictures I haven't got that far yet, and there is a chance I might never bother with it, since I currently have it uploading pictures to an FTP server, and it is trivial to match the pictures on the FTP server to the information obtained from the camera. Will however create another post in this thread if I ever end up looking into that ("/ISAPI/ContentMgmt/search" probably plays a part though).



As a side note when something can be accessed from a web page, and there is no readily available documentation to see what API calls should be made, or as is this case the documentation that does exist is shoddy at best, using something like Telerik Fiddler is of great help, since it captures the calls made by the browser, giving a pretty good idea of what one has to do.




Just quoting you, so you get notified as well in case this is still relevant for you.

With that being said, search the API for xml that contains <maxResults> (if you use word search be careful with what software you are using, it might be there and not find it), this should give you an idea what API calls will support what you want, although at least as far as the ISAPI Traffic api documment is concerned "/ISAPI/Traffic/ContentMgmt/dataOperation" seems to be the best contender (doesn't seem work on my camera though).
Hi. Im doing the exact same thing as you but mine doesn't seem to work. I do indeed get my camera name in the return xml but it still gives me 'NO MATCHES' even tho i know that there should be some.
Do you know what i possibly could be missing? Any configuration on the wep software or something? I've been trying for days with no success
 

MicM

n3wb
Joined
Jun 18, 2019
Messages
10
Reaction score
11
Location
Portugal
I will start by asking the basic of this functionality, are you storing the license plates to the microSD card, as in can you get the license plates in the "Pictures" tab of your camera when you search there?

The link should be something like this 192.168.100.100:443/doc/page/download.asp (obviously change the IP, and possibly port to whatever works for your camera), and to clarify I do mean the tab with the option to search for license plates between dates, not the tab called "Smart Display", the tab in question should look something like this:


(when you press search, it needs to shows data of license plates there, if it doesn't is because you aren't storing license plates on the microsd card, I just can't show how the data would look since I can't share that data).
If you are only seeing the license plates in Smart Display tab, then you are likely not storing them, and if you aren't storing the plates, you can't access them later on, since the Smart Display is just an event like system that only shows the data from the moment of your connection, so data shown there isn't actually being stored anywhere but your computer memory.

Now if you are certain that the license plates are being stored to the microSd card, and you can retrieve say yesterday license plates on the camera, and you have a different camera model it is possible you have to change the body of the message to match what your specific camera expects, the only way to know this is to grab a software like telerik, and see what is being sent (and retrieved) when you use the web page of the camera to retrieve the license plates.

Alternatively, you can always just create an FTP server either on the computer storing the camera footage, or on some low-power device like a Raspberry Pi, and then have the camera send the pictures of the license plates to the FTP server, so you can then retrieve them from it.
 
Last edited:

black1906

n3wb
Joined
Dec 9, 2021
Messages
25
Reaction score
1
Location
USA
I will start by asking the basic of this functionality, are you storing the license plates to the microSD card, as in can you get the license plates in the "Pictures" tab of your camera when you search there?

The link should be something like this 192.168.100.100:443/doc/page/download.asp (obviously change the IP, and possibly port to whatever works for your camera), and to clarify I do mean the tab with the option to search for license plates between dates, not the tab called "Smart Display", the tab in question should look something like this:


(when you press search, it needs to shows data of license plates there, if it doesn't is because you aren't storing license plates on the microsd card, I just can't show how the data would look since I can't share that data).
If you are only seeing the license plates in Smart Display tab, then you are likely not storing them, and if you aren't storing the plates, you can't access them later on, since the Smart Display is just an event like system that only shows the data from the moment of your connection, so data shown there isn't actually being stored anywhere but your computer memory.

Now if you are certain that the license plates are being stored to the microSd card, and you can retrieve say yesterday license plates on the camera, and you have a different camera model it is possible you have to change the body of the message to match what your specific camera expects, the only way to know this is to grab a software like telerik, and see what is being sent (and retrieved) when you use the web page of the camera to retrieve the license plates.

Alternatively, you can always just create an FTP server either on the computer storing the camera footage, or on some low-power device like a Raspberry Pi, and then have the camera send the pictures of the license plates to the FTP server, so you can then retrieve them from it.
Thank you so much for the answer. I've been trying to get help for some time and you're the only person who answered me.
So,the problem is: I do not hava a SD card on my camera,so i can only see the data in the Smart Display tab.
And to be honest,i don't need an SD card. I only need the plate number as soon as the camera gets it. I will make the plate history myself on my Database.
Do you know if there is a way for me to get it without the card?
 

MicM

n3wb
Joined
Jun 18, 2019
Messages
10
Reaction score
11
Location
Portugal
Oh yeah, then what I posted simply won't work for you because the Smart Display is only showing information on the moment of the capture, it is basically like a motion capture event sort of thing, where if you don't save it you can't really look back in time to see when there was motion (not without analysing the entire footage again).

Honestly, without a microsd/FTP/NAS to save the licence plate capture, you are making things a lot more complicated for yourself because you essentially are going to need to keep a connection alive at all times with the camera to be able to capture the license plate related events, since if you lose that connection at any point and a license plate is captured, that license plate event will be gone.

Anyway don't know how you would do that exactly, the Smart Display tab works with their Plugin, so from what I recall Telerik Fiddler wasn't seeing any HTTP calls to get the license plates, but I could be wrong here, I never thought listening to the events was the right way to go about it given it would end up being a less reliable solution that required significantly more work, but my best guess to make this work without an intermediate/backup storage would be to check out Hikvision Network SDK, I believe I had seen a sample of event listening in one of them. Alternatively, you could also look onto some ONVIF project to see if you could perhaps get the events that way given hikvision technically supports ONVIF, but also no idea how well it supports it, and if it would work for license plate captures or not.
I would very seriously reconsider the actual necessity of going down this route because even if you end up making it work, you are going to have significantly more work to at best end up with the same result.
 

black1906

n3wb
Joined
Dec 9, 2021
Messages
25
Reaction score
1
Location
USA
Oh yeah, then what I posted simply won't work for you because the Smart Display is only showing information on the moment of the capture, it is basically like a motion capture event sort of thing, where if you don't save it you can't really look back in time to see when there was motion (not without analysing the entire footage again).

Honestly, without a microsd/FTP/NAS to save the licence plate capture, you are making things a lot more complicated for yourself because you essentially are going to need to keep a connection alive at all times with the camera to be able to capture the license plate related events, since if you lose that connection at any point and a license plate is captured, that license plate event will be gone.

Anyway don't know how you would do that exactly, the Smart Display tab works with their Plugin, so from what I recall Telerik Fiddler wasn't seeing any HTTP calls to get the license plates, but I could be wrong here, I never thought listening to the events was the right way to go about it given it would end up being a less reliable solution that required significantly more work, but my best guess to make this work without an intermediate/backup storage would be to check out Hikvision Network SDK, I believe I had seen a sample of event listening in one of them. Alternatively, you could also look onto some ONVIF project to see if you could perhaps get the events that way given hikvision technically supports ONVIF, but also no idea how well it supports it, and if it would work for license plate captures or not.
I would very seriously reconsider the actual necessity of going down this route because even if you end up making it work, you are going to have significantly more work to at best end up with the same result.
Thank you so much for the help,you actually clarified a lot of things for me. The reason why i need to do this,is because i'll be checking for 'everytime it gets a plate'. There is no way for me to do it with the SD card,i'll need to be constantly checking.
I need to do it in a way i'll be listening to it 24/7,and,as soon as it gets any plate,it returns it to me - without the need for me to be checking for the SD card history every time-.
But i don't know if is there a way for me to do it,so there is a chance i'll need to do it like you said,so i will keep everything in mind.
Thank you!!!!!!
 
Top