Does anyone know why this Dahua API request returns a Bad Request error?

Joined
Jul 14, 2021
Messages
1
Reaction score
0
Location
Berlin
This is from the v2.76 API. The precise HTTP URL I'm using includes this /cgi-bin/storageDevice.cgi?action=getDeviceAllInfo

Screen Shot 2021-08-23 at 2.03.29 PM.png

Whenever I run this I get a Bad Request error and I'm not sure why. I don't actually have an SD card connected to this camera at the moment, so perhaps that's the problem? Though I don't see why it would
return a BAD_REQUEST error instead of a NOT_FOUND in this case. I'm quite new to using this API so I'm not sure if Dahua has issues with returning informative error messages or if I've messed something
up and just not seeing it.

Thanks in advance
 

wittaj

IPCT Contributor
Joined
Apr 28, 2019
Messages
25,376
Reaction score
49,424
Location
USA
You will find the API documentation isn't perfect and they cameras do not follow a strict conformance.

You probably need a username and password in it, so try different combinations. The user and password in front of the ip address usually works:

: PASSWORD@IPADDRESS:554/cgi-bin/.....

No space after the : in the command, but if I didn't leave a space, then you get :password lol
 
Top