XI 5 API doc

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
grenley
Posts: 96
Joined: Tue May 13, 2014 6:06 pm

XI 5 API doc

Post by grenley »

Hi.
I am starting to code up some cleanup routines for services on XI.
I love the new RESTful API.
Is there any exhaustive doc available?
The doc in the help menu is a great start but is, by no means, complete.
For example, when I try to delete a service that was previously deleted, I get this:
"error": "Could not find a unique id for this service."
That's fine, but it isn't documented, as far as I can see, in the web doc.
Just looking for all the possibilities so I can code for relevant ones.

BTW, I would actually expect, that when I GET all the services for a host, the previously deleted ones would not continue showing up.
Is that because I haven't done an apply yet?

Finally, what are the performance implications on XI of having a bunch of potentially concurrent applyconfig calls?

Thanks,
Rick
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

Re: XI 5 API doc

Post by mcapra »

grenley wrote: Is there any exhaustive doc available?
...
The doc in the help menu is a great start but is, by no means, complete.
Just what is available in the help menu. It's a work in progress. If you have specific questions or use-cases, a forum post can usually get those figured out.
grenley wrote: BTW, I would actually expect, that when I GET all the services for a host, the previously deleted ones would not continue showing up.
Is that because I haven't done an apply yet?
Probably, yeah. The API is undergoing a bit of a re-design on the back-end which should help solve some of these consensus issues.
grenley wrote:Finally, what are the performance implications on XI of having a bunch of potentially concurrent applyconfig calls?
Generally speaking, the applyconfig should be the very last step of any sort of chain of API calls. Having a bunch running at the same time can cause issues outside of performance.
Former Nagios employee
https://www.mcapra.com/
grenley
Posts: 96
Joined: Tue May 13, 2014 6:06 pm

Re: XI 5 API doc

Post by grenley »

It seems that the API may not be working properly.
One of the documented interfaces is to be able to delete a host.
Here's the URL I used:
Here's what was returned:
"error": "Host cannot be deleted using this method. Must be deleted through the CCM."
Any help?

Thanks,
Rick
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

Re: XI 5 API doc

Post by mcapra »

Does this particular host have dependencies (particularly with services) that exist? As goes with the Core Config Manager, the API requires that all dependencies for a particular object be removed before the object itself gets removed.
Former Nagios employee
https://www.mcapra.com/
Locked