Skip to content

VPS API

Virtual Private Servers

Base URL: https://api.wayscloud.services

Endpoints

MethodPathDescription
GET/v1/vpsList VPS
POST/v1/vpsCreate VPS
GET/v1/vps/plans/List plans
GET/v1/vps/os-templatesList OS templates
GET/v1/vps/regionsList regions
GET/v1/vps/{vps_id}Get VPS
GET/v1/vps/{vps_id}/statusGet status
POST/v1/vps/{vps_id}/startStart VPS
POST/v1/vps/{vps_id}/stopStop VPS
POST/v1/vps/{vps_id}/rebootReboot VPS
GET/v1/vps/{vps_id}/snapshotsList snapshots
POST/v1/vps/{vps_id}/snapshotsCreate snapshot
DELETE/v1/vps/{vps_id}/snapshots/{snapshot_name}Delete snapshot
POST/v1/vps/{vps_id}/snapshots/{snapshot_name}/rollbackRollback to snapshot
GET/v1/vps/{vps_id}/backupsList backups
POST/v1/vps/{vps_id}/backupsTrigger manual backup
DELETE/v1/vps/{vps_id}/backups/{backup_id}Delete backup
POST/v1/vps/{vps_id}/backups/{backup_id}/restoreRestore from backup
GET/v1/vps/{vps_id}/backups/{backup_id}/downloadDownload backup
GET/v1/vps/{vps_id}/backup-policyGet backup policy
PUT/v1/vps/{vps_id}/backup-policySet backup policy
GET/v1/vps/{vps_id}/backup-usageBackup storage usage

GET /v1/vps

List VPS

Get all VPS instances with hostname, IP addresses, power state, and resource allocation.

Response:

FieldTypeDescription
instancesarray
totalinteger

Example:

bash
curl https://api.wayscloud.services/v1/vps \
  -H "X-API-Key: wayscloud_vps_abc12_YOUR_SECRET"

Response:

json
{
  "instances": [
    {
      "id": "b5c6d7e8-f9a0-1234-5678-90abcdef1234",
      "hostname": "web01.example.com",
      "display_name": "Production Web Server",
      "status": "running",
      "ipv4_address": "185.35.202.45"
    },
    {
      "id": "c6d7e8f9-a0b1-2345-6789-0abcdef12345",
      "hostname": "db01.example.com",
      "display_name": "Database Server",
      "status": "running",
      "ipv4_address": "185.35.202.46"
    }
  ],
  "total": 2
}

POST /v1/vps

Create VPS

Provision a new VPS. Takes 1-3 minutes. Include SSH keys for passwordless access.

Request Body:

FieldTypeDescription
hostnamestringRequired. Server hostname (FQDN recommended)
plan_codestringRequired. VPS plan code (from /v1/vps/plans)
regionstringRequired. Datacenter region (see GET /v1/vps/regions for available options)
os_templatestringRequired. Operating system template (from /v1/vps/os-templates)
display_namestringUser-friendly name for dashboard display
ssh_keysarraySSH public keys for server access (recommended)

Response:

FieldTypeDescription
idstringVPS instance ID
hostnamestring
statusstringValues: provisioning, running
ipv4stringPrimary IPv4 address
ipv6stringPrimary IPv6 address

Example:

bash
curl -X POST https://api.wayscloud.services/v1/vps \
  -H "X-API-Key: wayscloud_vps_abc12_YOUR_SECRET" \
  -H "Content-Type: application/json" \
  -d '{
  "hostname": "web01.example.com",
  "plan_code": "vps-4gb-2cpu",
  "region": "oslo",
  "os_template": "ubuntu-22.04",
  "display_name": "Production Web Server",
  "ssh_keys": [
    "ssh-ed25519 AAAA... user@laptop"
  ]
}'

Response:

json
{
  "id": "b5c6d7e8-f9a0-1234-5678-90abcdef1234",
  "hostname": "web01.example.com",
  "status": "provisioning",
  "ipv4": "185.35.202.45",
  "ipv6": "2a01:4f9:c010:1234::1"
}

