links
POST /v1/content/external-sites
Connect a WordPress site we do not host, with an application password.
การยืนยันตัวตน
ส่ง API key เป็น bearer token เอนด์พอยต์นี้ไม่ได้ระบุสิทธิ์การใช้งานเฉพาะในข้อกำหนด ดังนั้นควรให้คีย์ของคุณมีสิทธิ์น้อยที่สุดเท่าที่จำเป็นและให้ตรวจสอบจากการตอบกลับแทนที่จะคาดเดา
ตำแหน่งสำหรับใส่รหัสองค์กรของคุณ
พอยต์ข้อมูลนี้รับ 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 | ไม่ใช่ | — |
ข้อผิดพลาดที่เอนด์พอยต์นี้สามารถส่งกลับได้
401 · 403 · 422