links
POST /v1/content/external-sites
Connect a WordPress site we do not host, with an application password.
प्रमाणीकरण
एपिआई कुञ्जीलाई बियरर टोकन (bearer token) को रूपमा पठाउनुहोस्। यो इन्डपोइन्टले विशिष्ट अनुमति खुलाएको छैन, त्यसैले अनुमान गर्नुको सट्टा आफ्नो कुञ्जीलाई आवश्यक पर्ने न्यूनतम अधिकार दिनुहोस् र प्रतिक्रिया जाँच गर्नुहोस्।
तपाईंको संस्थाको आइडी राख्ने ठाउँ
यो इन्डपोइन्टले org_id लाई क्वेरी प्यारामिटरको रूपमा लिन्छ। यसलाई छुटाउनुभयो भने कलले तपाईंको सम्पूर्ण टेनेन्सी सबट्रीलाई समेट्छ; यसलाई एउटा संस्थामा मात्र सीमित गर्न पठाउनुहोस्।
तपाईंको संस्थाको आइडी (ID) तपाईंको ड्यासबोर्डमा रहेको API कुञ्जीहरू (keys) स्क्रिनमा, कुञ्जीको छेउमा हुन्छ। तपाईंले गर्ने प्रत्येक कलमा यही आइडी प्रयोग हुन्छ।
प्रयास गर्नुहोस्
कोणीय कोष्ठकभित्र भएका जुनसुकै कुरालाई आफ्नो मानहरूद्वारा बदल्नुहोस्, र मुख्य स्थानहोल्डरलाई तपाईंको ड्यासबोर्डको कुञ्जीद्वारा बदल्नुहोस्।
curl -X POST https://api.zinndigital.com/v1/content/external-sites \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ "url": <string>, "username": <string>, "application_password": <string> }'लगइन गर्नुभएको छ? तपाईंको ड्यासबोर्डमा रहेको API कन्सोलले तपाईंको वास्तविक संस्थाको आईडी र आफ्नै कुञ्जी भरिदिन्छ, र लाइभ API विरुद्ध अनुरोध चलाउँछ ताकि तपाईंले वास्तविक प्रतिक्रिया हेर्न सक्नुहोस्। यो एन्डपोइन्टलाई API कन्सोलमा खोल्नुहोस्
विवरणहरू
Gated on `links.edit`. The credential is **verified against the site before anything is stored**: if WordPress refuses it, nothing is created and the error says what to fix. The password goes to Vault; no secret is stored on the row. Generate the application password in that site's WordPress admin under Users → your user → Application Passwords. The user needs to be able to publish posts.
प्यारामिटरहरू
| नाम | प्रकार | आवश्यक | यो के हो |
|---|---|---|---|
org_id (query) | string | हैन | — |
अनुरोध बडी
| नाम | प्रकार | आवश्यक | यो के हो |
|---|---|---|---|
url | string | हुन्छ | The site's address, e.g. `https://example.com` or `https://example.com/blog`. |
username | string | हुन्छ | — |
application_password | string | हुन्छ | The application password WordPress generated. Spaces are ignored, so it may be pasted exactly as displayed. |
name | string | हैन | — |
प्रतिक्रिया
| नाम | प्रकार | आवश्यक | यो के हो |
|---|---|---|---|
site_id | string | हुन्छ | — |
primary_domain | string | हुन्छ | — |
name | string | हुन्छ | — |
is_external | boolean | हुन्छ | Always true here. The same site appears in `/v1/sites` badged External. |
base_url | string | हुन्छ | The address we publish to, including any path (e.g. `https://example.com/blog`). |
reachable | boolean | हैन | What the last check found. **`null` means we have not checked**, which is not the same as "it does not work" — an unchecked site is never rendered as broken. |
checked_at | string | हैन | — |
detail | string | हैन | What the site said last time, verbatim. Shown on the site's own screen. |
detected_identity | string | हैन | — |
यो इन्डपोइन्टले फर्काउन सक्ने त्रुटिहरू
401 · 403 · 422