Page 1 of 1

XI 5 API doc

Posted: Tue Mar 07, 2017 7:11 pm
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

Re: XI 5 API doc

Posted: Wed Mar 08, 2017 10:53 am
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.

Re: XI 5 API doc

Posted: Fri Mar 10, 2017 7:22 pm
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

Re: XI 5 API doc

Posted: Mon Mar 13, 2017 10:44 am
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.