hosting

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

Activate or deactivate a theme on a site.

Sve hosting krajnje tačke

Autentifikacija

Pošaljite API ključ kao bearer token. Ključ mora imati dozvolu sites.view; ključ bez nje se odbija sa 403, a ne sa 404.

Ovaj krajnji tačka ne prihvata ID organizacije. Vaš ključ već identifikuje organizaciju kojoj pripada, a odgovor je ograničen na nju.

Isprobajte

Zamenite bilo šta u uglastim zagradama sopstvenim vrednostima, a ključni placeholder sa ključem sa vaše kontrolne table.

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

Prijavljeni ste? API konzola na vašoj kontrolnoj tabli automatski popunjava ID vaše stvarne organizacije i vaš sopstveni ključ, i izvršava zahtev nad API-jem uživo tako da možete videti stvarni odgovor. Otvorite ovu krajnju tačku u API konzoli

Detalji

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`.

Parametri

NazivVrstaObaveznoŠta je ovo
siteId (path)UuidDaSite ID (UUIDv7).
themeName (path)stringDaThe theme's slug, exactly as `listSiteWordPressThemes` reports it. WordPress's identifier, not ours — percent-encode it.

Telo zahteva

NazivVrstaObaveznoŠta je ovo
activebooleanDaWhether the theme should be the site's active theme.

Odgovor

NazivVrstaObaveznoŠta je ovo
dataSiteWordPressTheme[]DaThe installed themes.

Greške koje ovaj krajnji tačka može da vrati

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