Page 1 of 1

API: How to Post a HostTemplate or a ServiceTemplate

Posted: Fri Feb 23, 2018 4:50 pm
by MrWoodward
The REST API - Config Reference that's built into Nagios XI doesn't have any documentation on how to POST a Host or Service Template.

I tried using the 'POST config/host' endpoint, but it didn't seem to like that my Host Template didn't have a 'host_name' and failed.

Is there a 'POST config/host_template' (and service_template) endpoint for the NagiosXI REST API?

We're on NagiosXI 5.4.11, btw.

Re: API: How to Post a HostTemplate or a ServiceTemplate

Posted: Fri Feb 23, 2018 5:10 pm
by scottwilkerson
Template creation is currently not available but we will be looking to add these endpoints in future versions

Re: API: How to Post a HostTemplate or a ServiceTemplate

Posted: Fri Feb 23, 2018 5:35 pm
by MrWoodward
Ok, thanks for the fast reply. We'll work around this.

Re: API: How to Post a HostTemplate or a ServiceTemplate

Posted: Sun Feb 25, 2018 6:46 pm
by krutaw
@scottwilkerson, is there a FR already in place for this or better yet a timeline?

Re: API: How to Post a HostTemplate or a ServiceTemplate

Posted: Mon Feb 26, 2018 11:09 am
by scottwilkerson
krutaw wrote:@scottwilkerson, is there a FR already in place for this or better yet a timeline?
There is a FR in place for this, however I do not have a timeline on when it will get created.

Re: API: How to Post a HostTemplate or a ServiceTemplate

Posted: Thu Mar 08, 2018 6:11 pm
by krutaw
Understood. Thankfully, the DB schema isn't all that complicated on the NagioSQL side of things so this should be a pretty simple thing to work around in the meantime.