Автентифікація
Надішліть ключ API як маркер носія (bearer token). Ця кінцева точка не вказує конкретного дозволу в специфікації, тому надайте своєму ключу мінімально необхідні права та перевірте відповідь, замість того щоб припускати.
Де вказується ідентифікатор вашої організації
Цей ендпоїнт приймає org_id як параметр запиту. Залиште його порожнім, і виклик охопить увесь ваше дерево орендарів; надішліть його, щоб звузити виклик до однієї організації.
Ідентифікатор вашої організації знаходиться на екрані API-ключів у вашій панелі керування, поруч із самим ключем. Це той самий ідентифікатор у кожному вашому запиті.
Спробувати
Замініть усе в кутових дужках власними значеннями, а заповнювач ключа — ключем із вашої панелі керування.
curl -X GET https://api.zinndigital.com/v1/sites \
-H "Authorization: Bearer zdk_live_…"Увійшли в систему? Консоль API у вашій панелі керування автоматично підставляє ваш реальний ідентифікатор організації та ваш власний ключ, а також виконує запит до робочого API, щоб ви могли побачити справжню відповідь. Відкрийте цю кінцеву точку в консолі API
Деталі
Lists the sites the principal can view across its tenancy subtree. Cursor-paginated. RLS guarantees no site outside the principal's subtree is ever returned (CLAUDE.md §2.3). Sites with status `deleted` are **not** listed by default — they are a terminal state with their own endpoint, `GET /v1/sites/deleted`, which also reports how long each one stays recoverable. Pass `status=deleted` explicitly to list them here. Every other status, including `deleting`, is listed as normal.
Параметри
| Назва | Тип | Обов'язкове | Що це таке |
|---|---|---|---|
X-Zinn-Org (header) | string | Ні | **Which organisation this call acts for.** Send a client organisation's id and every org-scoped endpoint answers for that client alone; omit it and the answer covers everything… |
cursor (query) | string | Ні | Opaque cursor from a previous page's `page.next_cursor`. |
limit (query) | integer | Ні | Maximum items to return (page size). |
org_id (query) | Uuid | Ні | Restrict to one organization in scope (default — the whole subtree). |
status (query) | SiteStatus | Ні | Filter by site lifecycle status. Omitted, every status except `deleted` is returned; pass `deleted` to list deleted sites here rather than at `GET /v1/sites/deleted`. |
product_line (query) | string | Ні | Filter by product line code (e.g. `footprint_free`, `mainstream`). |
group (query) | string | Ні | Restrict to the sites in one site group (#2729). A group id belonging to another tenant matches nothing and returns an empty page rather than a 404 — the queryset is already nar… |
search (query) | string | Ні | Case-insensitive substring match on the site's primary domain or its name. Applied in the database across the whole collection in scope — not to the page already fetched — so a… |
ordering (query) | string<domain, -domain, name, -name, status, -status, line, -line, stack, -stack, region, -region, plan, -plan, created, -created, authority, -authority, indexed, -indexed> | Ні | Sort key, optionally `-`-prefixed for descending. Defaults to `-created` (newest first). Sorting is applied across the whole collection and the cursor carries the sort position,… |
Відповідь
| Назва | Тип | Обов'язкове | Що це таке |
|---|---|---|---|
data | Site[] | Так | — |
page | PageMeta | Так | — |
Помилки, які може повертати ця кінцева точка
401 · 403 · 422 · 429