VPS API: backups and firewall
List, create, restore and delete backups, and manage the firewall rules of your servers through the Sitequest REST API.
List, create, restore and delete backups, and manage the firewall rules of your servers through the Sitequest REST API.
Returns all existing backups for a VPS.
Required scope: vps:manage
| Parameter | Type | Description |
|---|---|---|
id |
string | The VPS ID |
| Header | Required | Value |
|---|---|---|
Authorization |
Yes | Bearer YOUR_API_KEY |
{
"data": [
{
"backupId": "backup_abc123",
"os": "Ubuntu 22.04",
"description": "Daily backup",
"label": "Before update",
"size": 5368709120,
"created": "2026-03-27T02:00:00Z",
"status": "finished"
}
]
}
| Field | Type | Description |
|---|---|---|
backupId |
string | Unique backup identifier |
os |
string | Operating system at time of backup |
description |
string | Backup description |
label |
string | null | User-defined label, or null if not set |
size |
integer | Backup size in bytes |
created |
string | ISO 8601 creation timestamp |
status |
string | finished or pending |
| Status | Code | Description |
|---|---|---|
| 404 | NOT_FOUND |
VPS not found or not accessible |
curl "https://site.quest/api/v1/vps/699cdea2ab57a244bb5273fd/backups" \
-H "Authorization: Bearer YOUR_API_KEY"
This data is also available via the list_backups MCP tool.
Creates a new backup of the VPS. The backup process runs asynchronously.
Required scope: vps:manage
| Parameter | Type | Description |
|---|---|---|
id |
string | The VPS ID |
| Header | Required | Value |
|---|---|---|
Authorization |
Yes | Bearer YOUR_API_KEY |
Content-Type |
Yes | application/json |
| Field | Type | Description |
|---|---|---|
label |
string | Optional label for the backup (max 100 characters) |
{
"label": "Before update"
}
{
"data": {
"backupId": "backup_def456",
"label": "Before update",
"success": true
}
}
| Status | Code | Description |
|---|---|---|
| 404 | NOT_FOUND |
VPS not found or not accessible |
| 409 | NO_SLOTS |
No backup slots available |
| 502 | PROVIDER_ERROR |
Upstream provider error |
curl -X POST "https://site.quest/api/v1/vps/699cdea2ab57a244bb5273fd/backups" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"label": "Before update"}'
This action is also available via the create_backup MCP tool.
Restore a VPS from a specific backup. This will overwrite the current state of the VPS.
Required scope: vps:manage
| Parameter | Type | Description |
|---|---|---|
id |
string | The VPS ID |
backupId |
string | The backup ID to restore from |
| Header | Required | Value |
|---|---|---|
Authorization |
Yes | Bearer YOUR_API_KEY |
No request body is required.
{
"data": {
"backupId": "backup_abc123",
"success": true
}
}
| Status | Code | Description |
|---|---|---|
| 400 | INVALID_BACKUP_ID |
Backup ID is missing or invalid |
| 404 | NOT_FOUND |
VPS not found or not accessible |
| 502 | PROVIDER_ERROR |
Upstream provider error |
curl -X POST "https://site.quest/api/v1/vps/699cdea2ab57a244bb5273fd/backups/backup_abc123" \
-H "Authorization: Bearer YOUR_API_KEY"
This action is also available via the restore_backup MCP tool.
Permanently delete a backup.
Required scope: vps:manage
| Parameter | Type | Description |
|---|---|---|
id |
string | The VPS ID |
backupId |
string | The backup ID to delete |
| Header | Required | Value |
|---|---|---|
Authorization |
Yes | Bearer YOUR_API_KEY |
{
"data": {
"backupId": "backup_abc123",
"success": true
}
}
| Status | Code | Description |
|---|---|---|
| 400 | INVALID_BACKUP_ID |
Backup ID is missing or invalid |
| 404 | NOT_FOUND |
VPS not found or not accessible |
| 502 | PROVIDER_ERROR |
Upstream provider error |
curl -X DELETE "https://site.quest/api/v1/vps/699cdea2ab57a244bb5273fd/backups/backup_abc123" \
-H "Authorization: Bearer YOUR_API_KEY"
This action is also available via the delete_backup MCP tool.
Returns the current firewall status and all rules for a VPS. Firewall management is performed via SSH (supports ufw and firewalld).
Required scope: vps:manage
| Parameter | Type | Description |
|---|---|---|
id |
string | The VPS ID |
| Header | Required | Value |
|---|---|---|
Authorization |
Yes | Bearer YOUR_API_KEY |
{
"data": {
"tool": "ufw",
"active": true,
"defaultIncoming": "deny",
"defaultOutgoing": "allow",
"rules": [
{
"port": "22",
"proto": "tcp",
"action": "allow",
"source": "any"
},
{
"port": "80",
"proto": "tcp",
"action": "allow",
"source": "any"
},
{
"port": "443",
"proto": "tcp",
"action": "allow",
"source": "any"
}
],
"readViaSSH": true
}
}
| Field | Type | Description |
|---|---|---|
tool |
string | Firewall tool detected (ufw, firewalld, or none) |
active |
boolean | Whether the firewall is currently active |
defaultIncoming |
string | Default policy for incoming traffic |
defaultOutgoing |
string | Default policy for outgoing traffic |
rules |
array | List of firewall rules |
rules[].port |
string | Port or port range (e.g. 80, 8000:8100) |
rules[].proto |
string | Protocol: tcp, udp, or both |
rules[].action |
string | allow or deny |
rules[].source |
string | Source IP or any |
readViaSSH |
boolean | Whether the status was read via SSH |
| Status | Code | Description |
|---|---|---|
| 404 | NOT_FOUND |
VPS not found or not accessible |
| 502 | FIREWALL_ERROR |
Firewall operation failed on the server |
curl "https://site.quest/api/v1/vps/699cdea2ab57a244bb5273fd/firewall" \
-H "Authorization: Bearer YOUR_API_KEY"
This data is also available via the get_firewall MCP tool.
Add a new firewall rule to a VPS.
Required scope: vps:manage
| Parameter | Type | Description |
|---|---|---|
id |
string | The VPS ID |
| Header | Required | Value |
|---|---|---|
Authorization |
Yes | Bearer YOUR_API_KEY |
Content-Type |
Yes | application/json |
| Field | Type | Required | Description |
|---|---|---|---|
port |
string | Yes | Port or port range (e.g. 80, 8000:8100) |
proto |
string | Yes | Protocol: tcp, udp, or both |
action |
string | Yes | allow or deny |
source |
string | No | Source IP address (default: any) |
comment |
string | No | Optional comment for the rule |
{
"port": "8080",
"proto": "tcp",
"action": "allow",
"source": "any",
"comment": "Web app"
}
{
"data": {
"port": "8080",
"proto": "tcp",
"action": "allow",
"source": "any",
"success": true
}
}
| Status | Code | Description |
|---|---|---|
| 400 | INVALID_PORT |
Port must be a non-empty string |
| 400 | INVALID_PROTO |
Protocol must be tcp, udp, or both |
| 400 | INVALID_ACTION |
Action must be allow or deny |
| 400 | INVALID_BODY |
Request body is not valid JSON |
| 404 | NOT_FOUND |
VPS not found or not accessible |
| 502 | FIREWALL_ERROR |
Firewall operation failed on the server |
curl -X POST "https://site.quest/api/v1/vps/699cdea2ab57a244bb5273fd/firewall" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"port": "8080", "proto": "tcp", "action": "allow"}'
Firewall management is also available via the manage_firewall MCP tool.
Remove a firewall rule from a VPS.
The ruleId is formatted as port-proto-action (e.g. 80-tcp-allow). For port ranges, use the full format (e.g. 8000:8100-tcp-allow).
Required scope: vps:manage
| Parameter | Type | Description |
|---|---|---|
id |
string | The VPS ID |
ruleId |
string | Rule identifier in port-proto-action format |
| Parameter | Type | Required | Description |
|---|---|---|---|
source |
string | No | Source IP of the rule (default: any) |
| Header | Required | Value |
|---|---|---|
Authorization |
Yes | Bearer YOUR_API_KEY |
{
"data": {
"port": "8080",
"proto": "tcp",
"action": "allow",
"source": "any",
"success": true
}
}
| Status | Code | Description |
|---|---|---|
| 400 | INVALID_RULE_ID |
Rule ID format is invalid |
| 404 | NOT_FOUND |
VPS not found or not accessible |
| 502 | FIREWALL_ERROR |
Firewall operation failed on the server |
curl -X DELETE "https://site.quest/api/v1/vps/699cdea2ab57a244bb5273fd/firewall/8080-tcp-allow" \
-H "Authorization: Bearer YOUR_API_KEY"
This action is also available via the manage_firewall MCP tool.
Enable or disable the firewall on a VPS.
Required scope: vps:manage
| Parameter | Type | Description |
|---|---|---|
id |
string | The VPS ID |
| Header | Required | Value |
|---|---|---|
Authorization |
Yes | Bearer YOUR_API_KEY |
Content-Type |
Yes | application/json |
| Field | Type | Required | Description |
|---|---|---|---|
enabled |
boolean | Yes | true to enable, false to disable |
{
"enabled": true
}
{
"data": {
"enabled": true,
"success": true
}
}
| Status | Code | Description |
|---|---|---|
| 400 | INVALID_BODY |
Request body is not valid JSON |
| 404 | NOT_FOUND |
VPS not found or not accessible |
| 502 | FIREWALL_ERROR |
Firewall operation failed on the server |
curl -X PUT "https://site.quest/api/v1/vps/699cdea2ab57a244bb5273fd/firewall" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"enabled": true}'
This action is also available via the manage_firewall MCP tool.