public
POST /v1/wp/plugin-update/{siteId}
What an installed Zinn® plugin polls for updates.
Pagpapatotoo
Magpadala ng API key bilang bearer token. Ang endpoint na ito ay hindi naglatag ng tiyak na pahintulot sa pagtutukoy, kaya ibigay sa iyong key ang pinakamababang kailangan nito at suriin ang tugon sa halip na umasa.
Ang endpoint na ito ay hindi nangangailangan ng id ng organisasyon. Natutukoy na ng iyong key ang organisasyong kinabibilangan nito, at nakatuon ang tugon dito.
Subukan ito
Palitan ang anuman sa loob ng mga panaklong na may anggulo ng iyong sariling mga halaga, at ang placeholder ng key na may key mula sa iyong dashboard.
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> }'Nakalagda? Ang API console sa iyong dashboard ay awtomatikong naglalagay ng iyong tunay na ID ng organisasyon at sariling susi, at pinapatakbo ang kahilingan laban sa live na API upang makita mo ang aktwal na tugon. Buksan ang endpoint na ito sa console ng API
Mga Detalye
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 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.
Mga Parameter
| Pangalan | Uri | Kailangan | Ano ito |
|---|---|---|---|
siteId (path) | Uuid | Oo | Site ID (UUIDv7). |
Katawan ng kahilingan
| Pangalan | Uri | Kailangan | Ano ito |
|---|---|---|---|
slug | string | Oo | The plugin asking |
version | string | Oo | The version currently installed. |
site | string | Hindi | The site's own home URL |
Tugon
| Pangalan | Uri | Kailangan | Ano ito |
|---|---|---|---|
version | string | Oo | — |
package | string | Oo | 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_sha256 | string | Oo | — |
tested | string | Hindi | — |
requires | string | Hindi | — |
requires_php | string | Hindi | — |
changelog | string | Hindi | — |
homepage | string | Hindi | — |
Mga error na maibabalik ng endpoint na ito
404 · 429