hosting
GET /v1/wordpress/sites
List every WordPress site the caller owns, across all product lines.
Authenticatie
Stuur een API-sleutel mee als bearer token. De sleutel moet over de permissie sites.view beschikken; een sleutel zonder deze permissie wordt geweigerd met een 403 in plaats van een 404.
Waar je organisatie-id komt te staan
Dit eindpunt accepteert org_id als queryparameter. Laat deze achterwege en de aanroep destilleert je gehele tenant-substructie; stuur deze mee om de aanroep te beperken tot één organisatie.
Uw organisatie-id staat op het scherm met API-sleutels in uw dashboard, naast de sleutel zelf. Dit is in elke aanroep die u doet dezelfde id.
Probeer het
Vervang alles tussen punthaakjes door uw eigen waarden en de sleutelplaatsvervanger door een sleutel uit uw dashboard.
curl -X GET https://api.zinndigital.com/v1/wordpress/sites \
-H "Authorization: Bearer zdk_live_…"Ingelogd? De API-console in je dashboard vult je echte organisatie-id en je eigen sleutel in, en voert het verzoek uit tegen de live API zodat je de daadwerkelijke respons kunt zien. Open dit eindpunt in de API-console
Details
The fleet manager's list: every `wordpress` or `woocommerce` site in the caller's tenancy subtree, on every product line and every deploy target (own fleet, managed shared, managed cloud, CloudLinux), with each one's stored WordPress posture. ⛔ **This endpoint never calls a vendor**, however stale a row is. Collecting is `refreshWordPressSite`, an explicit act; a row that has never been collected reports `update_state: unknown` with a null `snapshot`, and the client renders that as *"not checked yet"* — **never** as "up to date". Those are different sentences and a customer acts differently on each. `update_state` and `needs_attention` are applied **after** pagination, because the state is derived from four snapshot columns with an explicit precedence and re-expressing that precedence in SQL would give this list and `getWordPressFleetOverview` two implementations of one rule. A filtered page can therefore be short; the totals come from the overview, which counts everything. Requires `sites.view`.
Parameters
| Naam | Type | Verplicht | Wat dit is |
|---|---|---|---|
cursor (query) | string | Nee | Opaque cursor from a previous page's `page.next_cursor`. |
limit (query) | integer | Nee | Maximum items to return (page size). |
org_id (query) | string | Nee | Narrow to one organisation in the caller's subtree. Equivalent to the `X-Zinn-Org` header, which is now read centrally for every org-scoped operation — this parameter wins where… |
q (query) | string | Nee | Substring match on the primary domain. |
product_line (query) | string | Nee | — |
deploy_target (query) | string | Nee | — |
update_state (query) | WordPressUpdateState | Nee | `422` on an unrecognised value rather than silently returning everything — a filter that quietly does nothing is how a customer concludes their estate is clean. |
needs_attention (query) | boolean | Nee | Only sites with a core or component update waiting, no WordPress installed, or a homepage that is not answering. |
health (query) | string<, healthy, unhealthy> | Nee | Filter by the stored health verdict. ⭐ Applied **in the database**, unlike `update_state` — `health_status` is one indexed column written by one function, so there is no precede… |
Reactie
| Naam | Type | Verplicht | Wat dit is |
|---|---|---|---|
data | WordPressFleetSite[] | Ja | — |
page | PageMeta | Ja | — |
Fouten die dit eindpunt kan retourneren
401 · 403 · 422 · 429