hosting
GET /v1/wordpress/sites
List every WordPress site the caller owns, across all product lines.
احراز هویت
یک کلید API را به عنوان یک توکن حامل ارسال کنید. این کلید باید دارای مجوز sites.view باشد؛ کلیدی که فاقد آن باشد با خطای 403 رد میشود، نه 404.
جایی که شناسه سازمان شما قرار میگیرد
این نقطه پایانی org_id را به عنوان یک پارامتر پرسوجو میپذیرد. آن را رها کنید تا فراخوانی کل زیردرخت اجارهای شما را پوشش دهد؛ آن را ارسال کنید تا فراخوانی به یک سازمان محدود شود.
شناسه سازمان شما در صفحه کلیدهای API در داشبوردتان، در کنار خود کلید قرار دارد. این شناسه در تمام درخواستهایی که ارسال میکنید یکسان است.
امتحان کنید
هر چیزی را که داخل براکتهای زاویهدار قرار دارد با مقادیر خودتان جایگزین کنید، و نگهدارنده کلید را با کلیدی از داشبورد خود جایگزین نمایید.
curl -X GET https://api.zinndigital.com/v1/wordpress/sites \
-H "Authorization: Bearer zdk_live_…"وارد شدهاید؟ کنسول API در داشبورد شما شناسه سازمان واقعی و کلید خودتان را پر میکند و درخواست را روی 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 precede… |
پاسخ
| نام | نوع | الزامی | چیست |
|---|---|---|---|
data | WordPressFleetSite[] | بله | — |
page | PageMeta | بله | — |
خطاهایی که این نقطه پایانی میتواند برگرداند
401 · 403 · 422 · 429