API Documentation

The Galaxy Cloud Solutions REST API lets you manage your VPS programmatically. Build deployment scripts, automate backups, integrate with CI/CD pipelines, or build your own control panel.

Introduction

The API is organized around REST. All requests and responses use JSON. The base URL for all API requests is:

https://galaxycloudsolutions.com/api/v1

Authentication

The API uses API keys for authentication. Include your API key in the Authorization header of every request:

Authorization: Bearer YOUR_API_KEY

You can generate API keys from your client portal under the REST API section. Each key can be named and revoked independently. You can have up to 10 active keys per account.

Keep your API keys secure. Do not share them in public repositories or client-side code. If a key is compromised, revoke it immediately from your portal and generate a new one.

Rate Limiting

API requests are rate limited per API key. The following headers are included in every response:

300
Requests per window
15 min
Window size
429
Status when exceeded
HeaderDescription
X-RateLimit-LimitMaximum requests per window
X-RateLimit-RemainingRequests remaining in current window
X-RateLimit-ResetUnix timestamp when window resets

Errors

The API uses standard HTTP status codes. All error responses include a JSON body:

{
  "status": "error",
  "error": {
    "code": 404,
    "message": "Server not found"
  }
}
StatusMeaning
200Success
400Bad request — check your parameters
401Unauthorized — invalid or missing API key
404Not found
429Rate limit exceeded
503Service unavailable — VM may be offline

Account

Get Account

GET /api/v1/account Requires Auth

Returns your account information.

curl -H "Authorization: Bearer YOUR_API_KEY" \
  https://galaxycloudsolutions.com/api/v1/account

Response:

{
  "status": "success",
  "data": {
    "account": {
      "id": 1,
      "email": "[email protected]",
      "first_name": "Dakota",
      "last_name": "Hopson",
      "created_at": "2026-04-19 16:25:42"
    }
  }
}

API Keys

List API Keys

GET /api/v1/account/api-keys Requires Auth

Returns all API keys on your account.

curl -H "Authorization: Bearer YOUR_API_KEY" \
  https://galaxycloudsolutions.com/api/v1/account/api-keys

Create API Key

POST /api/v1/account/api-keys Requires Auth

Creates a new API key. The full key is only shown once — save it immediately.

ParameterTypeDescription
namerequiredA label for this key (e.g. "GitHub Actions")
curl -X POST \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name": "My Deployment Script"}' \
  https://galaxycloudsolutions.com/api/v1/account/api-keys

Revoke API Key

DELETE /api/v1/account/api-keys/{id} Requires Auth

Revokes an API key. The key stops working immediately.

curl -X DELETE \
  -H "Authorization: Bearer YOUR_API_KEY" \
  https://galaxycloudsolutions.com/api/v1/account/api-keys/1

Servers

List Servers

GET /api/v1/servers Requires Auth

Returns all servers on your account with their current status.

curl -H "Authorization: Bearer YOUR_API_KEY" \
  https://galaxycloudsolutions.com/api/v1/servers

Response:

{
  "status": "success",
  "data": {
    "servers": [
      {
        "id": 102,
        "label": "vm102",
        "status": "running",
        "ip": "192.168.7.13",
        "plan": "galaxy1",
        "os": "ubuntu",
        "created_at": "2026-04-19 19:56:29"
      }
    ]
  }
}

Get Server

GET /api/v1/servers/{id} Requires Auth

Returns details for a specific server including SSH connection info.

curl -H "Authorization: Bearer YOUR_API_KEY" \
  https://galaxycloudsolutions.com/api/v1/servers/102

Response:

{
  "status": "success",
  "data": {
    "server": {
      "id": 102,
      "status": "running",
      "ip": "192.168.7.13",
      "plan": "galaxy1",
      "os": "ubuntu",
      "uptime": 86400,
      "ssh_host": "vm102.galaxycloudsolutions.com",
      "ssh_port": 2302
    }
  }
}

Get Server Stats

GET /api/v1/servers/{id}/stats Requires Auth

Returns live resource usage stats for a server.

curl -H "Authorization: Bearer YOUR_API_KEY" \
  https://galaxycloudsolutions.com/api/v1/servers/102/stats

Response:

{
  "status": "success",
  "data": {
    "stats": {
      "cpu_percent": 12.5,
      "ram_used_mb": 1024,
      "ram_total_mb": 4096,
      "ram_percent": 25.0,
      "net_in_bytes": 104857600,
      "net_out_bytes": 52428800,
      "disk_read_bytes": 209715200,
      "disk_write_bytes": 104857600,
      "uptime_seconds": 86400
    }
  }
}

Start Server

POST /api/v1/servers/{id}/start Requires Auth
curl -X POST \
  -H "Authorization: Bearer YOUR_API_KEY" \
  https://galaxycloudsolutions.com/api/v1/servers/102/start

Stop Server

POST /api/v1/servers/{id}/stop Requires Auth
curl -X POST \
  -H "Authorization: Bearer YOUR_API_KEY" \
  https://galaxycloudsolutions.com/api/v1/servers/102/stop

Reboot Server

POST /api/v1/servers/{id}/reboot Requires Auth
curl -X POST \
  -H "Authorization: Bearer YOUR_API_KEY" \
  https://galaxycloudsolutions.com/api/v1/servers/102/reboot

Reinstall OS

POST /api/v1/servers/{id}/reinstall Requires Auth

⚠️ Reinstalls the OS. All data on the server will be permanently deleted.

ParameterTypeDescription
osrequiredOS to install: ubuntu, debian, rocky, alma
curl -X POST \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"os": "ubuntu"}' \
  https://galaxycloudsolutions.com/api/v1/servers/102/reinstall

Snapshots

List Snapshots

GET /api/v1/servers/{id}/snapshots Requires Auth
curl -H "Authorization: Bearer YOUR_API_KEY" \
  https://galaxycloudsolutions.com/api/v1/servers/102/snapshots

Create Snapshot

POST /api/v1/servers/{id}/snapshots Requires Auth
ParameterTypeDescription
nameoptionalSnapshot name (alphanumeric, max 40 chars). Auto-generated if omitted.
descriptionoptionalDescription for the snapshot
curl -X POST \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name": "before-upgrade", "description": "Pre-upgrade snapshot"}' \
  https://galaxycloudsolutions.com/api/v1/servers/102/snapshots

Delete Snapshot

DELETE /api/v1/servers/{id}/snapshots/{snap_id} Requires Auth
curl -X DELETE \
  -H "Authorization: Bearer YOUR_API_KEY" \
  https://galaxycloudsolutions.com/api/v1/servers/102/snapshots/before-upgrade

Plans

List Plans

GET /api/v1/plans Public

Returns all available plans. No authentication required.

curl https://galaxycloudsolutions.com/api/v1/plans

Response:

{
  "status": "success",
  "data": {
    "plans": [
      {
        "id": "nebula1",
        "name": "Nebula 1",
        "vcpus": 1,
        "ram_mb": 1024,
        "disk_gb": 20,
        "bandwidth_gb": 500,
        "price_monthly": 5.00
      }
    ]
  }
}