# setParameterAttributes via API returns 'invalid task name'

**URL:** <https://forum.genieacs.com/t/setparameterattributes-via-api-returns-invalid-task-name/2309>\
**Category:** Uncategorized\
**Created:** [January 6, 2022, 12:27pm UTC](https://forum.genieacs.com/t/setparameterattributes-via-api-returns-invalid-task-name/2309 "2022-01-06T12:27:15Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![royschn](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.genieacs.com/royschn/32/947_2.png) [@royschn](https://forum.genieacs.com/u/royschn)\
**Post date:** [January 6, 2022, 12:27pm UTC](https://forum.genieacs.com/t/setparameterattributes-via-api-returns-invalid-task-name/2309/1 "2022-01-06T12:27:15Z")

</div>

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": ""}]}'
```

---

<div class="post-metadata">

**Author:** ![akcoder](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.genieacs.com/akcoder/32/11_2.png) [@akcoder](https://forum.genieacs.com/u/akcoder)\
**Post date:** [January 6, 2022, 5:33pm UTC](https://forum.genieacs.com/t/setparameterattributes-via-api-returns-invalid-task-name/2309/2 "2022-01-06T17:33:33Z")

</div>

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

> [@SetParameterAttributes for ValueChangeNotification](https://forum.genieacs.com/t/setparameterattributes-for-valuechangenotification/1268):
>
> Hi, I’m currently trying to configure a FritzBox to send a “4 VALUE CHANGE” notification to my GenieACS Server. I found this discussion in your forum: But I’m lost on the exact syntax I have to use in my provision. Do I have to pass a special value in the “timestamp” field of my declare function? Thanks in advance!

---

<div class="post-metadata">

**Author:** ![royschn](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.genieacs.com/royschn/32/947_2.png) [@royschn](https://forum.genieacs.com/u/royschn)\
**Post date:** [January 14, 2022, 1:07pm UTC](https://forum.genieacs.com/t/setparameterattributes-via-api-returns-invalid-task-name/2309/3 "2022-01-14T13:07:28Z")

</div>

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']});
```

---

<div class="post-metadata">

**Author:** ![clearlove](https://avatars.discourse-cdn.com/v4/letter/c/258eb7/32.png) [@clearlove](https://forum.genieacs.com/u/clearlove)\
**Post date:** [July 19, 2023, 5:48am UTC](https://forum.genieacs.com/t/setparameterattributes-via-api-returns-invalid-task-name/2309/4 "2023-07-19T05:48:15Z")

</div>

getParameterAttributes RPC use this script as well?
