hosting

PUT /v1/sites/{siteId}/moodle-upgrade/branch-pin

Keep a Moodle site on its installed branch, or let it follow new major versions.

All hosting endpoints

All developer docs →

Zinn®, our Viking, hammering at his anvil beside an API endpoint sending events to several listeners.

Authentication

Send an API key as a bearer token. The key must carry the sites.view permission; a key without it is refused with 403, not 404.

This endpoint takes no organisation id. Your key already identifies the organisation it belongs to, and the response is scoped to it.

Try it

Replace anything in angle brackets with your own values, and the key placeholder with a key from your dashboard.

curl -X PUT https://api.zinndigital.com/v1/sites/{siteId}/moodle-upgrade/branch-pin \
  -H "Authorization: Bearer zdk_live_…" \
  -H "Content-Type: application/json" \
  -d '{ "stay_on_branch": <boolean> }'

Signed in? The API console in your dashboard fills in your real organisation id and your own key, and runs the request against the live API so you can see the actual response. Open this endpoint in the API console

Details

stay_on_branch true offers only the installed branch's own weekly builds (security and bug fixes); a newer major is listed in blocked as BRANCH_PINNED. False follows new major versions again (plugins that do not support a release still hold it). The choice is the customer's and a later check never overwrites it; with no choice made, a site is kept on its branch automatically while a plugin would break on the newest major. 409 MOODLE_UPGRADE_REFUSED for a site that is not on our servers or not live. Requires sites.view and hosting.applications.manage.

Parameters

NameTypeRequiredWhat it is
siteId (path)UuidYesSite ID (UUIDv7).

Request body

NameTypeRequiredWhat it is
stay_on_branchbooleanYes—

Response

NameTypeRequiredWhat it is
site_idstringYes—
is_moodlebooleanYes—
branch_pinMoodleBranchPinYesWhether the site stays on its installed Moodle branch (docs/1160 §10). Following new major versions is the default; a site is kept on its branch automatically while a plugin would…
plugin_warningsMoodlePluginWarning[]YesInstalled plugins that may not work on the INSTALLED release (a warning, never a hold). key is the dashboard's moodleUpgrade.pluginWarning.<key>; reason is the English…
installedMoodleReleaseYes—
availableMoodleReleaseYesThe highest release this server can run that is newer than installed.
blockedMoodleBlockedRelease[]Yes—
can_upgradebooleanYes—
refusalMoodleRefusalYes—
checked_atstringYes—
check_pendingbooleanYes—
current_runMoodleUpgradeRunYes—
runsMoodleUpgradeRun[]YesNewest first, at most ten.

Errors this endpoint can return

401 · 403 · 404 · 409 · 422 · 429