hosting

PUT /v1/sites/{siteId}/wordpress/update-policy

Set the site's auto-update policy and apply it to WordPress.

అన్ని hosting ఎండ్‌పాయింట్లు

ప్రమాణీకరణ

బీయర్ టోకెన్‌గా API కీని పంపండి. కీ తప్పనిసరిగా sites.view అనుమతిని కలిగి ఉండాలి; అది లేని కీని 404 కాకుండా 403తో తిరస్కరిస్తారు.

ఈ ఎండ్‌పాయింట్ ఎలాంటి సంస్థ ఐడీని తీసుకోదు. మీ కీ ఇప్పటికే అది ఏ సంస్థకు చెందుతుందో గుర్తిస్తుంది మరియు ప్రతిస్పందన దానికే పరిమితం చేయబడుతుంది.

ప్రయత్నించండి

కోణీయ బ్రాకెట్‌లలో ఉన్న దేన్నైనా మీ స్వంత విలువలతో భర్తీ చేయండి, మరియు కీ ప్లేస్‌హోల్డర్‌ను మీ డాష్‌బోర్డ్ నుండి తీసుకున్న కీతో భర్తీ చేయండి.

curl -X PUT https://api.zinndigital.com/v1/sites/{siteId}/wordpress/update-policy \
  -H "Authorization: Bearer zdk_live_…" \
  -H "Content-Type: application/json" \
  -d '{ "core": <string<off, minor, all>>, "plugins": <boolean>, "themes": <boolean>, "ring": <string<canary, early, general>> }'

సైన్ ఇన్ చేశారా? మీ డ్యాష్‌బోర్డ్‌లోని API కాన్సోల్ మీ అసలైన సంస్థ ID మరియు మీ స్వంత కీని నింపుతుంది, అలాగే మీరు అసలైన ప్రతిస్పందనను చూడటానికి లైవ్ API ద్వారా ఆభ్యర్థనను రన్ చేస్తుంది. ఈ ఎండ్‌పాయింట్‌ను API కన్సోల్‌లో తెరిచండి

వివరాలు

Stores the policy **and writes it to the site in the same call**, then re-reads the site and returns what it found. ⛔ Storing without applying is the defect this endpoint exists to avoid: a stored row saying `core: off` over a WordPress that is still updating itself is worse than no row, because the screen then says the operator's decision took effect. The response body is a fresh read, never an echo of the request. ⛔ On a failed apply the policy row keeps `apply_error` **and** the call answers `422`. Only recording it would be a silent failure; only raising it would leave a stored policy nobody knows was never applied. `ring` is the **staged-rollout** ring this site belongs to — `canary`, `early` or `general`. It is a property of the site, not of the change, so an operator picks their canaries once and every later rollout inherits the choice. ⛔ **Fleet only** — refused where `wp_update_policy` is `false`, because it is written with `wp config set` and `wp plugin auto-updates` and this platform publishes no equivalent. Requires `sites.view` and `sites.panel_access`.

పారామీటర్లు

పేరురకంకావలసినదిఇది ఏమిటి
siteId (path)UuidఅవునుSite ID (UUIDv7).

అభ్యర్థన బాడీ

పేరురకంకావలసినదిఇది ఏమిటి
corestring<off, minor, all>అవును`minor` is WordPress's own default (security and maintenance releases); `all` includes major upgrades unattended; `off` disables core auto-updates.
pluginsbooleanఅవునుWhether every plugin should auto-update.
themesbooleanఅవునుWhether every theme should auto-update.
ringstring<canary, early, general>అవునుThe staged-rollout ring this site belongs to.

స్పందన

పేరురకంకావలసినదిఇది ఏమిటి
corestring<off, minor, all>అవునుThe stored policy for WordPress core updates.
pluginsbooleanఅవునుThe stored policy — whether every plugin should auto-update.
themesbooleanఅవునుThe stored policy — whether every theme should auto-update.
ringstring<canary, early, general>అవునుThe staged-rollout ring this site belongs to.
applied_atstringఅవునుWhen the policy last reached the site, ISO-8601, or `""` if it never has. ⛔ A timestamp and not a flag: "when did this last reach the site" is the question an operator asks, and…
apply_errorstringఅవునుWhy the last apply failed, or `""`. Kept beside `applied_at` rather than replacing it, so a failed re-apply does not erase that an earlier one worked.
observed_readbooleanఅవునుWhether the site itself was read. ⛔ An empty `drift` is only meaningful while this is `true`.
observed_corestringఅవునుWhat `WP_AUTO_UPDATE_CORE` is set to on the site — `off`, `minor`, `all`, or `""` meaning **the constant is not defined at all**, so WordPress applies its own default. ⛔ `""` is…
plugins_offstring[]అవునుThe plugins on this site that are NOT auto-updating.
themes_offstring[]అవునుThe themes on this site that are NOT auto-updating.
driftstring<core, plugins, themes>[]అవునుWhich of `core`, `plugins`, `themes` the site disagrees with the policy about.

ఈ ఎండ్‌పాయింట్ తిరిగి ఇవ్వగల లోపాలు

401 · 403 · 404 · 422 · 429 · 503