GET /v1/vps/plans/

List plans

Get available VPS configurations with vCPU, RAM, storage, bandwidth, and pricing.

Response example:

json
[
  {
    "plan_code": "vps-2gb-1cpu",
    "name": "2 GB RAM, 1 vCPU",
    "vcpus": 1,
    "ram_gb": 2,
    "storage_gb": 40,
    "bandwidth_tb": 2.0,
    "price": 99.0,
    "currency": "NOK"
  },
  {
    "plan_code": "vps-4gb-2cpu",
    "name": "4 GB RAM, 2 vCPU",
    "vcpus": 2,
    "ram_gb": 4,
    "storage_gb": 80,
    "bandwidth_tb": 4.0,
    "price": 199.0,
    "currency": "NOK"
  },
  {
    "plan_code": "vps-8gb-4cpu",
    "name": "8 GB RAM, 4 vCPU",
    "vcpus": 4,
    "ram_gb": 8,
    "storage_gb": 160,
    "bandwidth_tb": 8.0,
    "price": 399.0,
    "currency": "NOK"
  }
]

Example:

bash
curl https://api.wayscloud.services/v1/vps/plans/ \
  -H "X-API-Key: wayscloud_vps_abc12_YOUR_SECRET"

Response:

json
[
  {
    "plan_code": "vps-2gb-1cpu",
    "name": "2 GB RAM, 1 vCPU",
    "vcpus": 1,
    "ram_gb": 2,
    "storage_gb": 40,
    "bandwidth_tb": 2.0,
    "price": 99.0,
    "currency": "NOK"
  },
  {
    "plan_code": "vps-4gb-2cpu",
    "name": "4 GB RAM, 2 vCPU",
    "vcpus": 2,
    "ram_gb": 4,
    "storage_gb": 80,
    "bandwidth_tb": 4.0,
    "price": 199.0,
    "currency": "NOK"
  },
  {
    "plan_code": "vps-8gb-4cpu",
    "name": "8 GB RAM, 4 vCPU",
    "vcpus": 4,
    "ram_gb": 8,
    "storage_gb": 160,
    "bandwidth_tb": 8.0,
    "price": 399.0,
    "currency": "NOK"
  }
]

GET /v1/vps/os-templates

List OS templates

Get available operating systems for VPS provisioning: Ubuntu, Debian, Rocky, AlmaLinux, and Windows Server.

Response example:

json
[
  {
    "id": "ubuntu-24.04",
    "name": "Ubuntu 24.04 LTS",
    "family": "ubuntu",
    "version": "24.04",
    "is_windows": false
  },
  {
    "id": "debian-12",
    "name": "Debian 12",
    "family": "debian",
    "version": "12",
    "is_windows": false
  },
  {
    "id": "rocky-9",
    "name": "Rocky Linux 9",
    "family": "rocky",
    "version": "9",
    "is_windows": false
  },
  {
    "id": "windows-server-2025",
    "name": "Windows Server 2025",
    "family": "windows",
    "version": "2025",
    "is_windows": true
  }
]

Example:

bash
curl https://api.wayscloud.services/v1/vps/os-templates \
  -H "X-API-Key: wayscloud_vps_abc12_YOUR_SECRET"

Response:

json
[
  {
    "id": "ubuntu-24.04",
    "name": "Ubuntu 24.04 LTS",
    "family": "ubuntu",
    "version": "24.04",
    "is_windows": false
  },
  {
    "id": "debian-12",
    "name": "Debian 12",
    "family": "debian",
    "version": "12",
    "is_windows": false
  },
  {
    "id": "rocky-9",
    "name": "Rocky Linux 9",
    "family": "rocky",
    "version": "9",
    "is_windows": false
  },
  {
    "id": "windows-server-2025",
    "name": "Windows Server 2025",
    "family": "windows",
    "version": "2025",
    "is_windows": true
  }
]

