hosting

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

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

Barcha hosting yakuniy nuqtalari

Autentifikatsiya

API kalitini bearer token sifatida yuboring. Kalit storage.manage ruxsatiga ega boʻlishi shart; ruxsatsiz kalit 404 emas, balki 403 xatosi bilan rad etiladi.

Bu yakuniy nuqta hech qanday tashkilot identifikatorini qabul qilmaydi. Sizning kalitingiz unga tegishli tashkilotni allaqachon aniqlaydi va javob shunga qarab cheklanadi.

Sinab ko'rish

Qavslardagi har qanday narsani o'z qiymatlaringiz bilan, kalit pleysxolderini эsa boshqaruv panelingizdagi kalit bilan almashtiring.

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

Tizimga kirganmisiz? Boshqaruv panelingizdagi API konsoli haqiqiy tashkilot ID raqamingiz va shaxsiy kalitingizni avtomatik to'ldiradi hamda haqiqiy javobni ko'rishingiz uchun so'rovni jonli API orqali bajaradi. Ushbu yakuniy nuqtani API konsolida oching

Tafsilotlar

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`.

Parametrlar

NomiTuriMajburiyNima bu
siteId (path)UuidHaSite ID (UUIDv7).

Soʻrov tanasi

NomiTuriMajburiyNima bu
bucket_idstringYo'qWhich bucket to use. Omit to use the organisation's own, provisioning one on first use. Changing this on a live offload is refused.
enabledbooleanYo'qPause or resume a paired site. Ignored before the plugin has paired.
rewrite_urlsbooleanYo'q
delete_localbooleanYo'q
prefixstringYo'q
custom_domainstringYo'qA 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…

Javob

NomiTuriMajburiyNima bu
configuredbooleanHa`false` when this site has no offload set up. The rest of the fields are then absent — except `plan`, which is present in both states on purpose.
planMediaStorageTermsYo'qWhat this site's organisation gets included for media storage, what it is using, and what more would cost. Present on **every** media-offload response, including `configured: fa…
idstringYo'q
site_idstringYo'q
bucket_idstringYo'q
statusstring<awaiting_pairing, active, paused, revoked>Yo'q
prefixstringYo'qThe key prefix this site's objects live under.
rewrite_urlsbooleanYo'qWhether 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_localbooleanYo'qWhether 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_domainstringYo'qThe 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_urlstringYo'qWhere 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_domainbooleanYo'q`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_uploadsbooleanYo'qWhether the plugin may currently upload. Requires both an active offload and a usable bucket.
pairedbooleanYo'qWhether a plugin token has been issued. The token and its hash are never returned.
plugin_versionstringYo'q
last_seen_atstringYo'qWhen the plugin last called. `null` means it never has.
objects_offloadedintegerYo'qWhat the plugin reports it has moved. A diagnostic for the screen, never an input to billing — storage is metered by measuring the bucket.
bytes_offloadedintegerYo'q
created_atstringYo'q

Ushbu yakuniy nuqta qaytarishi mumkin bo'lgan xatolar

401 · 403 · 404 · 422 · 429