Упълномощаване
Изпратете API ключ като носител (bearer token). Тази точка за достъп не указва конкретно разрешение в спецификацията, затова дайте на ключа си най-малкото необходимо и проверете отговора, вместо да правите предположения.
Където отива идентификаторът на вашата организация
Този ендпойнт приема org_id като параметър на заявката. Оставете го празен и извикването ще обхване цялото ви поддървано дърво; изпратете го, за да ограничите извикването до една организация.
ИД на вашата организация се намира на екрана с API ключове във вашето табло за управление, до самия ключ. Това е същият ИД във всяко заявка, която правите.
Опитайте
Заменете всичко в квадратни скоби със собствени стойности, а ключовия заместващ символ – с ключ от вашето табло за управление.
curl -X GET https://api.zinndigital.com/v1/sites \
-H "Authorization: Bearer zdk_live_…"Влязохте ли в профила си? API конзолата във вашето табло за управление попълва действителното идентификационно число на вашата организация и вашия собствен ключ и изпълнява заявката спрямо реалното API, за да можете да видите действителния отговор. Отворете този крайpoint в 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 | Да | — |
Грешки, които този крайpoint може да върне
401 · 403 · 422 · 429