GET /v1/vps/regions

List regions

Get available datacenter regions. Choose the region closest to your users for best latency.

Response example:

json
[
  {
    "id": "oslo",
    "name": "Oslo, Norway",
    "country": "NO",
    "available": true
  },
  {
    "id": "stockholm",
    "name": "Stockholm, Sweden",
    "country": "SE",
    "available": true
  },
  {
    "id": "frankfurt",
    "name": "Frankfurt, Germany",
    "country": "DE",
    "available": true
  }
]

Example:

bash
curl https://api.wayscloud.services/v1/vps/regions \
  -H "X-API-Key: wayscloud_vps_abc12_YOUR_SECRET"

Response:

json
[
  {
    "id": "oslo",
    "name": "Oslo, Norway",
    "country": "NO",
    "available": true
  },
  {
    "id": "stockholm",
    "name": "Stockholm, Sweden",
    "country": "SE",
    "available": true
  },
  {
    "id": "frankfurt",
    "name": "Frankfurt, Germany",
    "country": "DE",
    "available": true
  }
]

GET /v1/vps/

Get VPS

Get complete VPS details: hostname, IP addresses, OS, plan, and configuration.

Response:

FieldTypeDescription
idstring
hostnamestring
display_namestring
statusstringValues: running, stopped, starting, stopping, provisioning
plan_codestring
regionstring
os_templatestring
ipv4_addressstring
ipv6_addressstring
vcpusinteger
memory_gbinteger
disk_gbinteger
created_atstring

Example:

bash
curl https://api.wayscloud.services/v1/vps/{vps_id} \
  -H "X-API-Key: wayscloud_vps_abc12_YOUR_SECRET"

Response:

json
{
  "id": "b5c6d7e8-f9a0-1234-5678-90abcdef1234",
  "hostname": "web01.example.com",
  "display_name": "Production Web Server",
  "status": "running",
  "plan_code": "vps-4gb-2cpu",
  "region": "oslo",
  "os_template": "ubuntu-22.04",
  "ipv4_address": "185.35.202.45",
  "ipv6_address": "2a01:4f9:c010:1234::1",
  "vcpus": 2,
  "memory_gb": 4,
  "disk_gb": 80,
  "created_at": "2024-02-15T14:30:00Z"
}

GET /v1/vps/{vps_id}/status

Get status

Check power state (running/stopped), uptime, and health indicators.

Response:

FieldTypeDescription
statusstring
uptime_secondsinteger
cpu_usage_percentnumber
memory_usage_percentnumber
disk_usage_percentnumber
network_in_bytesinteger
network_out_bytesinteger

Example:

bash
curl https://api.wayscloud.services/v1/vps/{vps_id}/status \
  -H "X-API-Key: wayscloud_vps_abc12_YOUR_SECRET"

Response:

json
{
  "status": "running",
  "uptime_seconds": 2592000,
  "cpu_usage_percent": 12.5,
  "memory_usage_percent": 68.3,
  "disk_usage_percent": 42.1,
  "network_in_bytes": 157286400,
  "network_out_bytes": 52428800
}

POST /v1/vps/{vps_id}/start

Start VPS

Power on a stopped VPS. Accessible within 30-60 seconds.

Response:

FieldTypeDescription
successboolean
actionstring
messagestring

Example:

bash
curl -X POST https://api.wayscloud.services/v1/vps/{vps_id}/start \
  -H "X-API-Key: wayscloud_vps_abc12_YOUR_SECRET"

Response:

json
{
  "success": true,
  "action": "start",
  "message": "VPS is starting"
}

POST /v1/vps/{vps_id}/stop

Stop VPS

Gracefully shut down a running VPS. Stopped VPS still incurs storage costs.

Response:

FieldTypeDescription
successboolean
actionstring
messagestring

Example:

bash
curl -X POST https://api.wayscloud.services/v1/vps/{vps_id}/stop \
  -H "X-API-Key: wayscloud_vps_abc12_YOUR_SECRET"

