hosting

PUT /v1/sites/{siteId}/media-offload

Turn media offload on for a site, or change how it behaves.

모든 hosting 엔드포인트

인증

Bearer 토큰으로 API 키를 전송하세요. 키는 반드시 storage.manage 권한을 가지고 있어야 하며, 권한이 없는 키는 404가 아닌 403으로 거부됩니다.

이 엔드포인트는 조직 ID를 받지 않습니다. 사용자의 키가 이미 속한 조직을 식별하며, 응답은 해당 조직으로 한정됩니다.

무료 체험하기

대괄호 안에 있는 모든 내용을 사용자 지정 값으로 바꾸고, 키 플레이스홀더는 대시보드의 키로 바꾸세요.

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

로그인하셨나요? 대시보드의 API 콘솔이 실제 조직 ID와 본인의 키를 자동으로 채우고 라이브 API를 대상으로 요청을 실행하므로 실제 응답을 확인할 수 있습니다. API 콘솔에서 이 엔드포인트를 여세요

상세 정보

Creates the offload configuration if it does not exist, provisioning storage for the organisation on first use — "turn on media offload" is what the customer wants, and a bucket is our word for part of how we do it. Moving an offload that is already live to a **different** bucket answers `422`. The objects already written stay where they are, so the switch would leave the site serving half its media from a bucket the configuration no longer names, and nothing would report it because new uploads would keep succeeding. Requires `storage.manage`.

매개변수

이름유형필수설명
siteId (path)UuidSite ID (UUIDv7).

요청 본문

이름유형필수설명
bucket_idstring아니요Which bucket to use. Omit to use the organisation's own, provisioning one on first use. Changing this on a live offload is refused.
enabledboolean아니요Pause or resume a paired site. Ignored before the plugin has paired.
rewrite_urlsboolean아니요
delete_localboolean아니요
prefixstring아니요
custom_domainstring아니요A media domain of the site's own, replacing the shared Zinn® hostname. Must be `https://` and a bare domain with no path. Send `""` to clear it. Required to turn on URL rewritin…

응답

이름유형필수설명
configuredboolean`false` when this site has no offload set up. The rest of the fields are then absent. A site with no offload is a `200`, never a `404`.
idstring아니요
site_idstring아니요
bucket_idstring아니요
statusstring<awaiting_pairing, active, paused, revoked>아니요
prefixstring아니요The key prefix this site's objects live under.
rewrite_urlsboolean아니요Whether the plugin points media URLs at the bucket. Off means "upload a copy but keep serving locally", which is how a cautious customer migrates.
delete_localboolean아니요Whether the plugin removes the local file after a confirmed upload. Defaults to off, and even when on the plugin refuses to delete after a partial upload.
custom_domainstring아니요The site's OWN media domain, as the customer typed it, or `""`. This is what belongs in the settings input box. See `public_base_url` for where media is actually served from — t…
public_base_urlstring아니요Where this site's media is actually served from, after the site's own domain, the footprint rule and the bucket's shared hostname have been resolved. `""` means no URL is rewrit…
needs_custom_domainboolean아니요`true` when this site is serving media locally only because it has no media domain of its own — a footprint-free site awaiting a CNAME. Distinguishes the one empty-`public_base_…
accepts_uploadsboolean아니요Whether the plugin may currently upload. Requires both an active offload and a usable bucket.
pairedboolean아니요Whether a plugin token has been issued. The token and its hash are never returned.
plugin_versionstring아니요
last_seen_atstring아니요When the plugin last called. `null` means it never has.
objects_offloadedinteger아니요What the plugin reports it has moved. A diagnostic for the screen, never an input to billing — storage is metered by measuring the bucket.
bytes_offloadedinteger아니요
created_atstring아니요

이 엔드포인트가 반환할 수 있는 오류

401 · 403 · 404 · 422 · 429