API wildcards
API wildcards
I put in a feature request in January 2016 for wildcards to work in the API urls. Was that ever completed and if so, their documentation on how ot use? I looked through the change log but didn't see it mentioned.
2 of XI5.6.14 Prod/DR/DEV - Nagios LogServer 2 Nodes
See my projects on the Exchange at BanditBBS - Also check out my Nagios stuff on my personal page at Bandit's Home and at github
See my projects on the Exchange at BanditBBS - Also check out my Nagios stuff on my personal page at Bandit's Home and at github
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: API wildcards
By chance do you have a link to the request so we can see what you were looking for? I'm not fully clear on the request, it may be implemented, but not sure
Re: API wildcards
https://support.nagios.com/forum/viewto ... 16&t=36648 <---original thread
Basically I want to do an API call for service status where the hostname is like abc* or abc%
The above being an example of what I'd like to do, get a service status list for all hosts that start with abc
Basically I want to do an API call for service status where the hostname is like abc* or abc%
Code: Select all
https://xxxx.xxx.com/nagiosxi/api/v1/objects/servicestatus?host_name=abc*&apikey=xxxxx&pretty=1"2 of XI5.6.14 Prod/DR/DEV - Nagios LogServer 2 Nodes
See my projects on the Exchange at BanditBBS - Also check out my Nagios stuff on my personal page at Bandit's Home and at github
See my projects on the Exchange at BanditBBS - Also check out my Nagios stuff on my personal page at Bandit's Home and at github
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: API wildcards
If you click "type" you can see all the options
So in your example you would do this
Code: Select all
https://xxxx.xxx.com/nagiosxi/api/v1/objects/servicestatus?host_name=lks:abc&apikey=xxxxx&pretty=1You do not have the required permissions to view the files attached to this post.
Re: API wildcards
Oh god, thanks you! I thought it was added before but just couldn't find it!
Close this up!
Close this up!
2 of XI5.6.14 Prod/DR/DEV - Nagios LogServer 2 Nodes
See my projects on the Exchange at BanditBBS - Also check out my Nagios stuff on my personal page at Bandit's Home and at github
See my projects on the Exchange at BanditBBS - Also check out my Nagios stuff on my personal page at Bandit's Home and at github
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: API wildcards
The only caveat we could not achieve was if you wanted to wildcard like abc*123
This wasn't an option and would need to be filtered after the results are pulled.
Closing ticket
This wasn't an option and would need to be filtered after the results are pulled.
Closing ticket