hosting

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

Clear a site's server-side cache.

Све hosting крајње тачке

Сва документација за програмере →

Аутентификација

Пошаљите API кључ као bearer токен. Ова крајња тачка не наводи конкретну дозволу у спецификацији, па свом кључу доделите најмања неопходна овлашћења и проверите одговор уместо да претпостављате.

Ова крајња тачка не прихвата id организације. Ваш кључ већ идентификује организацију којој припада, а одговор је ограничен на њу.

Испробајте

Замените све што је у угластим заградама сопственим вредностима, а чувар места кључа кључем са своје контролне табле.

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

Пријављени сте? API конзола на вашој контролној табли попуњава ваш прави id организације и ваш сопствени кључ, и покреће захтев према живом 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