I spent some more time looking into this. It seems that only part of the handler config is exposed through the API. For Slack, the channel, username, and icon-emoji are exposed through the API, but the URL and enabled flat and other config is not.
Can anyone explain the reason for this? I was hoping to be able to use multiple different slack handlers with different destinations but it looks like I might have to use multiple instances of Kapacitor to achieve this.
The Slack service config is set via the kapacitor.conf file or via the /kapacitor/v1/config/slack API endpoint.
The handlers config doesn’t effect the aspects of the service itself. This is because the handlers consume the service, meaning you can have multiple Slack handlers to that go to different channels etc, but they all use the same Slack service.