Restful API - Managing 'Commands'

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
bathplug
Posts: 1
Joined: Tue Feb 05, 2019 3:44 am

Restful API - Managing 'Commands'

Post by bathplug »

I'm using the API to manage the configuration of our Nagios XI servers (version 5.6.7) and one issue in particular that I can't manage is the 'Command Type' for commands (only Command_Name and Command_Line are available). Whenever a new command is added it's automatically assigned as a 'misc command' which means it cannot be assigned to a service or a host. Well, it can, but it just won't appear until you change the type to 'check command'.
Is there something already within the API that can do this (something I've missed) or can/will it be added to a future release?

Thanks
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Restful API - Managing 'Commands'

Post by lmiltchev »

You haven't missed anything. You are correct. There is no directive to set up the command "type", so it is not possible to do this via the REST API. The "new" command would not show under the "Check command" drop-down menu in the CCM, but under the "Even handler" menu.

Unfortunately, there is no "workaround" at the moment. There may be in the future if we change the way REST API works.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked