API Documentation
The CloudNexus REST API allows you to programmatically provision, manage, and scale cloud infrastructure. All requests must be made over HTTPS and use JSON payloads. HTTP request bodies should be `application/json`.
Quick Start: Generate your API keys from the CloudNexus Dashboard. All endpoints return standardized JSON responses with predictable error handling.
Authentication
Access the API using API keys. Include your key in the `Authorization` header as a Bearer token. Never expose private keys in client-side code.
Keys are scoped by environment (`live` or `test`) and permissions (`admin`, `read-only`, or `scoped`). Rate limits are applied per key.
Base URL
All API requests are relative to the production endpoint:
Sandbox: `https://api-sandbox.cloudnexus.io/v1` (for testing without charges)
Core Resources
Servers
Provision and manage VPS instances with NVMe storage, dedicated resources, and instant deployment.
Query Parameters
| Parameter | Type | Description |
|---|---|---|
status | string | Filter by `running`, `stopped`, `provisioning` |
region | string | Filter by datacenter slug (e.g., `us-east-1`) |
limit | integer | Max items per page (default: 20) |
Managed Databases
Deploy PostgreSQL, MySQL, and Redis clusters with automated backups, point-in-time recovery, and read replicas.
Global CDN
Purge caches, configure routing rules, and inspect edge analytics across 300+ locations.
Pagination
List endpoints use cursor-based pagination for consistency at scale. Use the `cursor` and `limit` parameters to navigate results.
Responses include `meta.next_cursor` and `meta.prev_cursor` for navigation.
Rate Limits
API requests are limited to prevent abuse and ensure platform stability. Limits vary by plan and key scope.
- Free/Trial: 100 requests/minute
- Professional: 1,000 requests/minute
- Enterprise: Custom limits (up to 10,000+/min)
Rate limit headers are included in every response:
Exceeding limits returns 429 Too Many Requests. Implement exponential backoff in your integration.
Error Handling
CloudNexus uses standard HTTP status codes and returns detailed error objects in the response body. Always check for errors before processing data.
| Code | Meaning | Description |
|---|---|---|
400 | Bad Request | Missing parameters, invalid JSON, or malformed query |
401 | Unauthorized | Invalid or expired API key |
403 | Forbidden | Insufficient permissions for this resource |
404 | Not Found | Resource does not exist or has been deleted |
409 | Conflict | Resource state conflict (e.g., server already running) |
429 | Too Many Requests | Rate limit exceeded. Retry after X-RateLimit-Reset |
500 | Server Error | Unexpected infrastructure failure. Contact support. |