connections
POST /v1/waap/domains/{domainId}/mode
Switch a protected domain between monitor, block and off.
प्रमाणीकरण
बेअरर टोकन म्हणून API की पाठवा. या एंडपॉईंटने स्पष्टीकरणामध्ये ठराविक परवानगी नमूद केलेली नाही, त्यामुळे तुमच्या कीला आवश्यक तेवढाच कमीत कमी ॲक्सेस द्या आणि गृहीत धरण्याऐवजी प्रतिसाद तपासा.
या एंडपॉइंटला कोणतीही संस्था आयडी (organisation id) लागत नाही. तुमची की (key) आधीच ती कोणत्या संस्थेशी संबंधित आहे हे ओळखते आणि प्रतिसाद त्यानुसार मर्यादित केला जातो.
प्रयत्न करा
कोनसांस्कृतिक कंसात (<>) असलेली कोणतीही गोष्ट तुमच्या स्वतःच्या मूल्यांनी बदला आणि key प्लेसहोल्डरला तुमच्या डॅशबोर्डवरील किने बदला.
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 विरुद्ध विनंती कार्यान्वित करतो जेणेकरून तुम्हाला वास्तविक प्रतिसाद पाहता येईल. एपी कन्सोलमध्ये हा एंडपॉइंट उघडा
तपशील
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. |
विनंती मुख्य भाग
| नाव | प्रकार | आवश्यक | हे काय आहे |
|---|---|---|---|
mode | string<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. |
प्रतिसाद
| नाव | प्रकार | आवश्यक | हे काय आहे |
|---|---|---|---|
id | string | होय | — |
domain | string | होय | — |
mode | string<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_at | string | नाही | — |
total_requests | integer | नाही | ⛔ `null` when the provider does not report it — never `0`. |
blocked_requests | integer | नाही | ⛔ `null` when unknown. "Nothing was blocked" and "we cannot see what was blocked" are opposite answers and must not render alike. |
ही एंडपॉइंट परत करू शकेल अशा त्रुटी
401 · 422 · 429