Maintenance Admin API

Check what an upgrade would do

GET /api/v1/upgrade/preflight

The PHP command line the upgrade runs with, what the package needs of PHP, and what starting now would do.

Parameters
retry_of string query
A failed run to retry, by its id.
Responses
200 The checks and the plan.
401 The token is missing or wrong (Unauthenticated.), or its user may not act on this object (Unauthorized). Without the Accept: application/json header, a missing or wrong token answers with a redirect to the sign-in page instead.
403 The token's admin may not manage upgrades.
404 No run has this id.
Check what an upgrade would do
1 2 3
curl 'https://your-domain/api/v1/upgrade/preflight' \
  -H "Accept: application/json" \
  -H "Authorization: Bearer YOUR_API_TOKEN"
Response
{
    "php_cli": {
        "path": "/usr/bin/php8.3",
        "ok": true,
        "version": "8.3.21",
        "problem": null,
        "message": ""
    },
    "php_requirement": null,
    "plan": {
        "kind": "refused",
        "from": null,
        "to": null,
        "applied_by": null,
        "refusal": {
            "code": "no_package",
            "message": "No patch is waiting to be applied. Upload or fetch one first."
        }
    },
    "active_run": null,
    "cron_url": "https://your-domain/admin/settings/cronjob?return_to=upgrade"
}