인증
Bearer 토큰으로 API 키를 전송하세요. 키는 반드시 sites.view 권한을 가지고 있어야 하며, 권한이 없는 키는 404가 아닌 403으로 거부됩니다.
이 엔드포인트는 조직 ID를 받지 않습니다. 사용자의 키가 이미 속한 조직을 식별하며, 응답은 해당 조직으로 한정됩니다.
무료 체험하기
대괄호 안에 있는 모든 내용을 사용자 지정 값으로 바꾸고, 키 플레이스홀더는 대시보드의 키로 바꾸세요.
curl -X PUT https://api.zinndigital.com/v1/sites/{siteId}/cache \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ "css_seconds": <integer>, "image_seconds": <integer>, "javascript_seconds": <integer> }'로그인하셨나요? 대시보드의 API 콘솔이 실제 조직 ID와 본인의 키를 자동으로 채우고 라이브 API를 대상으로 요청을 실행하므로 실제 응답을 확인할 수 있습니다. API 콘솔에서 이 엔드포인트를 여세요
상세 정보
Writes the three cache times a package lets a customer change, and returns the whole cache state so the card re-renders from the server's answer rather than from what it asked for. PUT because the body states the desired end state. ⛔⛔ All three classes are required, every time, and that is the contract rather than an oversight. The vendor replaces the stored policy with exactly the body it is given, so a request naming two classes deletes the third — silently, with a cheerful acknowledgement. Making the fields optional would put that footgun on the wire where every future client would find it. A value outside 0…31536000 seconds is refused 422 before the vendor is called, as is a package type whose cache settings it does not permit. 404 for a site with no vendor hosting package, or one that is not the caller's. Requires sites.view and sites.panel_access.
매개변수
| 이름 | 유형 | 필수 | 설명 |
|---|---|---|---|
siteId (path) | Uuid | 예 | Site ID (UUIDv7). |
요청 본문
| 이름 | 유형 | 필수 | 설명 |
|---|---|---|---|
css_seconds | integer | 예 | How long stylesheets should be cached, in seconds. Zero is "do not cache". |
image_seconds | integer | 예 | How long images should be cached, in seconds. |
javascript_seconds | integer | 예 | How long scripts should be cached, in seconds. |
응답
| 이름 | 유형 | 필수 | 설명 |
|---|---|---|---|
permitted | boolean | 예 | Whether the package type exposes cache settings and the report at all. |
purge_permitted | boolean | 예 | Whether a purge is permitted. Separate from permitted on purpose: the purge was measured working on a package whose cache settings and report the vendor refuses. |
css_seconds | integer | 예 | How long stylesheets are cached. |
image_seconds | integer | 예 | How long images are cached. |
javascript_seconds | integer | 예 | How long scripts are cached. |
reported | object | 예 | Every asset class the vendor reported, keyed by its own name, including the classes that cannot be written. ⛔ Read-only on a client: writing them deletes them, because the vendor… |
report_available | boolean | 예 | Whether the cacheability report could be read. False renders an explanation rather than an empty table, so "nothing has been seen yet" and "not part of this plan" never look… |
report | SiteCacheReportRow[] | 예 | What the platform did with the URLs it has seen. |
이 엔드포인트가 반환할 수 있는 오류
401 · 403 · 404 · 422 · 429 · 503