API Reference
REST API for programmatic access to ServersCamp infrastructure. Manage VMs, storage, networks, and more.
Overview
The ServersCamp API is a RESTful API that allows you to manage your cloud infrastructure programmatically.
Base URL
URL
https://platform.serverscamp.com/api/v1
Request Format
All requests should include:
Content-Type: application/jsonfor requests with bodyAuthorization: Bearer <token>header
Response Format
All responses are JSON. Successful responses return the requested data directly. Errors return an object with detail field.
Authentication
All API requests require authentication using an API token. Tokens are prefixed with sc_.
Getting an API Token
Generate API tokens in the Platform Settings.
Using Your Token
Include the token in the Authorization header:
cURL
curl -X GET "https://platform.serverscamp.com/api/v1/vms" \
-H "Authorization: Bearer sc_your_token_here"
Python
import requests
API_TOKEN = "sc_your_token_here"
BASE_URL = "https://platform.serverscamp.com/api/v1"
headers = {"Authorization": f"Bearer {API_TOKEN}"}
response = requests.get(f"{BASE_URL}/vms", headers=headers)
vms = response.json()
Error Handling
The API uses standard HTTP status codes:
| Code | Meaning |
|---|---|
200 | Success |
201 | Created |
400 | Bad Request — Invalid parameters |
401 | Unauthorized — Invalid or missing token |
403 | Forbidden — Insufficient permissions |
404 | Not Found — Resource doesn't exist |
422 | Validation Error — Check request body |
500 | Server Error — Contact support |
Error Response
JSON
{"detail": "VM not found"}
Virtual Machines
Create and manage virtual machine instances.
List VMs
GET
/vms
cURL
curl -X GET "https://platform.serverscamp.com/api/v1/vms" \
-H "Authorization: Bearer $API_TOKEN"
Response
JSON
[
{
"uuid": "06837545-c878-443b-a114-ddab3b8c6e90",
"display_name": "web-server-01",
"state": "running",
"vm_class": {"name": "burst-xs", "cpu_cores": 1, "ram_mb": 1024},
"disk_gb": 20,
"internal_ip": "172.31.106.70",
"public_ipv4": "194.110.174.102"
}
]
Create VM
POST
/vms
| Parameter | Type | Description |
|---|---|---|
display_name | string | Optional. Human-readable name |
vm_class_id | string | Required. VM class (CPU/RAM config) |
vm_template_id | string | Required. OS template ID |
storage_class_id | string | Required. Storage performance tier |
network_class_id | string | Required. Network speed tier |
network_uuid | string | Required. VPC network UUID |
disk_gb | integer | Required. Disk size in GB |
ssh_key_id | string | Optional. SSH key for access |
assign_public_ips | boolean | Optional. Assign public IPv4/IPv6 |
cURL
curl -X POST "https://platform.serverscamp.com/api/v1/vms" \
-H "Authorization: Bearer $API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"display_name": "web-server",
"vm_class_id": "burst-xs",
"vm_template_id": "ubuntu-25.04",
"storage_class_id": "standard-storage",
"network_class_id": "baseline-network",
"network_uuid": "net-abc123",
"disk_gb": 20,
"ssh_key_id": "key-xyz789",
"assign_public_ips": true
}'
Get VM Details
GET
/vms/{vm_uuid}
Delete VM
DELETE
/vms/{vm_uuid}
VM Actions
POST
/vms/{vm_uuid}/actions/{action}
Available actions: start, stop, reboot, reset
VPCs & Networking
List Networks
GET
/networks
Create Network
POST
/networks
| Parameter | Type | Description |
|---|---|---|
display_name | string | Optional. Network name |
cidr | string | Required. IP range (e.g., 10.0.0.0/24) |
List Routers
GET
/routers
Create Router
POST
/routers
Attach Network to Router
POST
/routers/{router_uuid}/networks/{network_uuid}
Databases
List Databases
GET
/databases
Create Database
POST
/databases
| Parameter | Type | Description |
|---|---|---|
display_name | string | Optional. Database name |
engine | string | Required. postgresql, mysql, or redis |
version | string | Optional. Engine version |
size | string | Required. Instance size |
Storage
List Buckets
GET
/buckets
Create Bucket
POST
/buckets
| Parameter | Type | Description |
|---|---|---|
name | string | Required. Globally unique bucket name |
Get Bucket Credentials
GET
/buckets/{bucket_name}/credentials
Response
JSON
{
"endpoint": "s3.serverscamp.net",
"access_key_id": "AKIAIOSFODNN7EXAMPLE",
"secret_access_key": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY"
}
SSH Keys
List SSH Keys
GET
/ssh-keys
Create SSH Key
POST
/ssh-keys
| Parameter | Type | Description |
|---|---|---|
name | string | Required. Key name |
public_key | string | Required. SSH public key content |
Delete SSH Key
DELETE
/ssh-keys/{key_id}
Resource Classes
List VM Classes
GET
/vm-classes
List Storage Classes
GET
/storage-classes
List Network Classes
GET
/network-classes
List OS Templates
GET
/vm-templates