curl --request POST \
--url https://my.server.express/api/v1/cloud/{id}/plan \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"plan": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({plan: '<string>'})
};
fetch('https://my.server.express/api/v1/cloud/{id}/plan', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://my.server.express/api/v1/cloud/{id}/plan"
payload = { "plan": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"success": true,
"data": {
"direction": "upgrade",
"dueNowMinor": 123,
"creditMinor": 123,
"extraDays": 123,
"newMonthlyMinor": 123,
"oldMonthlyMinor": 123,
"applied": true,
"newRenewalDate": "2023-11-07T05:31:56Z",
"reinstallRequired": true
}
}{
"success": false,
"error": "<string>"
}{
"success": false,
"error": "<string>"
}{
"success": false,
"error": "<string>"
}{
"success": false,
"error": "<string>"
}{
"success": false,
"error": "<string>"
}{
"success": false,
"error": "<string>"
}{
"success": false,
"error": "<string>"
}Change plan
Moves the server to another plan on the same hardware. Upgrades with something to pay raise an UNPAID invoice (due in
7 days) for the prorated difference and land when it’s paid — applied: false. Downgrades, sideways moves and zero-cost
upgrades apply immediately and pay unused value back as extra days on the renewal date — applied: true. When the
target plan’s disk is smaller you must send diskStrategy: keep carries the extra disk as a paid customisation,
reinstall rebuilds at the smaller size and loses the data. Session auth only; owner or team ADMIN.
409 when it’s the current plan, another change or upgrade is unpaid, a disk decision is needed (data.needsDiskDecision
and data.disk are returned), or extra disk can’t be sold on this hardware. 503 if the plan can’t be priced in the
service currency. Writes an ORDER_CLOUD_PLAN_CHANGE audit entry when an invoice is raised.
curl --request POST \
--url https://my.server.express/api/v1/cloud/{id}/plan \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"plan": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({plan: '<string>'})
};
fetch('https://my.server.express/api/v1/cloud/{id}/plan', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://my.server.express/api/v1/cloud/{id}/plan"
payload = { "plan": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"success": true,
"data": {
"direction": "upgrade",
"dueNowMinor": 123,
"creditMinor": 123,
"extraDays": 123,
"newMonthlyMinor": 123,
"oldMonthlyMinor": 123,
"applied": true,
"newRenewalDate": "2023-11-07T05:31:56Z",
"reinstallRequired": true
}
}{
"success": false,
"error": "<string>"
}{
"success": false,
"error": "<string>"
}{
"success": false,
"error": "<string>"
}{
"success": false,
"error": "<string>"
}{
"success": false,
"error": "<string>"
}{
"success": false,
"error": "<string>"
}{
"success": false,
"error": "<string>"
}Authorizations
Session access token (JWT) from POST /v1/auth/login or /v1/auth/refresh. A session satisfies every API scope.
Path Parameters
Service id of the cloud server.