hosting

GET /v1/sites/export

Download the sites in scope as a CSV.

تمام hosting اینڈ پوائنٹس

توثيقِ شناخت

ایک API کلید بطور بیر ٹوکن (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