Response:

json
{
  "success": true,
  "action": "start",
  "message": "VPS is starting"
}

POST /v1/vps/{vps_id}/reboot

Reboot VPS

Graceful reboot. Back online within 1-2 minutes.

Response:

FieldTypeDescription
successboolean
actionstring
messagestring

Example:

bash
curl -X POST https://api.wayscloud.services/v1/vps/{vps_id}/reboot \
  -H "X-API-Key: wayscloud_vps_abc12_YOUR_SECRET"

Response:

json
{
  "success": true,
  "action": "start",
  "message": "VPS is starting"
}



Snapshots

Point-in-time snapshots of the VPS disk. Stored on the same hypervisor node. Maximum 10 snapshots per VPS. The VPS must be stopped before creating or rolling back a snapshot.

GET /v1/vps/{vps_id}/snapshots

List snapshots

Example:

bash
curl https://api.wayscloud.services/v1/vps/{vps_id}/snapshots \
  -H "X-API-Key: wayscloud_vps_abc12_YOUR_SECRET"

Response:

json
{
  "snapshots": [
    {
      "name": "before-upgrade",
      "description": "Snapshot before OS upgrade",
      "created_at": "2026-04-01T10:30:00Z",
      "size_bytes": 2147483648
    }
  ],
  "total": 1,
  "max_snapshots": 10
}

POST /v1/vps/{vps_id}/snapshots

Create snapshot

Create a point-in-time snapshot of the VPS disk. Names are sanitized to alphanumeric characters and underscores.

Request Body:

FieldTypeDescription
namestringRequired. Snapshot name (alphanumeric + underscore)
descriptionstringOptional description

Example:

bash
curl -X POST https://api.wayscloud.services/v1/vps/{vps_id}/snapshots \
  -H "X-API-Key: wayscloud_vps_abc12_YOUR_SECRET" \
  -H "Content-Type: application/json" \
  -d '{"name": "before-upgrade", "description": "Snapshot before OS upgrade"}'

Response:

json
{
  "status": "created",
  "snapshot_name": "before-upgrade"
}

DELETE /v1/vps/{vps_id}/snapshots/

Delete snapshot

Permanently delete a snapshot from the hypervisor. This action cannot be undone.

Example:

bash
curl -X DELETE https://api.wayscloud.services/v1/vps/{vps_id}/snapshots/before-upgrade \
  -H "X-API-Key: wayscloud_vps_abc12_YOUR_SECRET"

Response:

json
{
  "status": "deleted",
  "snapshot_name": "before-upgrade"
}

POST /v1/vps/{vps_id}/snapshots/{snapshot_name}/rollback

Rollback to snapshot

Destructive operation. Reverts the VPS disk to a previous snapshot state. All data written after the snapshot was taken will be permanently lost.

The VPS must be stopped before rollback. Use POST /v1/vps/{vps_id}/stop first if the VPS is running.

Example:

bash
curl -X POST https://api.wayscloud.services/v1/vps/{vps_id}/snapshots/before-upgrade/rollback \
  -H "X-API-Key: wayscloud_vps_abc12_YOUR_SECRET"

Response:

json
{
  "status": "rolling_back",
  "snapshot_name": "before-upgrade",
  "message": "VPS disk is being reverted to snapshot state"
}

Backups

Off-site backups stored in secure cloud storage, separate from the VPS server. Unlike snapshots, backups survive hardware failure.

GET /v1/vps/{vps_id}/backups

List backups

Get all off-site backups for a VPS, including automatic and manual backups. Each backup includes status, size, and expiration date.

Example:

bash
curl https://api.wayscloud.services/v1/vps/{vps_id}/backups \
  -H "X-API-Key: wayscloud_vps_abc12_YOUR_SECRET"

Response:

