Replace a notification channel
Changed onReplaces a notification channel's name, labels, and settings, and returns the result. The channel keeps its identifier and type.
- The request carries the full channel, so an omitted labels or managed_by clears it.
- A Slack channel keeps its stored webhook URL when the request omits slack.webhook_url. This is the only exception to full replacement, because reads never return the full URL.
- If type differs from the stored type, the request fails with 400, and invalid_parameters names type.
- If the organization has no notification channel with this identifier, or the identifier isn't a valid UUID, the request fails with 404. The request never creates a channel.
Request
- Base URLhttps://global.api.konghq.com
- Auth
- HTTP bearer
- or HTTP bearer
- or HTTP bearer
- or HTTP bearer
Path parameters
The id of the notification channel.
Request body
The body of a request that creates or replaces an email channel.
The body of a request that replaces a Slack channel. Unlike creation, it can omit slack.webhook_url to keep the stored URL.
Example request
{
"labels": {
"env": "test"
},
"managed_by": {
"owner": "terraform"
}
}Response
The notification channel after the replacement.
A notification channel is a destination for budget alerts: a list of email addresses or a Slack incoming webhook. A budget's notification rule sends its alerts to the channels it lists, and one channel can serve many rules.
type tells the two kinds apart. An email channel carries its settings in email, and a Slack channel carries them in slack.
A notification channel that emails each message to its recipients through Konnect's email service.
A notification channel that posts each message to a Slack incoming webhook the organization created in its own workspace.
Example response
{
"id": "5f9fd312-a987-4628-b4c5-bb4f4fddd5f7",
"labels": {
"env": "test"
},
"managed_by": {
"owner": "terraform"
},
"created_at": "2022-11-04T20:10:06.927Z",
"updated_at": "2022-11-04T20:10:06.927Z"
}Changes
- info
endpoint added
- info