Page 1 of 1

Changing Parent/Child via API

Posted: Wed Jun 03, 2020 8:04 am
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

Re: Changing Parent/Child via API

Posted: Wed Jun 03, 2020 4:41 pm
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

Re: Changing Parent/Child via API

Posted: Thu Jul 02, 2020 8:30 am
by optionstechnology
yip can confirm this worked, please close

Re: Changing Parent/Child via API

Posted: Thu Jul 02, 2020 1:41 pm
by scottwilkerson
optionstechnology wrote:yip can confirm this worked, please close
Great!

Locking thread