Dahua API DisableLinkage how to toggle current value.

JoeyB

n3wb
Joined
Jul 27, 2023
Messages
3
Reaction score
2
Location
Australia
Hi,

Firstly I very new to using the Dahua API.

What I want to do is toggle the current value of the DisableLinkage. I can run Enable=false and Enable=true under 2 different buttons.

But what I would like to do is toggle the current state. I am limited to a single URL under a button in the application I am using.

Any help would be greatly appreciated

# Get the current value
http://IP_ADDRESS/cgi-bin/configManager.cgi?action=getConfig&name=DisableLinkage

# Disable
http://IP_ADDRESS/cgi-bin/configManager.cgi?action=setConfig&DisableLinkage[0].Enable=false

# Enable
http://IP_ADDRESS/cgi-bin/configManager.cgi?action=setConfig&DisableLinkage[0].Enable=true
 
Top