setParameterAttributes via API returns 'invalid task name'

Hello,

I’m using GenieACS version 1.2.8 and I tried changing parameter attributes via API but had no success.

When trying to remove the subscriber entry from the ‘accessList’ attribute like that:

curl -i 'http://localhost:7557/devices/202BC1-BM632w-000000/tasks' -X POST --data '{"name":"setParameterAttributes","parameterAttributes":[{"name": "InternetGatewayDevice.LANDevice.1.WLANConfiguration.1.SSID", "notificationChange": false, "accessListChange": true, "accessList": ""}]}'

GenieACS always respondes with:

HTTP/1.1 500 Internal Server Error
GenieACS-Version: 1.2.8+20211027200938
Connection: close
Date: Thu, 06 Jan 2022 11:13:39 GMT
Transfer-Encoding: chunked
Error: Invalid task name

The 'getParameterAttributes' method returns the same error.
curl -i 'http://localhost:7557/devices/202BC1-BM632w-000000/tasks' -X GET --data '{"name":"getParameterAttributes","parameterAttributes":["InternetGatewayDevice.LANDevice.1.WLANConfiguration.1.SSID"]}'

So I was wondering if this is even possible via API or if you have to use a provision for that.

I appreciate if anyone can help.

It is possible, but it appears to only be doable with provision scripts.

1 Like

Thank you for your response.

In case someone has the same problem, the correct syntax would be:

// restrict access
declare('InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANPPPConnection.1.Username', {accessList: now}, {accessList: ['']});
// allow access
declare('InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANPPPConnection.1.Username', {accessList: now}, {accessList: ['Subscriber']});

getParameterAttributes RPC use this script as well?