PATCH /api/v1/instances/{instance_id}
Update Instance
Авторизация: нужен Authorization: Bearer <token>
curl -sS -X PATCH "https://entherium.duckdns.org:8443/api/v1/instances/<instance_id>" \ -H "Authorization: Bearer <token>" \ -H "Content-Type: application/json" \ -d '{"attached_sc":"<attached_sc>","backend":"<backend>","base_url":"<base_url>","caption":"<caption>","gcs_bucket":"<gcs_bucket>","hostname":"<hostname>","is_active":"<is_active>","registry":"<registry>","template_dir":"<template_dir>","theme_repo":"<theme_repo>","theme_sha":"<theme_sha>","tier":"<tier>","vps_ip":"<vps_ip>","vps_port":"<vps_port>"}'Ответ 200
Заголовок раздела «Ответ 200»В контракте нет примера для этого ответа; схема: HugoInstanceRead. Поля — в интерактивном обозревателе.
Возвращает
Заголовок раздела «Возвращает»HugoInstanceRead — Successful Response
| Поле | Тип | Описание |
|---|---|---|
attached_sc | integer | null (opt.) | |
backend | "gcs" | "local-fs" | "wp" (opt.) | |
base_url | string | null (opt.) | |
caption | string | null (opt.) | |
createtime | string | |
gcs_bucket | string | null (opt.) | |
guid | integer | |
hostname | string | null (opt.) | |
instance_id | string | |
is_active | boolean (opt.) | |
last_build_at | string | null | |
last_publish_at | string | null | |
owner | integer | null (opt.) | |
posts_count | integer | |
registry | object (opt.) | |
rsid | integer | |
template_dir | string | null (opt.) | |
theme_repo | string | null (opt.) | |
theme_sha | string | null (opt.) | |
tier | "prod" | "dev" | "test" | "staging" (opt.) | |
updatedby | integer | null (opt.) | |
updatetime | string | |
vps_ip | string | null (opt.) | |
vps_port | integer | null (opt.) | |
warmup_state | "cold" | "warming" | "warm" |
Параметры
Заголовок раздела «Параметры»| Параметр | Где | Обязателен | Тип | По умолчанию | Ограничения | Описание |
|---|---|---|---|---|---|---|
instance_id | path | да | string | — | — | |
Idempotency-Key | header | нет | string | — | uuid | Optional. |
Тело запроса
Заголовок раздела «Тело запроса»| Поле | Тип | Обязательно | Описание |
|---|---|---|---|
attached_sc | integer | null | нет | |
backend | "gcs" | "local-fs" | "wp" | null | нет | |
base_url | string | null | нет | |
caption | string | null | нет | |
gcs_bucket | string | null | нет | |
hostname | string | null | нет | |
is_active | boolean | null | нет | |
registry | object | null | нет | |
template_dir | string | null | нет | |
theme_repo | string | null | нет | |
theme_sha | string | null | нет | |
tier | "prod" | "dev" | "test" | "staging" | null | нет | |
vps_ip | string | null | нет | |
vps_port | integer | null | нет |
| Код | Смысл | Тело |
|---|---|---|
401 | Missing or invalid authentication credentials | ErrorResponse |
422 | Validation Error | HTTPValidationError |
Тело любой ошибки — {detail, code?, request_id, doc_url}: request_id — что цитировать, doc_url ведёт в Справочник ошибок.