hosting
PUT /v1/sites/{siteId}/wordpress/themes/{themeName}
Activate or deactivate a theme on a site.
ავტორიზაცია
API გასაღები გაგზავნეთ როგორც მატარებელი ტოკენი (bearer token). გასაღებს უნდა ჰქონდეს sites.view ნებართვა; ამის გარეშე გასაღები უარყოფილი იქნება 403 და არა 404 სტატუსით.
ეს ბოლო წერტილი არ იღებს ორგანიზაციის იდენტიფიკატორს. თქვენი გასაღები უკვე აიდენტიფიცირებს იმ ორგანიზაციას, რომელსაც ის ეკუთვნის, და პასუხი შემოფარგლულია მისით.
სცადეთ
შეSubstituted any value inside angle brackets with your own and the key placeholder with a key from your dashboard.
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> }'შესული ხართ? თქვენი სამართავ პანელში არსებული API კონსოლი ავტომატურად ამატებს თქვენი რეალური ორგანიზაციის ID-სა და საკუთარ გასაღებს და ატარებს მოთხოვნას ცოცხალ API-ს წინააღმდეგ, რათა იხილოთ რეალური პასუხი. გაAღით ეს ენდპოინტი API კონსოლში
დეტალები
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`.
პარამეტრები
| სახელი | ტიპი | სავალდებულო | რა არის ეს |
|---|---|---|---|
siteId (path) | Uuid | დიახ | Site ID (UUIDv7). |
themeName (path) | string | დიახ | The theme's slug, exactly as `listSiteWordPressThemes` reports it. WordPress's identifier, not ours — percent-encode it. |
მოთხოვნის სხეული
| სახელი | ტიპი | სავალდებულო | რა არის ეს |
|---|---|---|---|
active | boolean | დიახ | Whether the theme should be the site's active theme. |
პასუხი
| სახელი | ტიპი | სავალდებულო | რა არის ეს |
|---|---|---|---|
data | SiteWordPressTheme[] | დიახ | The installed themes. |
შეცდომები, რომლებიც ამ ენდპოინტს შეუძლია დააბრუნოს
401 · 403 · 404 · 409 · 422 · 429 · 503