Configure notification rules via REST API

After searching the forum for my problem, I found these both post on the same topic.

It is currently not possible to set up notification rules via the REST API, correct?
At least I found no rule ID, like I found on an agent access rule, which works perfectly via the API via this button image

Or am I missing something?

No, you are not missing anything. Currrently notification rules cannot be edited with the REST API.

Currently my workaround is:
Copying /omd/sites/local/etc/check_mk/conf.d/wato/notifications.mk after configuring the rule via webgui out of the checkmk docker container.
Then remove notifications.mk after starting:
rm /omd/sites/local/etc/check_mk/conf.d/wato/notifications.mk
Copy notifications.mk to /omd/sites/local/etc/check_mk/conf.d/wato/notifications.mk:
cp /srv/notifications.mk /omd/sites/local/etc/check_mk/conf.d/wato/notifications.mk
/srv/notifications.mk gets mounted at the start:

    volumes:
      - ${CHECKMK_CONFIG_DIR}/notifications.mk:/srv/notifications.mk

All of this is happening in deploy.sh after starting the docker container via a healthcheck, among many other REST API calls, which brought up this post.

1 Like

There is still no way of configuring Notifications via Rest API? I only see to edit host/services notif period… I have also thougth about implementing @peterge-zendu solution