hosting

POST /v1/sites/{siteId}/wordpress/themes/{themeName}/update

Update one theme to its latest release.

Всички крайни точки в hosting

Всички документи за разработчици

Упълномощаване

Изпратете API ключ като токен за носене. Ключът трябва да притежава разрешението sites.view; ключ без него се отхвърля с 403, а не с 404.

Този ендпойнт не изисква идентификатор на организация. Вашият ключ вече идентифицира организацията, към която принадлежи, и отговорът е ограничен до нея.

Опитайте

Заменете всичко в квадратни скоби със собствени стойности, а ключовия заместващ символ – с ключ от вашето табло за управление.

curl -X POST https://api.zinndigital.com/v1/sites/{siteId}/wordpress/themes/{themeName}/update \
  -H "Authorization: Bearer zdk_live_…"

Влязохте ли в профила си? API конзолата във вашето табло за управление попълва действителното идентификационно число на вашата организация и вашия собствен ключ и изпълнява заявката спрямо реалното API, за да можете да видите действителния отговор. Отворете този крайpoint в API конзолата

Детайли

Updates a single theme and returns the whole theme list. ⛔ Its own path segment, not a field on the PUT beside activate/deactivate. Updating replaces the theme's files on a live site; activating changes which one renders. A caller that got a body wrong must not be able to reach the first by aiming at the second — the rule every destructive operation on this surface follows. Idempotent: a theme already on its latest version is a successful no-op, so a caller may run this across a selection without first filtering to the ones that need it. ⛔ Fleet only — this platform has no per-component update verb at any path (only updateSiteWordPressCore, which moves WordPress itself). Refused where wp_component_updates is false. Requires sites.view and sites.panel_access.

Параметри

ИмеТипЗадължителноКакво представлява
siteId (path)UuidДаSite ID (UUIDv7).
themeName (path)stringДаThe theme's slug, exactly as listSiteWordPressThemes reports it.

Отговор

ИмеТипЗадължителноКакво представлява
dataSiteWordPressTheme[]ДаThe installed themes.

Грешки, които този крайpoint може да върне

401 · 403 · 404 · 422 · 429 · 503