Title here
Summary here
The API base URL is: http://localhost:3000/api/v1
Most endpoints require authentication using a JWT token. Include it in the Authorization header:
Authorization: Bearer <your-jwt-token>
POST /auth/github
Response:
{
"access_token": "jwt_token_here",
"user": {
"id": "user_id",
"email": "user@example.com"
}
}
GET /projects
POST /projects
Content-Type: application/json
{
"name": "Project Name",
"description": "Project Description",
"githubUrl": "https://github.com/user/repo"
}
GET /vms
POST /vms
Content-Type: application/json
{
"name": "vm-name",
"projectId": "project-id",
"specifications": {
"cpu": 2,
"memory": 4096,
"disk": 20
}
}
The API uses standard HTTP status codes and returns errors in this format:
{
"statusCode": 400,
"message": "Error message here",
"error": "Bad Request"
}
API requests are limited to:
Connect to websocket at: ws://localhost:3000/events
vm.status
: VM status updatesproject.update
: Project changesmetrics.update
: System metrics updates