hosting
POST /v1/sites/{siteId}/clones/{cloneId}/retry
Finish a copy that failed, onto the same new site.
Аутентификация
Отправьте ключ API в качестве токена носителя (bearer token). Ключ должен иметь разрешение hosting.backup.manage; ключ без него отклоняется с кодом 403, а не 404.
Этот эндпоинт не принимает идентификатор организации. Ваш ключ уже определяет организацию, к которой он принадлежит, и ответ ограничивается ее рамками.
Попробовать
Замените всё в угловых скобках на собственные значения, а плейсхолдер ключа — на ключ из вашей панели управления.
curl -X POST https://api.zinndigital.com/v1/sites/{siteId}/clones/{cloneId}/retry \
-H "Authorization: Bearer zdk_live_…"Вошли в систему? Консоль API в вашей панели управления автоматически подставляет реальный идентификатор вашей организации и ваш собственный ключ, а также выполняет запрос к работающему API, чтобы вы могли увидеть актуальный ответ. Откройте эту конечную точку в API-консоли
Подробнее
Recovery goes to the step that failed: when the copy of this site was never made a new one is taken, and when it was it is reused. Either way it is restored onto the SAME new site, so a half-built site never has to be deleted to try again. 409 when the copy has not failed; 422 when its new site has been deleted. Requires hosting.backup.manage, because it overwrites the new site's content.
Параметры
| Имя | Тип | Обязательно | Что это |
|---|---|---|---|
siteId (path) | Uuid | Да | Site ID (UUIDv7). |
cloneId (path) | Uuid | Да | The id of a row from listSiteClones. |
Ответ
| Имя | Тип | Обязательно | Что это |
|---|---|---|---|
id | Uuid | Да | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
blueprint_id | Uuid | Да | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
site_id | Uuid | Да | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
site_name | string | Да | — |
site_domain | string | Да | — |
site_status | string | Да | The new site's status, or deleted when it no longer exists. |
step | SiteCloneStep | Да | copying — the copy of the original is being taken; waiting — the new site is still being built; restoring — the copy is being put onto it; done; failed. |
message | string | Да | Why it failed, or what still needs attention. English; shown verbatim. |
can_retry | boolean | Да | Whether retrySiteClone will accept this row. |
created_at | string | Да | — |
finished_at | object | Нет | — |
Ошибки, которые может возвращать этот эндпоинт
401 · 403 · 404 · 409 · 422 · 429 · 503