Nagios API Put Contact
Posted: Wed Jun 19, 2019 4:20 am
I've been looking at utilising the API to help with our oncall implementation. I was attempting to use the put contact to update the email address for a contact however when i try i get the following
curl -XPUT "http://[nagios address]/api/v1/config/contact/testcontact?apikey=[secret api key]&pretty=1&email=jsmith"
{
"success": "Updated testcontact in the system. Config imported but not yet applied."
}
When i check why its not restarted it's because it's created a blank command as testcontact instead of updating the already created contact testcontact. When using post or delete it works correctly but put contact doesn't seem to work.
I'm using 5.6.3
curl -XPUT "http://[nagios address]/api/v1/config/contact/testcontact?apikey=[secret api key]&pretty=1&email=jsmith"
{
"success": "Updated testcontact in the system. Config imported but not yet applied."
}
When i check why its not restarted it's because it's created a blank command as testcontact instead of updating the already created contact testcontact. When using post or delete it works correctly but put contact doesn't seem to work.
I'm using 5.6.3