Zenon Skuza Does your user have the "Web Interface" box ticked in Configuration -> Users -> Access Entries?
Here's a javascript function which uses this API (it only works with basic auth):
function toggle(event, uuid, enabled) {
let mode = !enabled;
let data = encodeURIComponent(`[{"enabled": ${mode}, "uuid": "${uuid}"}]`);
fetch(`/api/idnode/save?node=${data}`).then(response => {
if (response.ok) {
...
}
});
return;
}
Untested but I believe a simpler form of your query should work:
curl -u user:pass -d node={"uuid":"c0d439f847a8a1b3c90848205ee397af","enabled":0} "http://192.168.20.45:9981/api/idnode/save"