更新通知チャネル

以下の API を使用して、通知チャネルを編集または更新できます。

リクエストURL

PUT https://http-collector-observability.sixthsense.rakuten.com/api-externalization/api/v1/channels/{channelId}

ヘッダー

ヘッダーキー :Authorization

ヘッダー値:Bearer {{access_token}} (SixthSence ポータルで [設定] > [アクセストークン] > [アクセストークンを表示] へ移動)

リクエスト

{
"channelName": "string",
"template": "string",
"values": [
"string"
]
}
パラメータ内容
channelId更新する通知チャネルのチャネルID
valuesタイプに基づく、メールアドレス、Slack の URL、Webhook の URL の一覧
templateWebhook 通知用にカスタマイズされた有効な 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"
}
}