REST API Reference
Programmatic REST API for managing projects, services, deployments, environment variables, and telemetry.
Supported:RESTJSONBearer Token Authentication
When to Use This Service
Ideal Use Cases
- Building custom internal developer portals or management dashboards
- Custom CI/CD integrations that trigger deployments via HTTP webhooks
- Automated scripts that rotate environment variables or query service health programmatically
When to Choose Another Workload
- Standard day-to-day deployments (the Whizan CLI or Web Console is faster and provides automatic progress streaming)
How to Use & Deploy
Option 1Deploy via Web Console
- 1Generate an API Key in 'Settings > IDE DevOps MCP & API Keys'.
- 2Include the header 'Authorization: Bearer <YOUR_API_KEY>' in all API requests.
- 3Base URL: 'https://api.whizan.cloud'.
Option 2Deploy via CLI & Terminal
Deploy instantly from your local workspace terminal using the global Whizan CLI:
$ curl -H 'Authorization: Bearer whz_live_...' https://api.whizan.cloud/api/servicesOr prompt your AI Coding Assistant (Cursor / Antigravity MCP):
“Query the Whizan API to list all active services”
Practical Project Example
fetch-services.js
const API_URL = "https://api.whizan.cloud";
const API_KEY = process.env.WHIZAN_API_KEY;
async function listCloudServices() {
const response = await fetch(`${API_URL}/api/services`, {
headers: {
"Authorization": `Bearer ${API_KEY}`,
"Content-Type": "application/json"
}
});
if (!response.ok) {
throw new Error(`API request failed: ${response.status}`);
}
const services = await response.json();
console.log("Active microservices:", services);
return services;
}
listCloudServices();Configuration Reference
| Parameter / Setting | Description | Default / Recommended |
|---|---|---|
| POST /api/deploy/direct | Upload tar.gz/zip archive for automatic build and deployment cutover | Archive Payload |
| GET /api/projects | List all deployed frontend applications and their live URLs | JSON Array |
| GET /api/services | List all backend microservices, health statuses, and container ports | JSON Array |
| POST /api/functions/deploy | Deploy compiled ESM edge function code bundle | JSON Payload |
Best Practices & Pro Tips
Tip 1All requests require the 'Authorization: Bearer <API_KEY>' header.
Tip 2Rate limits are enforced per API key; keep keys secret and rotate them if compromised.
