API: How to Post a HostTemplate or a ServiceTemplate

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
MrWoodward
Posts: 66
Joined: Fri Jan 06, 2017 1:58 pm

API: How to Post a HostTemplate or a ServiceTemplate

Post 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.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

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

Post by scottwilkerson »

Template creation is currently not available but we will be looking to add these endpoints in future versions
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
MrWoodward
Posts: 66
Joined: Fri Jan 06, 2017 1:58 pm

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

Post by MrWoodward »

Ok, thanks for the fast reply. We'll work around this.
krutaw
Posts: 60
Joined: Wed Jul 31, 2013 6:30 pm

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

Post by krutaw »

@scottwilkerson, is there a FR already in place for this or better yet a timeline?
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

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

Post 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.
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
krutaw
Posts: 60
Joined: Wed Jul 31, 2013 6:30 pm

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

Post 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.
Locked