hosting

PUT /v1/sites/{siteId}/wordpress/plugins/{pluginName}

Activate or deactivate a plugin on a site.

Wszystkie punkty końcowe hosting

Uwierzytelnianie

Wyślij klucz API jako token bearer. Klucz musi posiadać uprawnienie sites.view; klucz bez niego jest odrzucany z kodem 403, a nie 404.

Ten punkt końcowy nie wymaga identyfikatora organizacji. Twój klucz już identyfikuje organizację, do której należy, a odpowiedź jest do niej ograniczona.

Wypróbuj

Zastąp wszystko w nawiasach ostrych własnymi wartościami, a zastępczy znacznik klucza kluczem ze swojego pulpitu nawigacyjnego.

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

Zalogowany? Konsola API w Twoim panelu uzupełnia rzeczywiste identyfikator organizacji oraz Twój własny klucz i wykonuje żądanie względem aktywnego API, dzięki czemu możesz zobaczyć rzeczywistą odpowiedź. Otwórz ten punkt końcowy w konsoli API

Szczegóły

Sets whether the plugin is active, and returns the whole plugin listing so the card re-renders from the server's answer. The plugin is addressed by **path** rather than by a field in the body, so activate and delete cannot be confused for one another by a caller that got a body wrong. Deactivating a plugin can take a live site's checkout, cache or security layer with it. Refused `422` when the package type does not carry `wp_plugins`, or when WordPress is not installed. `404` for a site with no vendor hosting package. Requires `sites.view` and `sites.panel_access`.

Parametry

NazwaTypWymaganeCo to jest
siteId (path)UuidTakSite ID (UUIDv7).
pluginName (path)stringTakThe plugin's slug, exactly as `listSiteWordPressPlugins` reports it. It is WordPress's identifier, not ours, so percent-encode it; a slug containing a slash does not route and a…

Treść żądania

NazwaTypWymaganeCo to jest
activebooleanTakWhether the plugin should be running after this call.

Odpowiedź

NazwaTypWymaganeCo to jest
dataSiteWordPressPlugin[]TakThe installed plugins.
stack_cache_installedbooleanTak⛔ **Cannot be derived from `data`.** this platform excludes its own server-side cache plugin from the listing, so a client deriving this flag from the rows would answer "not ins…

Błędy, które ten punkt końcowy może zwrócić

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