API Overview

The Uncloud API is a RESTful interface for managing all platform resources. Every action available in the dashboard is also available through the API.

Base URL

http://localhost:8080/api/v1
All endpoints are prefixed with /api/v1.

Authentication

Include your API token in the request header:
curl -H "Authorization: Bearer YOUR_API_TOKEN" \
  http://localhost:8080/api/v1/droplets
See Authentication for details on creating and managing tokens.

Request Format

  • Content-Type: application/json for all POST/PATCH requests
  • Accept: application/json for all responses

Response Format

All responses follow a consistent JSON structure:

Success Response

{
  "id": "dpl_a1b2c3d4",
  "name": "my-droplet",
  "status": "running",
  "created_at": "2024-01-15T10:30:00Z"
}

List Response

[
  { "id": "dpl_a1b2c3d4", "name": "web-1" },
  { "id": "dpl_e5f6g7h8", "name": "web-2" }
]

Error Response

{
  "error": "droplet not found"
}

HTTP Methods

MethodUsage
GETRetrieve resources
POSTCreate resources or trigger actions
PATCHPartially update resources
DELETERemove resources

Resource ID Prefixes

ResourcePrefixExample
Projectproj_proj_default
Dropletdpl_dpl_a1b2c3d4
Volumevol_vol_e5f6g7h8
Appapp_app_i9j0k1l2
Databasedb_db_m3n4o5p6
SSH Keysk_sk_q7r8s9t0

Rate Limiting

The API does not currently enforce rate limits, but this may change in future versions.

API Sections