Okay, so I don't know why this isn't documented, but when you're using the GET objects/host command, with 5.5.1, the return has changed. In 5.4.13, the return you get for that command is:
"hostlist": {
"recordcount": "168",
"host": [
{
With 5.5.x (I'm not sure if this is 5.5.0 or 5.5.1, I'm testing 5.5.1 right now) you get:
"recordcount": "33",
"host": [
{
This causes all kinds of errors since you've changed the hierarchy of the JSON return records. If this was intentional, then please pay more attention to documenting this kind of thing. If this was not, then it's a rather large bug.
Undocumented REST API change
-
- Posts: 22
- Joined: Mon Jun 15, 2015 8:04 am
Re: Undocumented REST API change
This also happens with objects/contact
-
- Posts: 22
- Joined: Mon Jun 15, 2015 8:04 am
Re: Undocumented REST API change
and objects/hostgroup
Re: Undocumented REST API change
I just had a word from our developers, who confirmed that this change was intentional. The documentation will be updated in 5.5.2, which should be coming out soon.If this was intentional, then please pay more attention to documenting this kind of thing. If this was not, then it's a rather large bug.
Be sure to check out our Knowledgebase for helpful articles and solutions!
-
- Posts: 22
- Joined: Mon Jun 15, 2015 8:04 am
Re: Undocumented REST API change
Okay. Can y'all please not just change stuff without documenting it? doing the error trapping wasn't hard, but not knowing why I was getting errors that made no sense and worked on 9 other servers is a bit frustrating.lmiltchev wrote:I just had a word from our developers, who confirmed that this change was intentional. The documentation will be updated in 5.5.2, which should be coming out soon.If this was intentional, then please pay more attention to documenting this kind of thing. If this was not, then it's a rather large bug.
APIs can't just arbitrarily change without notice like that, not if you want people to use and rely on them.
Re: Undocumented REST API change
I understand it causes issues to have changes like this happen. You're right the docs should have been updated, and we try to make sure we catch everything but sometimes it doesn't get caught.
As for the changes in the API, this is one of the biggest releases of XI we've ever had. A lot changed behind the scenes, and the change is related to some back-end changes that were needed to improve usability and stability in XI, and it happened to remove the list portion of the object.
As for the changes in the API, this is one of the biggest releases of XI we've ever had. A lot changed behind the scenes, and the change is related to some back-end changes that were needed to improve usability and stability in XI, and it happened to remove the list portion of the object.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
-
- Posts: 22
- Joined: Mon Jun 15, 2015 8:04 am
Re: Undocumented REST API change
okay, another one. I notice in Fusion that I can add AD/LDAP users, but when I go to look in the help for REST APIs in Nagios XI 5.5.2, there's no documentation/help for adding users at all. Is this going to be changed soon?
Re: Undocumented REST API change
I was told by @jomann that the documentation for adding AD/LDAP users will be added to the next release of Fusion. Currently, there is an example, showing how to add a "local" user only.
Adding AD/LDAP users is done is a similar way. Here's a couple of examples:
Hope this helps.
Adding AD/LDAP users is done is a similar way. Here's a couple of examples:
Code: Select all
curl -XPOST "http://x.x.x.x/nagiosfusion/api/v1/system/user?apikey=5ljksid8krdibrv2eo6jaa8vadij47d8ptqmd7r2v8jb3hce7h2go9d2mtkn4vvs&pretty=1" -d "username=jmcdouglas&password=test&name=Jordan%20McDouglas&email=jmcdouglas@localhost&dateformat=1&number_format=1&auth_level=user&auth_server_id=5a7b3b87cdc4e&allow_local=0&ad_username=jmcdouglas&email_info=0&auth_type=ad"
curl -XPOST "http://x.x.x.x/nagiosfusion/api/v1/system/user?apikey=5ljksid8krdibrv2eo6jaa8vadij47d8ptqmd7r2v8jb3hce7h2go9d2mtkn4vvs&pretty=1" -d "username=jmcdouglas&password=test&name=Jordan%20McDouglas&email=jmcdouglas@localhost&dateformat=1&number_format=1&auth_level=user&auth_server_id=5a7b3b950fd7f&allow_local=0&ldap_dn=cn%3Djmcdouglas%2Cou%3DTeam%2Cdc%3DNagios%2Cdc%3Dcom&email_info=0&auth_type=ldap"
Be sure to check out our Knowledgebase for helpful articles and solutions!