API structure change

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
ibnetworking
Posts: 19
Joined: Mon Jan 16, 2017 4:32 am

API structure change

Post by ibnetworking »

Hello,

We have an automated system where we depend on the following GET call

Code: Select all

/nagiosxi/api/v1/objects/service

which returns a massive JSON.
Usually, that JSON had a key at the beginning called "servicelist".

Suddenly, our software stopped working, and we noticed that the key is no longer "servicelist" but "service".

Example of the beginning of the output

Code: Select all

{
    "recordcount": "21449",
    "service": [
        {
            "@attributes": {
                "id": "20176"
            },
Can you:
a) Confirm this has changed
b) Point to the Changelog where this has been mentioned (I've searched trough NagiosXI and NagiosCore changelogs but wasn't able to find any references)

Thanks.
jomann
Development Lead
Posts: 611
Joined: Mon Apr 22, 2013 10:06 am
Location: Nagios Enterprises

Re: API structure change

Post by jomann »

Yes that did change.

Unfortunately this was a side effect of a bunch of backend changes that streamlined some really inefficient ways of grabbing data from the backend. Typically we don't show changes on the changelog that are underlying changes to the subsystem that users don't access. We didn't catch the change when we initially wrote the changelog or we would have mentioned it. All API endpoints that had the "<object>list" section no longer have it.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
ibnetworking
Posts: 19
Joined: Mon Jan 16, 2017 4:32 am

Re: API structure change

Post by ibnetworking »

Hi Jake,

thank you for the reply.

Can you guys update the changelog now, in case someone else runs into this issue (or in case someone hasn't yet update to this version so they can make appropriate changes to their code)?

Changing the JSON response of an API endpoint is a breaking change imho (especially for companies like ours that have a entire system about automating monitoring with your products), and should be mentioned.

I am sure there are dozen of companies that use your product the same way (hell, that's why you have the API in the first place - so we can automate stuff).

I hope this gets recognised as an improvement opportunity by you and your team so we can continue using your software, but recently, you are making it extremely hard for us.


Regards
jomann
Development Lead
Posts: 611
Joined: Mon Apr 22, 2013 10:06 am
Location: Nagios Enterprises

Re: API structure change

Post by jomann »

Yes, I've updated the changelog to mention the change to the API.

I understand the issue and I know how frustrating it can be when things end up not working anymore.

Normally we try to keep all breaking changes in major versions only. For the latest minor version (5.5.0), there were just a large amount of updates that were made. Minor versions normally have features and not incompatibilities. Of course that can't always be the case.

As for this issue in large companies where relying on the system working 100% is an issue, with every purchase we offer 3 separate activations of XI licenses. One for production, one for testing, and one for high availability. We always suggest that people who must rely on everything working 100% use a test system to ensure that backwards compatibility with internal systems are maintained. It's quite impossible for us to make sure everything in every system setup and configuration works properly for all customers.

Can you elaborate on any other changes that have made it difficult to use the software?
Last edited by jomann on Tue Oct 16, 2018 2:32 pm, edited 1 time in total.
Reason: Post originally did not mention change was in 5.5.0
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
ibnetworking
Posts: 19
Joined: Mon Jan 16, 2017 4:32 am

Re: API structure change

Post by ibnetworking »

We always suggest that people who must rely on everything working 100% use a test system to ensure that backwards compatibility with internal systems are maintained.
We actually did catch it in our nagios instance devoted for testing, that's why we headed up here to point this stuff out.
It's quite impossible for us to make sure everything in every system setup and configuration works properly for all customers.
Of course you can't, but when you have an API, and people use your API, you would think it would be a pretty big deal to change the structure of the responses that those APIs produce without letting anyone know. Especially when your customers pay almost 3 grand for your software.
That. is. insane.

Now, having a Development Lead / Senior Developer tell me that they forgot to include it in the changelog due to many development changes, and that it kinda slipped by - is scary. Especially when we're talking about this:
All API endpoints that had the "<object>list" section no longer have it.
As for your last question:
Can you elaborate on any other changes that have made it difficult to use the software?
I sure can. This entire thread, started by one of our engineers shows exactly how much trouble we had to go through to have some basic functionality and actually fix a bug for you guys.
https://support.nagios.com/forum/viewto ... 1539706993

I wasn't gonna go on a rant, I simply wanted to indicated that you guys did a massive change without telling anyone and it might break other people's stuff. Instead of hearing something along the lines of

"Thank you for pointing this out. We'll make sure to include extra changelog reviews before releases and make sure your functionality doesn't get broken where it doesn't need to, and we apologise for the inconvenience you have experienced"

I'm hearing:

"Yes, we did change our API, but we forgot to let you guys know. Please test our changes on your dev environment first. We can't guarantee we won't break our API"

I know you're a engineer, but a bit of customer service goes a long way.
bheden
Product Development Manager
Posts: 179
Joined: Thu Feb 13, 2014 9:50 am
Location: Nagios Enterprises

Re: API structure change

Post by bheden »

We appreciate you taking the time to report the issue. The Changelog has been updated with the API changes under the 5.5.0 section.

The help documentation has also been updated to reflect the changes.

Thank you.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Nagios Enterprises
Senior Developer
ibnetworking
Posts: 19
Joined: Mon Jan 16, 2017 4:32 am

Re: API structure change

Post by ibnetworking »

Awesome!

Thank you for your help regarding this.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: API structure change

Post by lmiltchev »

ibnetworking, is it OK to close this topic now? Thank you!
Be sure to check out our Knowledgebase for helpful articles and solutions!
ibnetworking
Posts: 19
Joined: Mon Jan 16, 2017 4:32 am

Re: API structure change

Post by ibnetworking »

Yep, go ahead.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: API structure change

Post by lmiltchev »

Closing.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked