CloudWRT REST API

The CloudWRT API provides programmatic access to all platform features, enabling seamless integration with your existing systems, custom automation, and third-party application development.

RESTful Architecture

Clean, predictable REST API following industry best practices with JSON request/response format and standard HTTP methods.

OAuth 2.0 Authentication

Secure authentication using OAuth 2.0 with support for API keys, JWT tokens, and role-based access control.

OpenAPI Specification

Complete OpenAPI 3.0 specification with interactive documentation, code examples, and SDK generators for multiple languages.

Quick Start

# Get API Key from dashboard.cloudwrt.com/settings/api # Authentication curl -X POST https://api.cloudwrt.com/v1/auth/token \ -H "Content-Type: application/json" \ -d '{"api_key": "your_api_key"}' # List Devices curl -X GET https://api.cloudwrt.com/v1/devices \ -H "Authorization: Bearer your_access_token" # Get Device Details curl -X GET https://api.cloudwrt.com/v1/devices/{device_id} \ -H "Authorization: Bearer your_access_token" # Update Device Configuration curl -X PATCH https://api.cloudwrt.com/v1/devices/{device_id}/config \ -H "Authorization: Bearer your_access_token" \ -H "Content-Type: application/json" \ -d '{"ssid": "MyNetwork", "channel": 6}'

API Endpoints

Endpoint Method Description
/v1/devices GET List all devices
/v1/devices/{id} GET Get device details
/v1/devices/{id}/config PATCH Update configuration
/v1/devices/{id}/reboot POST Reboot device
/v1/devices/{id}/stats GET Get statistics
/v1/networks GET, POST Manage networks
/v1/vpn/tunnels GET, POST Manage VPN tunnels

SDK Libraries

Python SDK

pip install cloudwrt-sdk from cloudwrt import CloudWRT client = CloudWRT(api_key="your_key") devices = client.devices.list()

JavaScript SDK

npm install @cloudwrt/sdk const CloudWRT = require('@cloudwrt/sdk'); const client = new CloudWRT('your_key'); const devices = await client.devices.list();

Go SDK

go get github.com/cloudwrt/go-sdk import "github.com/cloudwrt/go-sdk" client := cloudwrt.NewClient("your_key") devices, _ := client.Devices.List()

Webhooks & Events

Subscribe to real-time events via webhooks for device status changes, alerts, and system events:

Full Documentation: Visit docs.cloudwrt.com/api for complete API reference, tutorials, and advanced examples.