hosting
GET /v1/sites/{site_id}/translation/served
The languages this site publishes, for the site itself to follow.
Аутентификација
Пошаљите API кључ као bearer токен. Кључ мора имати дозволу sites.view; кључ без ње се одбија уз 403, а не 404.
Ова крајња тачка не прихвата id организације. Ваш кључ већ идентификује организацију којој припада, а одговор је ограничен на њу.
Испробајте
Замените све што је у угластим заградама сопственим вредностима, а чувар места кључа кључем са своје контролне табле.
curl -X GET https://api.zinndigital.com/v1/sites/{site_id}/translation/served \
-H "Authorization: Bearer zdk_live_…"Пријављени сте? API конзола на вашој контролној табли попуњава ваш прави id организације и ваш сопствени кључ, и покреће захтев према живом API-ју како бисте могли да видите стварни одговор. Отворите ову крајњу тачку у API конзоли
Детаљи
The served_locales the customer chose on the site's Translation tab. The Zinn® Translate plugin publishes exactly this list when it is connected to a Zinn Digital® plan — it asks when it connects and then hourly, keeps the answer, and never asks during a page load. A separate read from getSiteTranslation on purpose: that payload counts every translation the site has to report per-language progress, and this one is asked hourly by every connected site, so it answers from one row. ⛔ An empty list means publish none — never "all". A site with no Site Translation answers 200 with state: disabled and an empty list rather than a 403, so the plugin can tell "publish nothing" apart from "could not ask"; nothing paid for is returned here. Requires sites.view, the same scope as the bundle.
Параметри
| Назив | Тип | Обавезно | Шта је ово |
|---|---|---|---|
site_id (path) | Uuid | Да | — |
Одговор
| Назив | Тип | Обавезно | Шта је ово |
|---|---|---|---|
site_id | Uuid | Да | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
state | string<disabled, active, paused_standing, over_allowance> | Да | The Site Translation state; disabled when the site has none. |
served_locales | LocaleCode[] | Да | The languages this site publishes, sorted. Empty means none — never "all". |
Грешке које ова крајња тачка може вратити
401 · 403 · 404