curl --request POST \
--url https://my.server.express/api/v1/cloud/{id}/upgrade \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"cores": 0,
"ramGb": 0,
"diskGb": 0,
"ipv4": 0
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({cores: 0, ramGb: 0, diskGb: 0, ipv4: 0})
};
fetch('https://my.server.express/api/v1/cloud/{id}/upgrade', 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}/upgrade"
payload = {
"cores": 0,
"ramGb": 0,
"diskGb": 0,
"ipv4": 0
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"success": true,
"data": {
"upgradeId": "<string>",
"invoiceId": "<string>",
"invoiceNumber": "<string>",
"total": 123,
"currency": "<string>",
"monthlyFrom": 123
}
}{
"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>"
}Order a resource upgrade
Orders extra cores, RAM, disk or IPv4s. Send the absolute target extras (not a delta), so a retried request lands on the
same size. Raises an UNPAID invoice (due in 7 days) for the monthly difference prorated over the days left in the
period; the resources land when it’s paid. Values are floored to whole non-negative numbers. Session auth only; owner
or team ADMIN. 400 when a value exceeds the hardware’s ceiling or nothing is asked for. 409 when the server isn’t built,
the hardware sells no upgrades, the target equals what’s held, it would reduce anything (that needs a ticket), or
another change is unpaid. 503 when there’s no FX rate. Writes an ORDER_CLOUD_UPGRADE audit entry.
curl --request POST \
--url https://my.server.express/api/v1/cloud/{id}/upgrade \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"cores": 0,
"ramGb": 0,
"diskGb": 0,
"ipv4": 0
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({cores: 0, ramGb: 0, diskGb: 0, ipv4: 0})
};
fetch('https://my.server.express/api/v1/cloud/{id}/upgrade', 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}/upgrade"
payload = {
"cores": 0,
"ramGb": 0,
"diskGb": 0,
"ipv4": 0
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"success": true,
"data": {
"upgradeId": "<string>",
"invoiceId": "<string>",
"invoiceNumber": "<string>",
"total": 123,
"currency": "<string>",
"monthlyFrom": 123
}
}{
"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.