hosting
PUT /v1/sites/{siteId}/wordpress/themes/{themeName}
Activate or deactivate a theme on a site.
Autentifikatsiya
API kalitini bearer token sifatida yuboring. Kalit sites.view ruxsatiga ega boʻlishi shart; ruxsatsiz kalit 404 emas, balki 403 xatosi bilan rad etiladi.
Bu yakuniy nuqta hech qanday tashkilot identifikatorini qabul qilmaydi. Sizning kalitingiz unga tegishli tashkilotni allaqachon aniqlaydi va javob shunga qarab cheklanadi.
Sinab ko'rish
Qavslardagi har qanday narsani o'z qiymatlaringiz bilan, kalit pleysxolderini эsa boshqaruv panelingizdagi kalit bilan almashtiring.
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> }'Tizimga kirganmisiz? Boshqaruv panelingizdagi API konsoli haqiqiy tashkilot ID raqamingiz va shaxsiy kalitingizni avtomatik to'ldiradi hamda haqiqiy javobni ko'rishingiz uchun so'rovni jonli API orqali bajaradi. Ushbu yakuniy nuqtani API konsolida oching
Tafsilotlar
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`.
Parametrlar
| Nomi | Turi | Majburiy | Nima bu |
|---|---|---|---|
siteId (path) | Uuid | Ha | Site ID (UUIDv7). |
themeName (path) | string | Ha | The theme's slug, exactly as `listSiteWordPressThemes` reports it. WordPress's identifier, not ours — percent-encode it. |
Soʻrov tanasi
| Nomi | Turi | Majburiy | Nima bu |
|---|---|---|---|
active | boolean | Ha | Whether the theme should be the site's active theme. |
Javob
| Nomi | Turi | Majburiy | Nima bu |
|---|---|---|---|
data | SiteWordPressTheme[] | Ha | The installed themes. |
Ushbu yakuniy nuqta qaytarishi mumkin bo'lgan xatolar
401 · 403 · 404 · 409 · 422 · 429 · 503