links
POST /v1/content/external-sites
Connect a WordPress site we do not host, with an application password.
Doğrulama
API açarını bearer token kimi göndərin. Bu səhifə spresifikasiyada xüsusi icazə tələb etmir, buna görə də açarınıza ehtiyac duyduğu minimum səviyyədə icazə verin və güman etmək əvəzinə cavabı yoxlayın.
Təşkilatınızın identifikatorunun yerləşdiyi yer
Bu son nöqtə sorğu parametri kimi org_id qəbul edir. Onu buraxın və sorğu bütün kirayə alt ağacınızı əhatə etsin; sorğunu bir təşkilatla məhdudlaşdırmaq üçün onu göndərin.
Təşkilatınızın identifikatoru idarə panelinizdəki API açarları ekranında, açarın özünün yanında yerləşir. Bu, etdiyiniz hər bir sorğuda eyni identifikatordur.
Sınaqdan keçir
Bucaqlı mötərizələrdə olan hór şeyi öz qiymətlərinizlə, açar yertutucusunu isə idarə panelinizdən bir açarla əvəz edin.
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> }'Sistemə daxil olmusunuz? İdarə panelinizdəki API konsolu real təşkilatınızın identifikatorunu və öz açarınızı avtomatik doldurur, sorğunu canlı API-yə qarşı icra edir ki, siz faktiki cavabı görə biləsiniz. Bu son nöqtəni API konsolunda açın
Təfərrüatlar
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.
Parametrlər
| Ad | Tip | Tələb olunur | Nədir |
|---|---|---|---|
org_id (query) | string | Xeyr | — |
Sorğu gövdəsi
| Ad | Tip | Tələb olunur | Nədir |
|---|---|---|---|
url | string | Bəli | The site's address, e.g. `https://example.com` or `https://example.com/blog`. |
username | string | Bəli | — |
application_password | string | Bəli | The application password WordPress generated. Spaces are ignored, so it may be pasted exactly as displayed. |
name | string | Xeyr | — |
Cavab
| Ad | Tip | Tələb olunur | Nədir |
|---|---|---|---|
site_id | string | Bəli | — |
primary_domain | string | Bəli | — |
name | string | Bəli | — |
is_external | boolean | Bəli | Always true here. The same site appears in `/v1/sites` badged External. |
base_url | string | Bəli | The address we publish to, including any path (e.g. `https://example.com/blog`). |
reachable | boolean | Xeyr | 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 | Xeyr | — |
detail | string | Xeyr | What the site said last time, verbatim. Shown on the site's own screen. |
detected_identity | string | Xeyr | — |
Bu son nöqtənin qaytara biləcəyi xətalar
401 · 403 · 422