connections

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

Switch a protected domain between monitor, block and off.

सबै connections इन्डपइन्टहरू

सबै विकासकर्ता कागजातहरू

प्रमाणीकरण

एपिआई कुञ्जीलाई बियरर टोकन (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 विरुद्ध अनुरोध चलाउँछ ताकि तपाईंले वास्तविक प्रतिक्रिया हेर्न सक्नुहोस्। यो एन्डपोइन्टलाई 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