hosting
GET /v1/sites/export
Download the sites in scope as a CSV.
การยืนยันตัวตน
ส่ง API key เป็น bearer token เอนด์พอยต์นี้ไม่ได้ระบุสิทธิ์การใช้งานเฉพาะในข้อกำหนด ดังนั้นควรให้คีย์ของคุณมีสิทธิ์น้อยที่สุดเท่าที่จำเป็นและให้ตรวจสอบจากการตอบกลับแทนที่จะคาดเดา
ตำแหน่งสำหรับใส่รหัสองค์กรของคุณ
พอยต์ข้อมูลนี้รับ org_id เป็นพารามิเตอร์คิวรี หากเว้นว่างไว้ การเรียกใช้งานจะครอบคลุมย่อยของเทแนนท์ทั้งหมดของคุณ แต่หากระบุค่า จะช่วยจำกัดขอบเขตการเรียกให้เหลือเพียงองค์กรเดียว
รหัสองค์กรของคุณจะแสดงอยู่บนหน้าคีย์ API ในแดชบอร์ดของคุณ โดยอยู่ถัดจากคีย์นั้นๆ รหัสนี้จะเป็นรหัสเดิมในการเรียกใช้งานทุกครั้งของคุณ
ทดลองใช้เลย
แทนที่สิ่งใดๆ ที่อยู่ภายในวงเล็บแหลมด้วยค่าของคุณเอง และตัวยึดตำแหน่งคีย์ด้วยคีย์จากแดชบอร์ดของคุณ
curl -X GET https://api.zinndigital.com/v1/sites/export \
-H "Authorization: Bearer zdk_live_…"เข้าสู่ระบบแล้วใช่ไหม คอนโซล API ในแดชบอร์ดของคุณจะเติมรหัสองค์กรจริงและคีย์ของคุณเองโดยอัตโนมัติ และทำการส่งคำขอไปยัง API จริง เพื่อให้คุณเห็นผลลัพธ์ที่เป็นข้อมูลจริง เปิดจุดสิ้นสุดนี้ในคอนโซล API
รายละเอียด
The same sites listSites would return for the same query, as a streamed text/csv attachment — V1 parity (deploy.views.SiteExport, "Choose sites → Export to CSV"), recorded as unported in docs/35 §0.3c until W29-U. ⛔⛔ Server-side over the WHOLE matching set, and that is the point of it existing as an endpoint at all. listSites is cursor-paginated, so a CSV assembled in the browser would contain one page and would look exactly like a complete file — no error, no truncation marker, and nothing a customer could use to tell the difference. There is deliberately no limit: a bound here would silently exclude rows and nothing downstream would ever pick up the remainder. ⛔ It shares the list's filter chain rather than reproducing it, so "export" means "export what I am looking at" by construction. Every filter below behaves exactly as it does on listSites, including narrowing to nothing — rather than 403-ing — for an org_id outside the caller's scope. ⛔⛔ It requires Authorization, so it cannot be fetched with a plain <a href>. A browser anchor navigation sends no bearer token and the engine has no cookie authentication to fall back on, so an anchor answers 401 and the customer sees nothing happen. Download it with an authenticated fetch and hand the result to the browser as a blob. This is not hypothetical: the estate shipped three staff download buttons built as anchors and every one of them was dead (docs/72 D14200). The header row is English and is not localized: the consumer is a spreadsheet or a script, and a header that changed with the viewer's locale would make one customer's file unreadable by another's tooling. Column order is part of the contract — new columns are appended, never inserted.
พารามิเตอร์
| ชื่อ | ประเภท | จำเป็นต้องมี | ลักษณะของสิ่งนี้ |
|---|---|---|---|
org_id (query) | Uuid | ไม่ใช่ | Restrict to one organization in the caller's scope. |
status (query) | SiteStatus | ไม่ใช่ | Filter by site lifecycle status. |
product_line (query) | string | ไม่ใช่ | Filter by product line code. |
group (query) | string | ไม่ใช่ | Restrict to the sites in one site group. |
search (query) | string | ไม่ใช่ | Case-insensitive substring match on the primary domain or the name, applied in the database across the whole collection in scope. |
ข้อผิดพลาดที่เอนด์พอยต์นี้สามารถส่งกลับได้
401 · 403