connections

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

Switch a protected domain between monitor, block and off.

Tous les points de terminaison connections

Authentification

Envoyez une clé d'API en tant que jeton du porteur (bearer token). Cet endpoint n'indique pas de permission spécifique dans la spécification, attribuez donc à votre clé le minimum requis et vérifiez la réponse plutôt que de faire des suppositions.

Cet endpoint ne prend aucun identifiant d'organisation. Votre clé identifie déjà l'organisation à laquelle elle appartient, et la réponse y est limitée.

Essayer

Remplacez tout ce qui se trouve entre crochets par vos propres valeurs, et le espace réservé à la clé par une clé de votre tableau 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>> }'

Connecté ? La console d'API de votre tableau de bord saisit votre véritable ID d'organisation ainsi que votre propre clé, et exécute la requête sur l'API de production afin que vous puissiez voir la réponse réelle. Ouvrir ce point de terminaison dans la console API

Détails

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ètres

NomTypeObligatoireQu'est-ce que c'est
domainId (path)stringOuiThe provider's id for the protected domain.

Corps de la requête

NomTypeObligatoireQu'est-ce que c'est
modestring<monitor, block, off>Oui⛔ `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éponse

NomTypeObligatoireQu'est-ce que c'est
idstringOui
domainstringOui
modestring<monitor, block, off, locked>Oui⛔⛔ `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_atstringNon
total_requestsintegerNon⛔ `null` when the provider does not report it — never `0`.
blocked_requestsintegerNon⛔ `null` when unknown. "Nothing was blocked" and "we cannot see what was blocked" are opposite answers and must not render alike.

Erreurs que cet point de terminaison peut renvoyer

401 · 422 · 429