connections

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

Switch a protected domain between monitor, block and off.

ყველა connections ენდპოინტი

ყველა დეველოპერის დოკუმენტაცია

ავტორიზაცია

API გასაღები გაგზავნეთ როგორც bearer token. ეს ენდპოინტი სპეციფიკაციაში არ მიუთითებს კონკრეტულ ნებართვას, ამიტომ მიანიჭეთ თქვენს გასაღებს მინიმალური საჭირო უფლებები და ვარაუდის ნაცვლად შეამოწმეთ პასუხი.

ეს ბოლო წერტილი არ იღებს ორგანიზაციის იდენტიფიკატორს. თქვენი გასაღები უკვე აიდენტიფიცირებს იმ ორგანიზაციას, რომელსაც ის ეკუთვნის, და პასუხი შემოფარგლულია მისით.

სცადეთ

შეSubstituted any value inside angle brackets with your own and the key placeholder with a key from your dashboard.

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 კონსოლი ავტომატურად ამატებს თქვენი რეალური ორგანიზაციის ID-სა და საკუთარ გასაღებს და ატარებს მოთხოვნას ცოცხალ API-ს წინააღმდეგ, რათა იხილოთ რეალური პასუხი. გაAღით ეს ენდპოინტი 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