hosting

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

Activate or deactivate a theme on a site.

Bütün hosting nöqtələri

Bütün tərtibatçı sənədləri

Doğrulama

API açarını bearer token kimi göndərin. Açar sites.view icazəsinə malik olmalıdır; bu icazəsi olmayan açar 404 deyil, 403 xətası ilə rədd edilir.

Bu endpoint heç bir təşkilat ID-si tələb etmir. Sizin açarınız artıq aid olduğu təşkilatı müəyyən edir və cavab həmin təşkilat üçün məhdudlaşdırılır.

Sınaqdan keçir

Bucaqlı mötərizələrdə olan hór şeyi öz qiymətlərinizlə, açar yertutucusunu isə idarə panelinizdən bir açarla əvəz edin.

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

Sistemə daxil olmusunuz? İdarə panelinizdəki API konsolu real təşkilatınızın identifikatorunu və öz açarınızı avtomatik doldurur, sorğunu canlı API-yə qarşı icra edir ki, siz faktiki cavabı görə biləsiniz. Bu son nöqtəni API konsolunda açın

Təfərrüatlar

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.

Parametrlər

AdTipTələb olunurNədir
siteId (path)UuidBəliSite ID (UUIDv7).
themeName (path)stringBəliThe theme's slug, exactly as listSiteWordPressThemes reports it. WordPress's identifier, not ours — percent-encode it.

Sorğu gövdəsi

AdTipTələb olunurNədir
activebooleanBəliWhether the theme should be the site's active theme.

Cavab

AdTipTələb olunurNədir
dataSiteWordPressTheme[]BəliThe installed themes.

Bu son nöqtənin qaytara biləcəyi xətalar

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