api call to manage notifications in Contact Manager
AnsweredWhat's the right whmapi1 function to manage notifications in WHM Contact Manager?
I'm particularly interested in disabling "Update::EndOfLife" because EL7 is still on "extended support" and it's baffling it's pestering with these messages -- we should be good till 2026.
-
Howdy,
You'd want to use `set_application_contact_event_importance` and set the importance to 'Disabled' for that event.
https://api.docs.cpanel.net/openapi/whm/operation/set_application_contact_event_importance/
Hope this helps!
0 -
It says "For a list of available modules, use the WHM API 1
get_all_contact_importances
function.", andget_all_contact_importances
doesn't list Update::EndOfLife. At least now I know the app's name, which is "Update", I guess.0 -
Perhaps the example in the API documentation wasn't specific enough for your scenario? Here:
/usr/local/cpanel/bin/whmapi1 set_application_contact_event_importance app='Update' event='EndOfLife' importance='Disabled'
After running the command, you can login to WHM, navigate to 'Contact Manager', switch to the 'Notifications' tab then search for 'cPanel & WHM End of Life Notice'. The notice should then show that it has indeed been disabled by the aforementioned API call.
Hope this helps!
0 -
Andy, unsure why I missed that earlier, it's now there:
/usr/local/cpanel/bin/whmapi1 --output=jsonpretty get_all_contact_importances | jq '.data.importances[] | select(.event=="EndOfLife")'
Case closed! Thanks.
0
Please sign in to leave a comment.
Comments
4 comments