api to add comment
api to add comment
Am I blind or is there no endpoint to add a comment? I want our ticketing system to add a comment of the ticket # when it gets an alert from Nagios.
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
-
benjaminsmith
- Posts: 5324
- Joined: Wed Aug 22, 2018 4:39 pm
- Location: saint paul
Re: api to add comment
Hi Bandit,
The way to do that would be to use POST system/corecommand endpoint to send a Core command that will add a comment.
For example:
Let me know if that works for you.
Benjamin
The way to do that would be to use POST system/corecommand endpoint to send a Core command that will add a comment.
For example:
Code: Select all
curl -XPOST "https://192.168.23.113/nagiosxi/api/v1/system/corecommand?apikey=sCWXTQ3rHtm483AgRUUtLi04v5ECCVmktCCGoU8mINpPPflWafJbRKeGO8fGjUh6" -d "cmd=ADD_HOST_COMMENT;localhost;1;%user%;This is a test comment"
Benjamin
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: api to add comment
This will work, but what permissions are needed? I had a read only user that it wouldn't work even though they had API access. I then changed to this and still get Authentication failed
I tried it with my admin user's api key and it works great.
You do not have the required permissions to view the files attached to this post.
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
Re: api to add comment
Currently regular users only have access to the objects API endpoint, they would need to be an admin to use the other endpoints (system/config/etc).