Uwierzytelnianie
Wyślij klucz API jako token bearer. Ten punkt końcowy nie określa konkretnego uprawnienia w specyfikacji, więc nadaj swojemu kluczowi minimum potrzebnych uprawnień i sprawdź odpowiedź zamiast zakładać.
Miejsce na identyfikator organizacji
Ten punkt końcowy przyjmuje org_id jako parametr zapytania. Pomiń go, a wywołanie obejmie całe drzewo dzierżawy; prześlij go, aby ograniczyć wywołanie do jednej organizacji.
Identyfikator Twojej organizacji znajduje się na ekranie kluczy API w Twoim panelu, obok samego klucza. Jest to ten sam identyfikator w każdym wywołaniu, które wykonujesz.
Wypróbuj
Zastąp wszystko w nawiasach ostrych własnymi wartościami, a zastępczy znacznik klucza kluczem ze swojego pulpitu nawigacyjnego.
curl -X GET https://api.zinndigital.com/v1/sites \
-H "Authorization: Bearer zdk_live_…"Zalogowany? Konsola API w Twoim panelu uzupełnia rzeczywiste identyfikator organizacji oraz Twój własny klucz i wykonuje żądanie względem aktywnego API, dzięki czemu możesz zobaczyć rzeczywistą odpowiedź. Otwórz ten punkt końcowy w konsoli API
Szczegóły
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.
Parametry
| Nazwa | Typ | Wymagane | Co to jest |
|---|---|---|---|
X-Zinn-Org (header) | string | Nie | **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 | Nie | Opaque cursor from a previous page's `page.next_cursor`. |
limit (query) | integer | Nie | Maximum items to return (page size). |
org_id (query) | Uuid | Nie | Restrict to one organization in scope (default — the whole subtree). |
status (query) | SiteStatus | Nie | 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 | Nie | Filter by product line code (e.g. `footprint_free`, `mainstream`). |
group (query) | string | Nie | 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 | Nie | 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> | Nie | 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,… |
Odpowiedź
| Nazwa | Typ | Wymagane | Co to jest |
|---|---|---|---|
data | Site[] | Tak | — |
page | PageMeta | Tak | — |
Błędy, które ten punkt końcowy może zwrócić
401 · 403 · 422 · 429