hosting
POST /v1/media-offload/uploads
Presigned upload URLs for a batch of media files.
Аутентификација
Пошаљите API кључ као bearer токен. Ова крајња тачка не наводи конкретну дозволу у спецификацији, па свом кључу доделите најмања неопходна овлашћења и проверите одговор уместо да претпостављате.
Ова крајња тачка не прихвата id организације. Ваш кључ већ идентификује организацију којој припада, а одговор је ограничен на њу.
Испробајте
Замените све што је у угластим заградама сопственим вредностима, а чувар места кључа кључем са своје контролне табле.
curl -X POST https://api.zinndigital.com/v1/media-offload/uploads \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ "keys": <string[]> }'Пријављени сте? API конзола на вашој контролној табли попуњава ваш прави id организације и ваш сопствени кључ, и покреће захтев према живом API-ју како бисте могли да видите стварни одговор. Отворите ову крајњу тачку у API конзоли
Детаљи
Called by the Zinn® Media Offload plugin with a bearer plugin token. Returns one presigned PUT URL per key; the plugin then sends the bytes straight to storage, so no file ever transits this API and no storage credential ever reaches WordPress. Up to 100 keys per request. Presigning is local cryptography with no vendor round trip, so a batch costs no more than a single key — which is what makes offloading an existing 20,000-file media library 200 requests rather than 20,000. Every key is joined onto the site's own prefix and validated. A key that tries to climb out of that prefix is refused with 422, never normalised into something plausible. An offload writing to our storage answers 422 with code: FEATURE_NOT_INCLUDED and no URLs once the organisation no longer holds a plan that includes object storage — checked on every request, because a plugin token outlives the plan that paid for it (D26223). An offload writing to the customer's own bucket is unaffected.
Тело захтева
| Назив | Тип | Обавезно | Шта је ово |
|---|---|---|---|
keys | string[] | Да | — |
plugin_version | string | Не | — |
Одговор
| Назив | Тип | Обавезно | Шта је ово |
|---|---|---|---|
uploads | object[] | Да | — |
Грешке које ова крајња тачка може вратити
401 · 422 · 429 · 503