notifications
GET /v1/sites/{site_id}/notification-channels
Which channels this site's notifications go to.
認証
ベアラー トークンとして API キーを送信します。このエンドポイントでは仕様に特定の権限が記載されていないため、キーに必要な最小限の権限を付与し、推測するのではなくレスポンスを確認してください。
組織 ID を入力する場所
このエンドポイントはクエリパラメータとして org_id を受け取ります。省略した場合はテナントサブツリー全体が対象になり、指定した場合は特定の組織のみに絞り込まれます。
組織IDは、ダッシュボードのAPIキー画面にキーのすぐ横に表示されています。これは、実行するすべての呼び出しで同じIDになります。
試してみる
アングルブラケット内のすべてをご自身の値に置き換え、キーのプレースホルダーをご利用中のダッシュボードのキーに置き換えてください。
curl -X GET https://api.zinndigital.com/v1/sites/{site_id}/notification-channels \
-H "Authorization: Bearer zdk_live_…"ログインしていますか?ダッシュボード内のAPIコンソールでは、実際の組織IDやお客様ご自身のキーが自動入力され、ライブAPIに対してリクエストが実行されるため、実際のレスポンスを確認することができます。 API コンソールでこのエンドポイントを開く
詳細
The destinations this site routes to, plus whether e-mail is currently being sent. The response carries BOTH what the customer asked for (email_muted) and what is actually happening (email_active, email_reason), and they can differ. E-mail may be switched off only while another channel is connected and healthy; if every alternative goes bad, e-mail resumes on its own and overriding_choice is true. A client that rendered only the stored flag would show a toggle that disagrees with the customer's inbox - which is the exact failure this feature exists to prevent, because the notification telling you Slack has died would otherwise go to Slack.
パラメータ
| 名前 | タイプ | 必須 | これがその内容です |
|---|---|---|---|
site_id (path) | string | はい | — |
org_id (query) | string | いいえ | The organization to act on. Omitted resolves to your own ONLY when you belong to exactly one organisation; a principal in more than one must name it. A reseller managing a client… |
返信
| 名前 | タイプ | 必須 | これがその内容です |
|---|---|---|---|
site_id | string | はい | — |
channels | SiteNotificationChannel[] | はい | — |
email_muted | boolean | はい | What the customer ASKED for. Not necessarily what is happening. |
email_active | boolean | はい | Whether e-mail is actually being sent right now. Computed at send time from the live health of the other channels, never read from a stored flag. |
email_reason | string<not_muted, muted, alternatives_failing, no_alternative, unreadable> | はい | Why. not_muted - the customer never turned it off. muted - off, as asked, with a healthy alternative. alternatives_failing - back ON because their other channels have… |
healthy_alternatives | integer | いいえ | How many non-e-mail destinations this site routes to are delivering. |
overriding_choice | boolean | いいえ | True when e-mail is being sent DESPITE the customer having muted it. This is the state a screen must explain, or the toggle appears broken. |