API

API Reference

REST API documentation for tasmanian.cloud

The tasmanian.cloud API provides programmatic access to all platform services. All endpoints are RESTful and return JSON responses.

Base URL

https://api.tasmanian.cloud/v1

Authentication

All API requests require a Bearer token:

curl -H "Authorization: Bearer YOUR_API_KEY" \
  https://api.tasmanian.cloud/v1/vps

Generate API keys in the O2S Dashboard.

Rate Limits

TierRequests/minuteBurst
Free6010
Pro30050
Enterprise1000100

Rate limit headers are included in all responses:

  • X-RateLimit-Limit
  • X-RateLimit-Remaining
  • X-RateLimit-Reset

VPS

List VPS Instances

GET /vps

Response:

{
  "data": [
    {
      "id": "vps_abc123",
      "name": "my-server",
      "status": "running",
      "size": "standard-2vcpu-4gb",
      "region": "tas-1",
      "networks": ["net_xyz789"],
      "created_at": "2024-01-15T10:30:00Z"
    }
  ]
}

Create VPS

POST /vps

Request:

{
  "name": "my-server",
  "size": "standard-2vcpu-4gb",
  "image": "ubuntu-24.04",
  "ssh_keys": ["ssh_key_id"],
  "network": "net_xyz789"
}

Get VPS

GET /vps/{id}

Delete VPS

DELETE /vps/{id}

VPS Actions

POST /vps/{id}/actions

Request:

{
  "action": "reboot" // or "shutdown", "start", "rebuild"
}

Templates

One-click deployment of self-hosted applications.

List Templates

GET /templates

Response:

{
  "data": [
    {
      "id": "postgres",
      "name": "PostgreSQL",
      "description": "Open-source relational database",
      "category": "database",
      "versions": ["16", "15", "14"]
    }
  ]
}

Deploy Template

POST /templates/deploy

Request:

{
  "template": "postgres",
  "name": "my-database",
  "version": "16",
  "config": {
    "postgres_user": "admin",
    "postgres_db": "myapp"
  }
}

List Deployments

GET /templates/deployments

Delete Deployment

DELETE /templates/deployments/{id}

Kubernetes

Cozystack-based Kubernetes clusters.

List Clusters

GET /kubernetes

Create Cluster

POST /kubernetes

Request:

{
  "name": "my-cluster",
  "version": "1.29",
  "node_pools": [
    {
      "name": "default",
      "size": "standard-4vcpu-8gb",
      "count": 3
    }
  ]
}

Get Kubeconfig

GET /kubernetes/{id}/kubeconfig

Delete Cluster

DELETE /kubernetes/{id}

Storage

S3-compatible object storage via RustFS.

List Buckets

GET /storage/buckets

Create Bucket

POST /storage/buckets

Request:

{
  "name": "my-bucket",
  "region": "tas-1"
}

Generate S3 Credentials

POST /storage/credentials

Request:

{
  "bucket": "my-bucket",
  "permissions": ["read", "write"]
}

Response:

{
  "access_key": "TASXXXXXXXXXXXXXXXX",
  "secret_key": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
  "endpoint": "https://s3.tas-1.tasmanian.cloud"
}

Delete Bucket

DELETE /storage/buckets/{name}

Networks

Private networking with VPN-based external access.

List Networks

GET /networks

Create Network

POST /networks

Request:

{
  "name": "my-network",
  "cidr": "10.0.0.0/24"
}

Attach VPS to Network

POST /networks/{id}/attach

Request:

{
  "vps_id": "vps_abc123"
}

Get VPN Configuration

External access to your private network is via Netbird VPN.

GET /networks/{id}/vpn-config

Response:

{
  "setup_key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "management_url": "https://vpn.tasmanian.cloud",
  "instructions": "Install Netbird client and use the setup key to connect"
}

Delete Network

DELETE /networks/{id}

Errors

All errors follow a consistent format:

{
  "error": {
    "code": "validation_error",
    "message": "Invalid VPS size specified",
    "details": {
      "field": "size",
      "allowed": ["standard-2vcpu-4gb", "standard-4vcpu-8gb"]
    }
  }
}

Error Codes

CodeHTTP StatusDescription
unauthorized401Invalid or missing API key
forbidden403Insufficient permissions
not_found404Resource not found
validation_error422Invalid request parameters
rate_limited429Too many requests
internal_error500Server error

SDKs

Python

pip install tasmanian-cloud
from tasmanian_cloud import Client

client = Client(api_key="YOUR_API_KEY")

# List VPS instances
instances = client.vps.list()

# Create a VPS
vps = client.vps.create(
    name="my-server",
    size="standard-2vcpu-4gb",
    image="ubuntu-24.04"
)

# Deploy a template
deployment = client.templates.deploy(
    template="postgres",
    name="my-db"
)

JavaScript/TypeScript

npm install @tasmanian-cloud/sdk
import { TasmanianCloud } from '@tasmanian-cloud/sdk';

const client = new TasmanianCloud({ apiKey: 'YOUR_API_KEY' });

// List VPS instances
const instances = await client.vps.list();

// Create a VPS
const vps = await client.vps.create({
  name: 'my-server',
  size: 'standard-2vcpu-4gb',
  image: 'ubuntu-24.04'
});

// Deploy a template
const deployment = await client.templates.deploy({
  template: 'postgres',
  name: 'my-db'
});

Go

go get github.com/tasmanian-cloud/tc-go
package main

import (
    tc "github.com/tasmanian-cloud/tc-go"
)

func main() {
    client := tc.NewClient("YOUR_API_KEY")
    
    // List VPS instances
    instances, _ := client.VPS.List()
    
    // Create a VPS
    vps, _ := client.VPS.Create(tc.CreateVPSRequest{
        Name:  "my-server",
        Size:  "standard-2vcpu-4gb",
        Image: "ubuntu-24.04",
    })
}

Webhooks

Receive real-time notifications for events.

Configure Webhook

POST /webhooks

Request:

{
  "url": "https://yourapp.com/webhooks/tasmanian",
  "events": ["vps.created", "vps.deleted", "template.deployed"],
  "secret": "your-webhook-secret"
}

Event Types

EventDescription
vps.createdVPS instance created
vps.deletedVPS instance deleted
vps.status_changedVPS status changed
template.deployedTemplate deployment completed
template.deletedTemplate deployment removed
kubernetes.readyKubernetes cluster ready
storage.bucket_createdStorage bucket created

Webhook Payload

{
  "event": "vps.created",
  "timestamp": "2024-01-15T10:30:00Z",
  "data": {
    "id": "vps_abc123",
    "name": "my-server",
    "status": "running"
  }
}

Webhooks include an X-Signature header for verification using HMAC-SHA256.


OpenAPI Specification

Full OpenAPI 3.0 spec available at:

https://api.tasmanian.cloud/v1/openapi.json