hosting

PUT /v1/sites/{siteId}/wordpress/themes/{themeName}

Activate or deactivate a theme on a site.

Tüm hosting uç noktaları

Tüm geliştirici belgeleri

Kimlik Doğrulama

Bearer token olarak bir API anahtarı gönderin. Anahtar sites.view iznine sahip olmalıdır; bu izne sahip olmayan bir anahtar 404 ile değil, 403 ile reddedilir.

Bu uç nokta hiçbir organizasyon kimliği almaz. Anahtarınız zaten ait olduğu organizasyonu tanımlar ve yanıt bu organizasyonla sınırlandırılır.

Dene

Köşeli parantez içindeki her şeyi kendi değerlerinizle ve anahtar yer tutucusunu panonuzdan bir anahtarla değiştirin.

curl -X PUT https://api.zinndigital.com/v1/sites/{siteId}/wordpress/themes/{themeName} \
  -H "Authorization: Bearer zdk_live_…" \
  -H "Content-Type: application/json" \
  -d '{ "active": <boolean> }'

Oturum açtınız mı? Panonuzdaki API konsolu, gerçek organizasyon kimliğinizi ve kendi anahtarınızı otomatik olarak doldurur ve isteği canlı API üzerinde çalıştırarak gerçek yanıtı görmenizi sağlar. Bu uç noktayı API konsolunda açın

Ayrıntılar

Switches the site's active theme and returns the whole theme list. Activating a theme changes what every visitor sees immediately, so the client confirms first. Refused 422 when the package type does not carry wp_themes, or when WordPress is not installed. 404 for a site with no vendor hosting package. Requires sites.view and sites.panel_access.

Parametreler

AdTürZorunluNe olduğu
siteId (path)UuidEvetSite ID (UUIDv7).
themeName (path)stringEvetThe theme's slug, exactly as listSiteWordPressThemes reports it. WordPress's identifier, not ours — percent-encode it.

İstek gövdesi

AdTürZorunluNe olduğu
activebooleanEvetWhether the theme should be the site's active theme.

Yanıt

AdTürZorunluNe olduğu
dataSiteWordPressTheme[]EvetThe installed themes.

Bu uç noktanın dönderebileceği hatalar

401 · 403 · 404 · 409 · 422 · 429 · 503