json
{
  "backups": [
    {
      "id": "bk-a1b2c3d4",
      "type": "automatic",
      "status": "completed",
      "size_bytes": 4294967296,
      "created_at": "2026-04-03T02:00:00Z",
      "expires_at": "2026-04-17T02:00:00Z"
    }
  ],
  "total": 1
}

POST /v1/vps/{vps_id}/backups

Trigger manual backup

Start an immediate off-site backup. The backup runs asynchronously — poll GET /v1/vps/{vps_id}/backups to check progress. Manual backups follow the same retention policy as automatic backups.

Example:

bash
curl -X POST https://api.wayscloud.services/v1/vps/{vps_id}/backups \
  -H "X-API-Key: wayscloud_vps_abc12_YOUR_SECRET"

Response:

json
{
  "status": "started",
  "backup_id": "bk-e5f6g7h8"
}

DELETE /v1/vps/{vps_id}/backups/

Delete backup

Permanently delete a backup from off-site storage. This action cannot be undone.

Example:

bash
curl -X DELETE https://api.wayscloud.services/v1/vps/{vps_id}/backups/bk-a1b2c3d4 \
  -H "X-API-Key: wayscloud_vps_abc12_YOUR_SECRET"

Response:

json
{
  "status": "deleted",
  "backup_id": "bk-a1b2c3d4"
}

POST /v1/vps/{vps_id}/backups/{backup_id}/restore

Restore from backup

Destructive operation. The current VPS disk will be completely replaced with backup data. All changes made after the backup was created will be permanently lost.

The VPS must be stopped before restore. Use POST /v1/vps/{vps_id}/stop first if the VPS is running.

Example:

bash
curl -X POST https://api.wayscloud.services/v1/vps/{vps_id}/backups/bk-a1b2c3d4/restore \
  -H "X-API-Key: wayscloud_vps_abc12_YOUR_SECRET"

Response:

json
{
  "status": "restoring",
  "backup_id": "bk-a1b2c3d4",
  "message": "VPS disk is being restored from backup"
}

GET /v1/vps/{vps_id}/backups/{backup_id}/download

Download backup

Get a time-limited presigned download URL. The URL is valid for 1 hour and can be used to download the backup image directly.

Example:

bash
curl https://api.wayscloud.services/v1/vps/{vps_id}/backups/bk-a1b2c3d4/download \
  -H "X-API-Key: wayscloud_vps_abc12_YOUR_SECRET"

Response:

json
{
  "download_url": "https://storage.wayscloud.services/...",
  "expires_at": "2026-04-03T16:30:00Z",
  "size_bytes": 4294967296
}

GET /v1/vps/{vps_id}/backup-policy

Get backup policy

Get the current automatic backup configuration for a VPS, including schedule, frequency, and retention period.

Response:

json
{
  "enabled": true,
  "frequency": "daily",
  "time": "02:00",
  "retention_days": 14
}

PUT /v1/vps/{vps_id}/backup-policy

Set backup policy

Configure or update the automatic off-site backup schedule. Backups are stored in secure cloud storage, separate from the VPS host. Set enabled to false to disable automatic backups.

Request Body:

FieldTypeDescription
enabledbooleanEnable or disable automatic backups
frequencystringdaily or weekly
day_of_weekstringDay for weekly backups (e.g. monday)
timestringTime in UTC (e.g. 02:00)
retention_daysintegerHow long to keep backups (7, 14, or 30)

Example:

bash
curl -X PUT https://api.wayscloud.services/v1/vps/{vps_id}/backup-policy \
  -H "X-API-Key: wayscloud_vps_abc12_YOUR_SECRET" \
  -H "Content-Type: application/json" \
  -d '{"enabled": true, "frequency": "daily", "time": "02:00", "retention_days": 14}'

GET /v1/vps/{vps_id}/backup-usage

Backup storage usage

Get the total off-site backup storage consumed by this VPS, including count and total size across all retained backups.

Response:

json
{
  "total_backups": 5,
  "total_size_bytes": 21474836480,
  "total_size_human": "20.0 GB"
}

WAYSCloud AS