connections
POST /v1/waap/domains/{domainId}/mode
Switch a protected domain between monitor, block and off.
Hitelesítés
Küldjön egy API-kulcsot bearer tokenként. Ez a végpont nem határoz meg konkrét jogosultságot a specifikációban, ezért adja meg a kulcsnak a legkevesebbet, amire szüksége van, és a feltételezés helyett ellenőrizze a választ.
Ez a végpont nem fogad el szervezeti azonosítót. Az Ön kulcsa már azonosítja azt a szervezetet, amelyhez tartozik, és a válasz is erre vonatkozik.
Próbálja ki
Cserélje ki a hegyes zárójelek közötti részt a saját értékeivel, a kulcshelyőrzőt pedig a vezérlőpultján található kulccsal.
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>> }'Be van jelentkezve? A vezérlőpultban lévő API-konzol kitölti a valós szervezetazonosítóját és a saját kulcsát, és a kérést az éles API-n futtatja, hogy láthassa a tényleges választ. Nyissa meg ezt a végpontot az API konzolban
Részletek
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.
Paraméterek
| Név | Típus | Kötelező | Mi ez |
|---|---|---|---|
domainId (path) | string | Igen | The provider's id for the protected domain. |
Kérés törzse
| Név | Típus | Kötelező | Mi ez |
|---|---|---|---|
mode | string<monitor, block, off> | Igen | ⛔ `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. |
Válasz
| Név | Típus | Kötelező | Mi ez |
|---|---|---|---|
id | string | Igen | — |
domain | string | Igen | — |
mode | string<monitor, block, off, locked> | Igen | ⛔⛔ `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 | Nem | — |
total_requests | integer | Nem | ⛔ `null` when the provider does not report it — never `0`. |
blocked_requests | integer | Nem | ⛔ `null` when unknown. "Nothing was blocked" and "we cannot see what was blocked" are opposite answers and must not render alike. |
Hibák, amelyeket ez a végpont visszaadhattatlan
401 · 422 · 429