connections
POST /v1/waap/domains/{domainId}/mode
Switch a protected domain between monitor, block and off.
認証
ベアラー トークンとして API キーを送信します。このエンドポイントでは仕様に特定の権限が記載されていないため、キーに必要な最小限の権限を付与し、推測するのではなくレスポンスを確認してください。
このエンドポイントは組織IDを受け付けません。お使いのキーによって所属する組織がすでに特定されており、レスポンスはその組織にスコープされます。
試してみる
アングルブラケット内のすべてをご自身の値に置き換え、キーのプレースホルダーをご利用中のダッシュボードのキーに置き換えてください。
curl -X POST https://api.zinndigital.com/v1/waap/domains/{domainId}/mode \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ "mode": <string<monitor, block, off>> }'ログインしていますか?ダッシュボード内のAPIコンソールでは、実際の組織IDやお客様ご自身のキーが自動入力され、ライブAPIに対してリクエストが実行されるため、実際のレスポンスを確認することができます。 API コンソールでこのエンドポイントを開く
詳細
The one call here that changes whether traffic is refused. ⛔ The response reports the mode the provider says is **now in force**, which is not necessarily the one that was requested: providers apply some transitions asynchronously and refuse others outright. Echoing the request back would leave every screen showing a protection state that was never applied. ⛔ `locked` is rejected with `422`: it is a state the provider assigns, never one that can be requested, and accepting it would build a control that always fails.
パラメータ
| 名前 | タイプ | 必須 | これがその内容です |
|---|---|---|---|
domainId (path) | string | はい | The provider's id for the protected domain. |
リクエスト本文
| 名前 | タイプ | 必須 | これがその内容です |
|---|---|---|---|
mode | string<monitor, block, off> | はい | ⛔ `locked` is absent on purpose: it is a state the provider assigns, never one that can be requested, and the API answers `422` for it. |
返信
| 名前 | タイプ | 必須 | これがその内容です |
|---|---|---|---|
id | string | はい | — |
domain | string | はい | — |
mode | string<monitor, block, off, locked> | はい | ⛔⛔ `monitor` logs every match and **delivers the traffic anyway**. It produces analytics and blocks nothing, and on a dashboard it is indistinguishable from `block` unless this… |
created_at | string | いいえ | — |
total_requests | integer | いいえ | ⛔ `null` when the provider does not report it — never `0`. |
blocked_requests | integer | いいえ | ⛔ `null` when unknown. "Nothing was blocked" and "we cannot see what was blocked" are opposite answers and must not render alike. |
このエンドポイントが返すエラー
401 · 422 · 429