hosting

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

Clear a site's server-side cache.

Всички крайни точки в hosting

Всички документи за разработчици

Упълномощаване

Изпратете API ключ като носител (bearer token). Тази точка за достъп не указва конкретно разрешение в спецификацията, затова дайте на ключа си най-малкото необходимо и проверете отговора, вместо да правите предположения.

Този ендпойнт не изисква идентификатор на организация. Вашият ключ вече идентифицира организацията, към която принадлежи, и отговорът е ограничен до нея.

Опитайте

Заменете всичко в квадратни скоби със собствени стойности, а ключовия заместващ символ – с ключ от вашето табло за управление.

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, за да можете да видите действителния отговор. Отворете този крайpoint в 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.

Грешки, които този крайpoint може да върне

401 · 403 · 404 · 422 · 429 · 503