connections

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

Switch a protected domain between monitor, block and off.

همه نقاط پایانی connections

احراز هویت

یک کلید API را به عنوان یک توکن برbearer ارسال کنید. این نقطه پایانی مجوز خاصی را در مشخصات خود ذکر نمی‌کند، بنابراین به جای فرض کردن، حداقل نیازهای کلید خود را بدهید و پاسخ را بررسی کنید.

این نقطه پایانی هیچ شناسه سازمانی را دریافت نمی‌کند. کلید شما در حال حاضر سازمان مربوطه را مشخص می‌کند و پاسخ در همان محدوده ارائه می‌شود.

امتحان کنید

هر چیزی را که داخل براکت‌های زاویه‌دار قرار دارد با مقادیر خودتان جایگزین کنید، و نگهدارنده کلید را با کلیدی از داشبورد خود جایگزین نمایید.

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 زنده اجرا می‌کند تا بتوانید پاسخ واقعی را ببینید. این نقطه پایانی را در کنسول 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.

خطاهایی که این نقطه پایانی می‌تواند برگرداند

401 · 422 · 429