links
POST /v1/content/external-sites
Connect a WordPress site we do not host, with an application password.
تصدیقهویت
د بیارر ټوکن په توګه یو API کي وسپارئ. دا پای ټکی په مشخصاتو کې کوم ځانګړی اجازه لیک نه بیانوي، نو خپل کیلي ته لږترلږه هغه څه ورکړئ چې ورته اړتیا لري او د فرض کولو پر ځای ځواب وپلټئ.
چیرته چې ستاسو د سازمان آی ډي ځي
دا پای ټکی د پوښتنې پیرامیتر په توګه 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 کنسول ستاسو د اصلي سازمان ID او ستاسو خپله کیلي ډکوي، او غوښتنه د ژوندی API په وړاندې پرمخ وړي ترڅو تاسو وکولی شئ اصلي ځواب وګورئ. دا پای ټکی (endpoint) د 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