hosting

POST /v1/sites/{siteId}/cache/purge

Clear a site's server-side cache.

همه نقاط پایانی hosting

احراز هویت

یک کلید API را به عنوان یک توکن برbearer ارسال کنید. این نقطه پایانی مجوز خاصی را در مشخصات خود ذکر نمی‌کند، بنابراین به جای فرض کردن، حداقل نیازهای کلید خود را بدهید و پاسخ را بررسی کنید.

این نقطه پایانی هیچ شناسه سازمانی را دریافت نمی‌کند. کلید شما در حال حاضر سازمان مربوطه را مشخص می‌کند و پاسخ در همان محدوده ارائه می‌شود.

امتحان کنید

هر چیزی را که داخل براکت‌های زاویه‌دار قرار دارد با مقادیر خودتان جایگزین کنید، و نگهدارنده کلید را با کلیدی از داشبورد خود جایگزین نمایید.

curl -X POST https://api.zinndigital.com/v1/sites/{siteId}/cache/purge \
  -H "Authorization: Bearer zdk_live_…" \
  -H "Content-Type: application/json" \
  -d '{  }'

وارد شده‌اید؟ کنسول API در داشبورد شما شناسه سازمان واقعی و کلید خودتان را پر می‌کند و درخواست را روی API زنده اجرا می‌کند تا بتوانید پاسخ واقعی را ببینید. این نقطه پایانی را در کنسول API باز کنید

جزئیات

Drops what the hosting platform has cached for the site — everything, or one path. `202` and no body rather than `200`: the platform acknowledges the purge and the edge drops the object afterwards, so claiming "done" would be a promise about a moment we never observed. The client re-reads the cache resource, whose cacheability report is stale the instant a purge lands. ⛔ Gated on `sites.cache.purge`, which this platform already minted for exactly this, and deliberately **not** on `sites.panel_access`: clearing a cache destroys nothing, *"my change isn't showing"* is the most common thing a customer or a support agent needs to do, and softer is correct here. `sites.view` is required alongside it, as everywhere on this surface. `404` for a site with no vendor hosting package, or one that is not the caller's; `422` when the package type does not permit a purge.

پارامترها

نامنوعالزامیچیست
siteId (path)UuidبلهSite ID (UUIDv7).

بدنه درخواست

نامنوعالزامیچیست
pathstringخیرOne path to drop, relative to the site root. Omit it, or send `""`, to clear the whole cache.

خطاهایی که این نقطه پایانی می‌تواند برگرداند

401 · 403 · 404 · 422 · 429 · 503