Maintenance Admin API
Start the upgrade
POST
/api/v1/upgrade/start
Starts the run in the background and answers at once with its id. Follow it with the
progress call until its state is done or failed.
Request body application/x-www-form-urlencoded
launch_test
string
required
The id of a launch test that passed less than 30 minutes ago.
retry_of
string
The failed run this one retries.
Responses
200
The run started (
started; starting with 202 while it is being launched).
202
The run is being launched.
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.
409
An upgrade is in progress:
already_running with its run_id and progress_url, or busy.
422
Not started:
refused (with reason, e.g. no package in place), php_cli_invalid,
php_requirement_not_met, or launch_test_required (with reason).
500
launch_failed: the run could not be launched; or corrupt: its record cannot be read.
Start the upgrade
1
2
3
4
5
curl -X POST 'https://your-domain/api/v1/upgrade/start' \
-H "Accept: application/json" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
--data-urlencode 'launch_test=3b8e1f0c7a2d4e5f6a7b8c9d0e1f2a3b' \
--data-urlencode 'retry_of=c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9'
Response
{
"status": "started",
"run_id": "9f1c2b7a4e3d5c6b8a0f1e2d3c4b5a69",
"progress_url": "https://your-domain/api/v1/upgrade/progress/9f1c2b7a4e3d5c6b8a0f1e2d3c4b5a69",
"run": {
"id": "9f1c2b7a4e3d5c6b8a0f1e2d3c4b5a69",
"state": "starting",
"from_version": "4.2.0-p180",
"to_version": "4.2.0-p194",
"percent": 0
},
"log": null
}