- Access exclusive content
- Connect with peers
- Share your expertise
- Find support resources
10-06-2017 10:44 AM
I am having an issue with changing settings that use checkboxes through API. For example the setting under
/config/devices/entry[@name='localhost.localdomain']/deviceconfig/system/services. If I try to set <disable-telnet></disable-telnet> it says that <disable-telnet></disable-telnet> is an invalid object. If I use the api browser and click on disable-telnet it returns success but code="7" which means invalid object and really isn't success. If I try the api browser and do a submit for just services it returns only a few of the checkboxes and what the settings are. We are currently on the latest version of 7. We have hit this in other parts of the config for checkboxes also. I did the debug to see what is happening when somebody sets a checkbox but it is the only part that doesn't seem to translate to api properlyl.
11-02-2017 12:08 PM
Looks like these checkboxes are expecting "yes" or "no" as values. As an example, if you want to enable HTTPS but disable telnet, this seems to be working for me (7.1.x):
Type: config
Action: set
(xpath) /config/devices/entry[@name='localhost.localdomain']/deviceconfig/system
(element)
<service>
<disable-https>no</disable-https>
<disable-telnet>yes</disable-telnet>
</service>
11-28-2017 07:09 AM
Weird. I just got a response back from second level support that they were able to replicate the problem. They are going to enumerate through all the checkboxes to see all the ones that are causing the issue and try to provide a fix.
11-28-2017 09:04 AM
AFAIK, you can't `set` something to an empty value that's expecting a `yes` or a `no`. Along those same lines, there are fields in the API that you can set as empty, while others will not tolerate it. Could you refer them to my posts, and if they belive this is a bug, ask for a bug ID and share it here?
Click Accept as Solution to acknowledge that the answer to your question has been provided.
The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!
These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the LIVEcommunity as a whole!
The LIVEcommunity thanks you for your participation!