Changing Parent/Child via API

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
optionstechnology
Posts: 234
Joined: Thu Nov 17, 2016 11:26 am

Changing Parent/Child via API

Post by optionstechnology »

Is it possible to change parent - child relationships via the API?

I've tried using a put with a "parents" variable but even though it applies it doesn't make any changes

I also cannot retrieve a list of parents with a config/host
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Changing Parent/Child via API

Post by ssax »

Yes, I just validate this works in the latest version. Both PUT and POST worked for me, POST for new hosts, PUT for existing hosts.

What version of XI are you running?

See here:

http://YOURXISERVER/nagiosxi/help/api-c ... #edit-host

It worked on mine just adding &parents=parentname to the URL
optionstechnology
Posts: 234
Joined: Thu Nov 17, 2016 11:26 am

Re: Changing Parent/Child via API

Post by optionstechnology »

yip can confirm this worked, please close
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Changing Parent/Child via API

Post by scottwilkerson »

optionstechnology wrote:yip can confirm this worked, please close
Great!

Locking thread
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked