Resize a Server
curl --request POST \
--url https://api.arct.cloud/v1/servers/{server_id}/resize \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"plan": "<string>",
"expected_amount": 1,
"payment_method": "card"
}
'import requests
url = "https://api.arct.cloud/v1/servers/{server_id}/resize"
payload = {
"plan": "<string>",
"expected_amount": 1,
"payment_method": "card"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({plan: '<string>', expected_amount: 1, payment_method: 'card'})
};
fetch('https://api.arct.cloud/v1/servers/{server_id}/resize', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"status": "applied",
"resize_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"invoice_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"invoice_number": "<string>",
"amount": 123,
"to_plan": "<string>",
"restart_required": true
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}Servers
Resize a Server
Moves a stopped server to a bigger plan and charges the prorated difference to the server’s billing card, else your default card, or to account credit with payment_method: credit. Returns 200 when paid, 202 while the payment processes. Start the server afterwards.
POST
/
servers
/
{server_id}
/
resize
Resize a Server
curl --request POST \
--url https://api.arct.cloud/v1/servers/{server_id}/resize \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"plan": "<string>",
"expected_amount": 1,
"payment_method": "card"
}
'import requests
url = "https://api.arct.cloud/v1/servers/{server_id}/resize"
payload = {
"plan": "<string>",
"expected_amount": 1,
"payment_method": "card"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({plan: '<string>', expected_amount: 1, payment_method: 'card'})
};
fetch('https://api.arct.cloud/v1/servers/{server_id}/resize', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"status": "applied",
"resize_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"invoice_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"invoice_number": "<string>",
"amount": 123,
"to_plan": "<string>",
"restart_required": true
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}Authorizations
API token from Dashboard > Settings > API Tokens.
Path Parameters
Body
application/json
Plan slug from GET /servers/{server_id}/resize-options.
Pattern:
^[A-Za-z0-9][A-Za-z0-9_.-]{0,49}$The quoted amount_due_today; a changed price returns 409 price_changed. Omit to accept the current price.
Required range:
x >= 0card charges a saved card; credit pays from account credit and needs no card.
Available options:
card, credit Response
Successful Response
Available options:
applied, pending_payment Charged now, in USD.
True if the server must be started to use the new size.