Updating Notification Channels
You can edit or update the notification channels using the following API.
Request URL
Header
Header key - Authorization
Header value - Bearer {{access_token}} (Navigate to Settings > Access token > Show access token in the SixthSence portal.)
Request
{
"channelName": "string",
"template": "string",
"values": [
"string"
]
}
Parameters | Description |
---|---|
channelId | channelId of the notification channel to be updated |
values | Lists emails, slack url, webhook url based on type. |
template | Accepts only a valid JSON template customised for the WEBHOOK notification. |
Note: Updating type field is not supported.
Example:
{
"channelName": " test",
"values": [
"https://webhook.site/a0aac6c4-fb99-4dc8-b415-e31a393faa14"
]
}
Response
{
"data": {},
"message": "string",
"success": true
}
Example:
{
"message": "Notification channel successfully updated.",
"success": true,
"data": { "channelId": "4KuExIUBVVmCg9TvYqE3",
"channelName": " Test",
"type": "WEBHOOK",
"values": [
"https://webhook.site/a0aac6c4-fb99-4dc8-b415-e31a393faa14"
],
"template": "{\"ALERT_NAME\":\"{{alert_name}}\",\"CAPABILITY\":\"{{capability}}\",\"SEVERITY\":\"{{severity}}\",\"ENTITY_NAME\":\"{{service_name}}\",\"DESC\":\"{{event_type}}\",\"COMP\":\"{{metric_name}}\",\"NOTES\": \"{{tool_name}} has detected a problem with {{service_name}} application where {{metric_name}} was {{aggregator_operator}} {{threshold_value}} and the current value is around {{current_value}} for the last {{period}} min(s).\",\"TIME\":\"{{timestamp}}\",\"TOOL_NAME\":\"{{tool_name}}\",\"URL\":\"{{url}}\"}" ,
"lastUpdatedAt": 1674216304426,
"lastUpdatedBy": "API user",
"createdAt": 1674216304426,
"createdBy": "API user"
}
}