connections

POST /v1/waap/domains/{domainId}/mode

Switch a protected domain between monitor, block and off.

Sve connections krajnje tačke

Autentifikacija

Pošaljite API ključ kao bearer token. Ova krajnja tačka ne navodi specifičnu dozvolu u specifikaciji, zato dodelite svom ključu minimum potrebnih ovlašćenja i proverite odgovor umesto da pretpostavljate.

Ovaj krajnji tačka ne prihvata ID organizacije. Vaš ključ već identifikuje organizaciju kojoj pripada, a odgovor je ograničen na nju.

Isprobajte

Zamenite bilo šta u uglastim zagradama sopstvenim vrednostima, a ključni placeholder sa ključem sa vaše kontrolne table.

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>> }'

Prijavljeni ste? API konzola na vašoj kontrolnoj tabli automatski popunjava ID vaše stvarne organizacije i vaš sopstveni ključ, i izvršava zahtev nad API-jem uživo tako da možete videti stvarni odgovor. Otvorite ovu krajnju tačku u API konzoli

Detalji

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.

Parametri

NazivVrstaObaveznoŠta je ovo
domainId (path)stringDaThe provider's id for the protected domain.

Telo zahteva

NazivVrstaObaveznoŠta je ovo
modestring<monitor, block, off>Da⛔ `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.

Odgovor

NazivVrstaObaveznoŠta je ovo
idstringDa
domainstringDa
modestring<monitor, block, off, locked>Da⛔⛔ `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_atstringNe
total_requestsintegerNe⛔ `null` when the provider does not report it — never `0`.
blocked_requestsintegerNe⛔ `null` when unknown. "Nothing was blocked" and "we cannot see what was blocked" are opposite answers and must not render alike.

Greške koje ovaj krajnji tačka može da vrati

401 · 422 · 429