[REST API] Config endpoint only returns active (registered) hosts

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Post Reply
cmueller
Posts: 14
Joined: Sun Mar 04, 2018 11:07 am

[REST API] Config endpoint only returns active (registered) hosts

Post by cmueller »

The [GET] config/host operation only returns hosts that are marked as active (registered). Is there an option in the API to also display the non-active hosts or could that be added?
sgardil
Posts: 147
Joined: Wed Aug 09, 2023 9:58 am

Re: [REST API] Config endpoint only returns active (registered) hosts

Post by sgardil »

Hey @cmueller

unfortunately I don't believe there is a way currently to check for inactive hosts via our host config endpoint. I can put in a request for this to be added however I can not give a time frame for when that would be done.
User avatar
lgute
Posts: 119
Joined: Mon Apr 06, 2020 2:49 pm

Re: [REST API] Config endpoint only returns active (registered) hosts

Post by lgute »

Hi @cmueller, thanks for reaching out.

Is there specific information you need from config/host or could you use the objects/host endpoint? I believe that endpoint returns all hosts.
Please let us know if you have any other questions or concerns.

-Laura
cmueller
Posts: 14
Joined: Sun Mar 04, 2018 11:07 am

Re: [REST API] Config endpoint only returns active (registered) hosts

Post by cmueller »

Sorry for the late response...
The "objects/host" endpoint also don't displays not-active systems. (What I can understand and also expect... because it basicly also delivers the state informations: "object/hoststatus".)

But from the "config/host" endpoint I would expect that I also can see the non-active systems. (Because they are also displayed in the Core Config Manager)... it's even getting weirder... I'm able to update a non-active system with a PUT or remove it with a DELETE (all on the config/host endpoint). I only can't display those with a GET.

The reason behind that need is that I want to build a script that maintains the free variable to put informations for our service desk (like a assignment group etc. there)
User avatar
lgute
Posts: 119
Joined: Mon Apr 06, 2020 2:49 pm

Re: [REST API] Config endpoint only returns active (registered) hosts

Post by lgute »

Hi @cmueller,

I agree. The api should allow users to filter config/host by active, inactive or all. I have submitted this as a feature request.
Please let us know if you have any other questions or concerns.

-Laura
Post Reply