Перейти к содержимому

PATCH /api/v1/instances/{instance_id}

Статус: GA Доступ: по токену контракт API: 0.3.0 · capability 2026-09-03.1 Открыть как Markdown Открыть в Claude Открыть в ChatGPT

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>"}'

В контракте нет примера для этого ответа; схема: HugoInstanceRead. Поля — в интерактивном обозревателе.

HugoInstanceRead — Successful Response

ПолеТипОписание
attached_scinteger | null (opt.)
backend"gcs" | "local-fs" | "wp" (opt.)
base_urlstring | null (opt.)
captionstring | null (opt.)
createtimestring
gcs_bucketstring | null (opt.)
guidinteger
hostnamestring | null (opt.)
instance_idstring
is_activeboolean (opt.)
last_build_atstring | null
last_publish_atstring | null
ownerinteger | null (opt.)
posts_countinteger
registryobject (opt.)
rsidinteger
template_dirstring | null (opt.)
theme_repostring | null (opt.)
theme_shastring | null (opt.)
tier"prod" | "dev" | "test" | "staging" (opt.)
updatedbyinteger | null (opt.)
updatetimestring
vps_ipstring | null (opt.)
vps_portinteger | null (opt.)
warmup_state"cold" | "warming" | "warm"
ПараметрГдеОбязателенТипПо умолчаниюОграниченияОписание
instance_idpathдаstring——
Idempotency-Keyheaderнетstring—uuidOptional.
ПолеТипОбязательноОписание
attached_scinteger | nullнет
backend"gcs" | "local-fs" | "wp" | nullнет
base_urlstring | nullнет
captionstring | nullнет
gcs_bucketstring | nullнет
hostnamestring | nullнет
is_activeboolean | nullнет
registryobject | nullнет
template_dirstring | nullнет
theme_repostring | nullнет
theme_shastring | nullнет
tier"prod" | "dev" | "test" | "staging" | nullнет
vps_ipstring | nullнет
vps_portinteger | nullнет
КодСмыслТело
401Missing or invalid authentication credentialsErrorResponse
422Validation ErrorHTTPValidationError

Тело любой ошибки — {detail, code?, request_id, doc_url}: request_id — что цитировать, doc_url ведёт в Справочник ошибок.