links
POST /v1/content/external-sites
Connect a WordPress site we do not host, with an application password.
אימות
שלח מפתח API כטוקן Bearer. נקודת קצה זו אינה מציינת הרשאת ספציפית במפרט, לכן הקצה למפתח שלך את המינימום הנדרש ובדוק את התגובה במקום להניח הנחות.
המקום שבו מזהה הארגון שלך נכנס
נקודת קצה זו מקבלת את org_id כפרמטר שאילתת חיפוש. השאר אותו ריק והקריאה תכסה את כל תת-עץ הדיירות שלך; שלח אותו כדי לצמצם את הקריאה לארגון אחד.
מזהה הארגון שלך נמצא במסוף מפתחות ה-API בלוח הבקרה שלך, לצד המפתח עצמו. זהו אותו מזהה בכל קריאה שאתה מבצע.
נסה זאת
החלף כל דבר בסוגריים זוויתיים בערכים משלך, ואת מציין מיקום המפתח במפתח מלוח הבקרה שלך.
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 | לא | — |
backup | object | כן | Whether we can back this site up, and whether we can put it back. Served on the list so a screen showing a customer's whole external estate makes one request rather than one per… |
שגיאות שנקודה קצה זו עשויה להחזיר
401 · 403 · 422