hosting
GET /v1/wordpress/sites
List every WordPress site the caller owns, across all product lines.
Նույնականացում
Ուղարկեք API բանալին որպես bearer token: Բանալին պետք է ունենա sites.view թույլտվությունը. առանց դրա բանալին մերժվում է 403, և ոչ թե 404 կարգավիճակով:
Որտեղ տեղադրվում է ձեր կազմակերպության ID-ն
Այs վերջնակետը ընդունում է org_id-ը որպես հարցման պարամետր: Բաց թողեք այն, և կանչը կընդգրկի ձեր ամբողջ վարձակալության ենթածառը. ուղարկեք այն՝ կանչը մեկ կազմակերպության վրա սահմանափակելու համար:
Ձեր կազմակերպության ID-ն գտնվում է Ձեր ղեկավարման վահանակի API բանալիների էկրանին՝ բուն բանալու կողքին: Այն նույն ID-ն է Ձեր կատարած յուրաքանչյուր հարցման մեջ:
Փորձել
Փոխարինեք անկյունային փակագծերում գտնվող ցանկացած բան ձեր սեփական արժեքներով, և բանալու տեղապահը՝ ձեր վահանակի բանալիով:
curl -X GET https://api.zinndigital.com/v1/wordpress/sites \
-H "Authorization: Bearer zdk_live_…"Մուտք գործե՞լ եք: Ձեր վահանակի API վահանակը լրացնում է ձեր իրական կազմակերպության ID-ն և ձեր սեփական բանալին և գործարկում է հարցումը ուղիղ API-ի դեմ, որպեսզի կարողանաք տեսնել փաստացի պատասխանը: Բացեք այս վերջնակետը API վահանակում
Մանրամասներ
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.
Պարամետրեր
| Անուն | Տեսակ | Պահանջվում է | Ինչ է դա |
|---|---|---|---|
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) | string | Ոչ | 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 | Ոչ | Substring match on the primary domain. |
product_line (query) | string | Ոչ | — |
deploy_target (query) | string | Ոչ | — |
update_state (query) | WordPressUpdateState | Ոչ | 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 | Ոչ | Only sites with a core or component update waiting, no WordPress installed, or a homepage that is not answering. |
health (query) | string<, healthy, unhealthy> | Ոչ | 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… |
Պատասխան
| Անուն | Տեսակ | Պահանջվում է | Ինչ է դա |
|---|---|---|---|
data | WordPressFleetSite[] | Այո | — |
page | PageMeta | Այո | — |
Այս վերջնակետի կողմից վերադարձվող սխալները
401 · 403 · 422 · 429