Server/Instance Management Endpoints (Project-Based)
POST /api/projects/:projectSlug/servers- Create server (EC2 or GCP Compute VM) in a project. Provider from project’s cloud connection. GCP requires imageId (e.g.projects/debian-cloud/global/images/...), optional instanceType (default e2-micro). (requires authentication)GET /api/projects/:projectSlug/servers- List all servers for a project (requires authentication)GET /api/projects/:projectSlug/servers/:instanceId- Get server details (requires authentication)PUT /api/:projectSlug/:environmentSlug/resources/:resourceId/sync- Sync/refresh instance data from cloud provider (use unified resources API)
DELETE /api/:projectSlug/:environmentSlug/resources/:resourceId. Use the instance’s database ID. See Resources API — Delete Resource by ID.
Note: All project server endpoints now use project slugs instead of IDs. The instanceId parameter remains the AWS instance ID.
Project Management API Examples
Create Project:nameis requiredslugis optional - if not provided, it will be auto-generated from the name- The slug must be globally unique (across all users). If the provided slug is already taken, a number will be appended to make it unique.
Cloud Connection API Examples
List Connections for Project:Environment Management API Examples
Create Environment:Server Management API Examples
Create Server (in default master environment):PUT /api/:projectSlug/:environmentSlug/resources/:resourceId/sync
See Resources API — Sync Resource from Cloud Provider for details.
- Fetches the latest instance details from the cloud provider (AWS, GCP, or Azure)
- Updates the database with current state, IP addresses, and instance type
- Handles terminated instances (updates state to ‘terminated’ if not found in the cloud provider)