connections

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

Switch a protected domain between monitor, block and off.

Vituo vyote vya connections

Uthibitishaji

Tuma ufunguo wa API kama tokeni ya kubeba. Sehemu hii ya mwisho haitaji ruhusa maalum katika maelezo, kwa hivyo ipe ufunguo wako kiwango cha chini kabisa kinachohitajika na uangalie jibu badala ya kukisia.

Endpoint hii haichukui kitambulisho cha shirika. Ufunguo wako tayari unalitambua shirika linalohusika, na jibu limewekewa kikomo kwa shirika hilo pekee.

Jaribu

Badilisha chochote kilicho ndani ya mabano ya pembe na maadili yako mwenyewe, na kishikiliaji cha ufunguo na ufunguo kutoka kwa dashibodi yako.

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

Umeingia kwenye akaunti? Dashibodi yako ya kiweko cha API inajaza kitambulisho chako halisi cha shirika na ufunguo wako mwenyewe, na kuendesha ombi dhidi ya API ya moja kwa moja ili uweze kuona jibu halisi. Fungua sehemu hii ya mwisho (endpoint) kwenye konsole ya API

Maelezo

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.

Vigezo

JinaAinaInayohitajikaKilicho hiki
domainId (path)stringNdiyoThe provider's id for the protected domain.

Mwili wa ombi

JinaAinaInayohitajikaKilicho hiki
modestring<monitor, block, off>Ndiyo⛔ `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.

Majibu

JinaAinaInayohitajikaKilicho hiki
idstringNdiyo
domainstringNdiyo
modestring<monitor, block, off, locked>Ndiyo⛔⛔ `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_atstringHapana
total_requestsintegerHapana⛔ `null` when the provider does not report it — never `0`.
blocked_requestsintegerHapana⛔ `null` when unknown. "Nothing was blocked" and "we cannot see what was blocked" are opposite answers and must not render alike.

Hitilafu ambazo mwisho huu unaweza kurudisha

401 · 422 · 429