latest Version of DAHUA HTTP API FOR IPC Documentation ??

My picture is from modern Dahua 5442-S3 cam..
Yours is from previous Dahua UI interface..

You must go over all options in Network and System menus..
those options should be there somewhere..
I located the CGI setting under System -> Safety menu. The camera now correctly returns a 401 error instead of a 404. Thank you!
 
401 unauthorized..

You must send login/pass to camera...

http://user@pass:192.168.1.108/cgi-bin/eventManager.cgi
I've authorized successfully, but the endpoint /cgi-bin/eventManager.cgi?action=attach&codes=[All] never returns any data. The camera detects movement and starts recording video, and SmartPSS emits an alarm sound, but I don’t receive any response from that endpoint.
 
Read the Dahua HTTP API..

This functions don't send one reply... it halts HTTP connection indefinitely and sends many replies encoded as multipart in the same reply (it don't close connection)..
You can't use/display URL to this function simply in web browser - You need to write proper code in python or java-script to support receiving data from this function.
there are extra parameters to define keep-alive data which server/client will send every x seconds...

On GitHub You will find many apps / modules that are using this call:

You can browse theirs code..

PS. You didn't wrote for what You need receive events, but there are read-to-use Dahua modules for Home-Assistant, HomeKit or Frigate..
 
I've authorized successfully, but the endpoint /cgi-bin/eventManager.cgi?action=attach&codes=[All] never returns any data. The camera detects movement and starts recording video, and SmartPSS emits an alarm sound, but I don’t receive any response from that endpoint.
Actually the HTTP URL should be "user:" the "@192.168.1.108" (colon after user and @ before camera IP as below; it was relayed to you vice versa. :cool:

Code:
http://user:pass@192.168.1.108/cgi-bin/eventManager.cgi
 
Read the Dahua HTTP API..

This functions don't send one reply... it halts HTTP connection indefinitely and sends many replies encoded as multipart in the same reply (it don't close connection)..
You can't use/display URL to this function simply in web browser - You need to write proper code in python or java-script to support receiving data from this function.
there are extra parameters to define keep-alive data which server/client will send every x seconds...

On GitHub You will find many apps / modules that are using this call:

You can browse theirs code..

PS. You didn't wrote for what You need receive events, but there are read-to-use Dahua modules for Home-Assistant, HomeKit or Frigate..
I am using Axios with digest auth in node.js.
 
Thank you for the information. However, as I mentioned previously, there seems to be an issue with my cameras. I have three Dahua cameras, and none of them work with the API. No matter what I try, I always receive a 404 error.

View attachment 204454
Run the API command to return the API version.
Try changing authentication type as well.
 
Is there a command to manage IPC's firewall (Safety > Firewall menu)? Would be nice to batch add rules to all cameras in possession... There is getConfig&name=AccessFilter but there's no mention for such setConfig :( There's SetAccessFilterConfig in older API documents though. Guess there's the reason they've removed it in further editions...
 
Last edited:
Is anyone else having issues with the endpoint
Code:
/cgi-bin/configManager.cgi?action=setConfig&StorageGroup[1].PicturePathRule
?

On the DH-IPC-HDBW2241E-S model with firmware DH_IPC-HX2X4X-Taylor_MultiLang_PN_V2.840.0000000.17.R.240814, I can't set the value except for StorageGroup[0].

When I run a get, it returns the values for storage 0, 1, and 2, but I can only use the set command on 0 any other storage array return "error bad request"

Any suggestions?
 
Last edited: