प्रमाणीकरण

एपिआई कुञ्जीलाई बियरर टोकन (bearer token) को रूपमा पठाउनुहोस्। यो इन्डपोइन्टले विशिष्ट अनुमति खुलाएको छैन, त्यसैले अनुमान गर्नुको सट्टा आफ्नो कुञ्जीलाई आवश्यक पर्ने न्यूनतम अधिकार दिनुहोस् र प्रतिक्रिया जाँच गर्नुहोस्।

यो इन्डपोइन्टले कुनै संस्थाको आइडी लिँदैन। तपाईंको कुञ्जीले यस अन्तर्गत पर्ने संस्थालाई पहिल्यै पहिचान गर्छ, र प्रतिक्रिया त्यसैमा सीमित हुन्छ।

प्रयास गर्नुहोस्

कोणीय कोष्ठकभित्र भएका जुनसुकै कुरालाई आफ्नो मानहरूद्वारा बदल्नुहोस्, र मुख्य स्थानहोल्डरलाई तपाईंको ड्यासबोर्डको कुञ्जीद्वारा बदल्नुहोस्।

curl -X PUT https://api.zinndigital.com/v1/sites/{siteId}/cms-target \
  -H "Authorization: Bearer zdk_live_…" \
  -H "Content-Type: application/json" \
  -d '{ "kind": <string<wordpress, headless_rest, git_static>> }'

लगइन गर्नुभएको छ? तपाईंको ड्यासबोर्डमा रहेको API कन्सोलले तपाईंको वास्तविक संस्थाको आईडी र आफ्नै कुञ्जी भरिदिन्छ, र लाइभ API विरुद्ध अनुरोध चलाउँछ ताकि तपाईंले वास्तविक प्रतिक्रिया हेर्न सक्नुहोस्। यो एन्डपोइन्टलाई API कन्सोलमा खोल्नुहोस्

विवरणहरू

Creates or replaces the site's content target. Gated on links.edit. ⛔ secret is write-only, and omitting it keeps the credential you already have rather than clearing it — a customer editing a collection name must not silently delete their key. The secret is written to Vault before the row is saved, and the row is only written if that succeeded: the other order leaves a row that reads as configured on every screen and fails at the first publish.

प्यारामिटरहरू

नामप्रकारआवश्यकयो के हो
siteId (path)stringहुन्छ

अनुरोध बडी

नामप्रकारआवश्यकयो के हो
kindstring<wordpress, headless_rest, git_static>हुन्छ
presetstring<, payload, strapi, directus, ghost, shopify, webflow, custom>हैन
base_urlstringहैन
collectionstringहैन
auth_schemestring<, bearer, payload_api_key, ghost_admin_jwt, shopify_token, header>हैन
auth_headerstringहैन
field_mapobjectहैन
enabledbooleanहैन
secretstringहैनThe API key. ⛔ Write-only, and omitting it keeps the credential you already have rather than clearing it. It is written to Vault before the row is saved, and the row is only…

प्रतिक्रिया

नामप्रकारआवश्यकयो के हो
site_idstringहुन्छ
kindstring<, wordpress, headless_rest, git_static>हुन्छEmpty when nothing claims this site. For a site with no configured row this is the derived target — most WordPress sites on our own fleet need no configuration at all, because…
presetstring<, payload, strapi, directus, ghost, shopify, webflow, custom>हुन्छ
base_urlstringहुन्छThe CMS's API root. Empty for a target whose address is derived from the site (fleet WordPress, a connected Git repository).
collectionstringहुन्छThe collection posts are created in — posts on Payload, a blog id on Shopify, a collection id on Webflow, the content directory on a Git target.
auth_schemestring<, bearer, payload_api_key, ghost_admin_jwt, shopify_token, header>हुन्छ
auth_headerstringहुन्छFor the header auth scheme — which header the key is sent in.
field_mapobjectहुन्छRenames, for a destination that spells our fields differently. ⛔ It renames; it never adds a capability. A field map cannot make a target able to carry a tag it has no field…
enabledbooleanहुन्छA disabled target is skipped and reads as needs_setup — kept rather than deleted so pausing publishing to a site does not lose its set-up.
has_credentialbooleanहुन्छ
capabilitiesstring[]हुन्छ
detected_identitystringहुन्छWhat the destination said it was, last time it answered.
last_probe_atstringहुन्छ
last_probe_reachablebooleanहुन्छnull means never probed; false means probed and could not be reached. Those are different facts and a client must not render them the same.
last_probe_codestringहुन्छ
last_probe_detailstringहुन्छ

यो इन्डपोइन्टले फर्काउन सक्ने त्रुटिहरू

401 · 403 · 404 · 422