public

POST /v1/wp/plugin-update/{siteId}

What an installed Zinn® plugin polls for updates.

Све public крајње тачке

Сва документација за програмере →

Аутентификација

Пошаљите API кључ као bearer токен. Ова крајња тачка не наводи конкретну дозволу у спецификацији, па свом кључу доделите најмања неопходна овлашћења и проверите одговор уместо да претпостављате.

Ова крајња тачка не прихвата id организације. Ваш кључ већ идентификује организацију којој припада, а одговор је ограничен на њу.

Испробајте

Замените све што је у угластим заградама сопственим вредностима, а чувар места кључа кључем са своје контролне табле.

curl -X POST https://api.zinndigital.com/v1/wp/plugin-update/{siteId} \
  -H "Authorization: Bearer zdk_live_…" \
  -H "Content-Type: application/json" \
  -d '{ "slug": <string>, "version": <string> }'

Пријављени сте? API конзола на вашој контролној табли попуњава ваш прави id организације и ваш сопствени кључ, и покреће захтев према живом API-ју како бисте могли да видите стварни одговор. Отворите ову крајњу тачку у API конзоли

Детаљи

The WordPress self-hosted update endpoint. It is called by the plugin, not by a person: wp/plugins/*/includes/class-updater.php posts here on WordPress's own update schedule and turns the answer into the ordinary "update available" notice. Authenticated by the site's own secret, never by a bearer token — the caller is a WordPress site, not a principal. The request carries X-Zinn-Cache-Signature: sha256=HMAC(timestamp + "\n" + body) keyed with that site's ZINN_UPDATE_SECRET, and the response is signed the same way in X-Zinn-Signature so a site can prove the answer came from us before installing anything. ⛔ A version staff HALTED (POST /v1/admin/plugin-updates/halts) is never offered here: the answer is the newest offered release that is not halted, or 204 when none is (PF-445). ⛔ A site already on the current version gets 204, not a 200 describing the version it has: the updater re-fetches and re-verifies a package whenever it is offered one. Anything unauthenticated, stale or unknown is a 404 — never a 401, so this cannot become an oracle for which site ids exist.

Параметри

НазивТипОбавезноШта је ово
siteId (path)UuidДаSite ID (UUIDv7).

Тело захтева

НазивТипОбавезноШта је ово
slugstringДаThe plugin asking
versionstringДаThe version currently installed.
sitestringНеThe site's own home URL

Одговор

НазивТипОбавезноШта је ово
versionstringДа—
packagestringДаWhere to fetch the archive. Always HTTPS on our own hostname — the updater refuses any other host, which is what stops a forged descriptor pointing a site at somebody else's zip.
package_sha256stringДа—
testedstringНе—
requiresstringНе—
requires_phpstringНе—
changelogstringНе—
homepagestringНе—

Грешке које ова крајња тачка може вратити

404 · 429