I'm looking if there is a better way to solve adding a host via api with a template for use in an automation script when deploying new hosts.
Currently the POST config/host is limited to a number of required parameters that are already handled by our template. If I use the POST config/import I can add a host with a template using the following request body
define host {
host_name ******
address *****
use windows-server
contact_groups *****
notification_period win_wed_0300
register 1
}
then I need to apply the config using POST applyconfig as POST config/import does not respect the applyconfig=1 parameter.
Is there a better way?
Adding Host via API with Template
Re: Adding Host via API with Template
Have you tried using "force=1"?
You do not have the required permissions to view the files attached to this post.
Be sure to check out our Knowledgebase for helpful articles and solutions!