更新通知チャネル
以下の API を使用して、通知チャネルを編集または更新できます。
リクエストURL
ヘッダー
ヘッダーキー :Authorization
ヘッダー値:Bearer {{access_token}} (SixthSence ポータルで [設定] > [アクセストークン] > [アクセストークンを表示] へ移動)
リクエスト
{
"channelName": "string",
"template": "string",
"values": [
"string"
]
}
パラメータ | 内容 |
---|---|
channelId | 更新する通知チャネルのチャネルID |
values | タイプに基づく、メールアドレス、Slack の URL、Webhook の URL の一覧 |
template | Webhook 通知用にカスタマイズされた有効な JSON テンプレートのみを許可します。 |
注記: タイプ フィールドの更新はサポートされていません。
例:
{
"channelName": " test",
"values": [
"https://webhook.site/a0aac6c4-fb99-4dc8-b415-e31a393faa14"
]
}
応答
{
"data": {},
"message": "string",
"success": true
}
例:
{
"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"
}
}