Update a Server
curl --request PATCH \
--url https://api.arct.cloud/v1/servers/{server_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"hostname": "<string>",
"delete_protection": true,
"labels": [
"<string>"
]
}
'import requests
url = "https://api.arct.cloud/v1/servers/{server_id}"
payload = {
"hostname": "<string>",
"delete_protection": True,
"labels": ["<string>"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({hostname: '<string>', delete_protection: true, labels: ['<string>']})
};
fetch('https://api.arct.cloud/v1/servers/{server_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"hostname": "<string>",
"status": "provisioning",
"location": "<string>",
"plan": "<string>",
"plan_name": "<string>",
"cpu_cores": 123,
"ram_gb": 123,
"storage_gb": 123,
"bandwidth_tb": 123,
"ipv4": "<string>",
"ipv6": "<string>",
"os": "<string>",
"login_user": "<string>",
"labels": [
"<string>"
],
"delete_protection": true,
"billing_period": "<string>",
"price": 123,
"next_due_date": "2023-12-25",
"cancel_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z"
}{
"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
Update a Server
Changes the hostname, delete protection or labels. Omitted fields keep their value.
PATCH
/
servers
/
{server_id}
Update a Server
curl --request PATCH \
--url https://api.arct.cloud/v1/servers/{server_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"hostname": "<string>",
"delete_protection": true,
"labels": [
"<string>"
]
}
'import requests
url = "https://api.arct.cloud/v1/servers/{server_id}"
payload = {
"hostname": "<string>",
"delete_protection": True,
"labels": ["<string>"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({hostname: '<string>', delete_protection: true, labels: ['<string>']})
};
fetch('https://api.arct.cloud/v1/servers/{server_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"hostname": "<string>",
"status": "provisioning",
"location": "<string>",
"plan": "<string>",
"plan_name": "<string>",
"cpu_cores": 123,
"ram_gb": 123,
"storage_gb": 123,
"bandwidth_tb": 123,
"ipv4": "<string>",
"ipv6": "<string>",
"os": "<string>",
"login_user": "<string>",
"labels": [
"<string>"
],
"delete_protection": true,
"billing_period": "<string>",
"price": 123,
"next_due_date": "2023-12-25",
"cancel_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z"
}{
"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
Send at least one field.
Name shown in Arct. The OS hostname changes only on reinstall.
Required string length:
1 - 63Pattern:
^[a-zA-Z0-9]([a-zA-Z0-9-]*[a-zA-Z0-9])?$Replaces all labels: up to 10, each 1 to 63 letters, digits or -, starting with a letter or digit. Stored lowercase.
Maximum array length:
100Maximum string length:
63Response
Successful Response
VM status enumeration.
Available options:
provisioning, running, stopped, restarting, reinstalling, restoring, error, deleting, suspended, pre_order Location code, such as fra.
Plan slug.
Null until the server is set up.
IPv6 address, or null if none is assigned.
OS user to sign in as. Null in list responses.
True blocks DELETE.
monthly, quarterly, semi_annual or yearly.
Price per billing period, in USD.
Next renewal date.
Date a scheduled cancellation takes effect, or null if none.