connections
POST /v1/waap/domains/{domainId}/mode
Switch a protected domain between monitor, block and off.
Tabbatar da Asali
Aiko da maɓallin API a matsayin bearer token. Wannan ma'anar ba ta bayyana takamaiman izini ba a cikin ƙayyadaddun bayanai, don haka ba wa maɓallin ku mafi ƙarancin abin da yake buƙata kuma ku bincika amsar maimakon yin zato.
Wannan wurin ƙarewa ba ya buƙatar ID na ƙungiya. Maɓallin ku ya riga ya gano ƙungiyar da yake ciki, kuma an iyakance amsa a kanta.
Gwada
May gurbin komai da ke cikin kusurwa da ƙimar ka, kuma may gurbin maballi da maballi daga allon sarrafa ka.
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>> }'An shiga? Na'urar sarrafa API da ke cikin sashin kulawarka tana cika ainihin lambar ƙungiyarka da maɓallinka naka, sannan tana gudanar da buƙatar a kan ainihin API don haka zaka iya ganin amsar gaske. Buɗe wannan tashar a cikin na'urar kula da API
Bayani
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.
Sigogi
| Suna | Nau'i | Ana buƙata | Abin da yake |
|---|---|---|---|
domainId (path) | string | Eh | The provider's id for the protected domain. |
Jikin buƙata
| Suna | Nau'i | Ana buƙata | Abin da yake |
|---|---|---|---|
mode | string<monitor, block, off> | Eh | ⛔ `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. |
Martani
| Suna | Nau'i | Ana buƙata | Abin da yake |
|---|---|---|---|
id | string | Eh | — |
domain | string | Eh | — |
mode | string<monitor, block, off, locked> | Eh | ⛔⛔ `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 | A'a | — |
total_requests | integer | A'a | ⛔ `null` when the provider does not report it — never `0`. |
blocked_requests | integer | A'a | ⛔ `null` when unknown. "Nothing was blocked" and "we cannot see what was blocked" are opposite answers and must not render alike. |
Kuskuren da wannan matsaya za ta iya maido wa
401 · 422 · 429