Skip to main content

api call to manage notifications in Contact Manager

Answered

Comments

4 comments

  • Andy Baugh cPanel Staff

    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
  • FusedT

    It says "For a list of available modules, use the WHM API 1 get_all_contact_importances function.", and get_all_contact_importances doesn't list Update::EndOfLife. At least now I know the app's name, which is "Update", I guess.

    0
  • Andy Baugh cPanel Staff

    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
  • FusedT

    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.