connections

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

Switch a protected domain between monitor, block and off.

Всички крайни точки в connections

Упълномощаване

Изпратете API ключ като носител (bearer token). Тази точка за достъп не указва конкретно разрешение в спецификацията, затова дайте на ключа си най-малкото необходимо и проверете отговора, вместо да правите предположения.

Този ендпойнт не изисква идентификатор на организация. Вашият ключ вече идентифицира организацията, към която принадлежи, и отговорът е ограничен до нея.

Опитайте

Заменете всичко в квадратни скоби със собствени стойности, а ключовия заместващ символ – с ключ от вашето табло за управление.

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

Влязохте ли в профила си? API конзолата във вашето табло за управление попълва действителното идентификационно число на вашата организация и вашия собствен ключ и изпълнява заявката спрямо реалното API, за да можете да видите действителния отговор. Отворете този крайpoint в API конзолата

Детайли

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.

Параметри

ИмеТипЗадължителноКакво представлява
domainId (path)stringДаThe provider's id for the protected domain.

Тяло на заявката

ИмеТипЗадължителноКакво представлява
modestring<monitor, block, off>Да⛔ `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.

Отговор

ИмеТипЗадължителноКакво представлява
idstringДа
domainstringДа
modestring<monitor, block, off, locked>Да⛔⛔ `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_atstringНе
total_requestsintegerНе⛔ `null` when the provider does not report it — never `0`.
blocked_requestsintegerНе⛔ `null` when unknown. "Nothing was blocked" and "we cannot see what was blocked" are opposite answers and must not render alike.

Грешки, които този крайpoint може да върне

401 · 422 · 429