Having an issue with checkboxes in API

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements

Having an issue with checkboxes in API

L0 Member

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.

3 REPLIES 3

L5 Sessionator

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>

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. 

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?

  • 2219 Views
  • 3 replies
  • 0 Likes
Like what you see?

Show your appreciation!

Click Like if a post is helpful to you or if you just want to show your support.

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!