connections
POST /v1/waap/domains/{domainId}/mode
Switch a protected domain between monitor, block and off.
Autentificare
Trimiteți o cheie API ca token de tip bearer. Acest punct final nu specifică o permisiune anume în specificație, așa că acordați cheii cele mai puține drepturi necesare și verificați răspunsul în loc să faceți presupuneri.
Acest endpoint nu necesită un ID de organizație. Cheia ta identifică deja organizația căreia îi aparține, iar răspunsul este limitat la aceasta.
Încearcă
Înlocuiți tot ce se află între paranteze unghiulare cu propriile valori și substituentul cheie cu o cheie din tabloul de bord.
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>> }'Autentificat? Consola API din panoul de control îți completează ID-ul real al organizației și propria cheie și rulează cererea în API-ul live, astfel încât să poți vedea răspunsul efectiv. Deschideți acest punct final în consola API
Detalii
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
| Nume | Tip | Obligatoriu | Ce este |
|---|---|---|---|
domainId (path) | string | Da | The provider's id for the protected domain. |
Corp cerere
| Nume | Tip | Obligatoriu | Ce este |
|---|---|---|---|
mode | string<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. |
Răspuns
| Nume | Tip | Obligatoriu | Ce este |
|---|---|---|---|
id | string | Da | — |
domain | string | Da | — |
mode | string<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_at | string | Nu | — |
total_requests | integer | Nu | ⛔ `null` when the provider does not report it — never `0`. |
blocked_requests | integer | Nu | ⛔ `null` when unknown. "Nothing was blocked" and "we cannot see what was blocked" are opposite answers and must not render alike. |
Erori pe care le poate returna acest punct final
401 · 422 · 429