connections

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

Switch a protected domain between monitor, block and off.

Semua titik akhir connections

Autentikasi

Kirimkan kunci API sebagai token bearer. Titik akhir ini tidak menyatakan izin tertentu dalam spesifikasi, jadi berikan kunci Anda izin minimum yang diperlukan dan periksa responsnya alih-alih berasumsi.

Endpoint ini tidak memerlukan id organisasi. Kunci Anda telah mengidentifikasi organisasi tempatnya berafiliasi, dan respons akan dibatasi untuk organisasi tersebut.

Coba

Ganti apa pun di dalam tanda kurung sudut dengan nilai Anda sendiri, dan placeholder kunci dengan kunci dari dasbor Anda.

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

Sudah masuk? Konsol API di dasbor Anda akan mengisi ID organisasi asli dan kunci Anda sendiri, serta menjalankan permintaan terhadap API langsung sehingga Anda dapat melihat respons aktualnya. Buka titik akhir ini di konsol API

Detail

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.

Parameter

NamaJenisWajibTentang apa ini
domainId (path)stringYaThe provider's id for the protected domain.

Isi permintaan

NamaJenisWajibTentang apa ini
modestring<monitor, block, off>Ya⛔ `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.

Tanggapan

NamaJenisWajibTentang apa ini
idstringYa
domainstringYa
modestring<monitor, block, off, locked>Ya⛔⛔ `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_atstringTidak
total_requestsintegerTidak⛔ `null` when the provider does not report it — never `0`.
blocked_requestsintegerTidak⛔ `null` when unknown. "Nothing was blocked" and "we cannot see what was blocked" are opposite answers and must not render alike.

Kesalahan yang dapat dikembalikan oleh titik akhir ini

401 · 422 · 429