API Reference
All REST API endpoints. Base URL is http://localhost:5000. Full interactive docs at /api/v1.
The full interactive API reference with request/response schemas is available via Scalar at http://localhost:5000/api/v1 when the backend is running.
Auth
All endpoints require a Bearer token unless DISABLE_AUTH=true is set.
Response Envelope
Every response is wrapped in:
Planets
| Method | Path | Description |
|---|---|---|
GET | /api/v1/planets | List planets (filter: galaxyId, sectorId, ownerId) |
GET | /api/v1/planets/:id | Get single planet |
POST | /api/v1/planets | Create planet |
PUT | /api/v1/planets/:id | Replace planet |
DELETE | /api/v1/planets/:id | Delete planet |
Economy
| Method | Path | Description |
|---|---|---|
GET | /api/v1/game/economy | Get economy view for all planets |
POST | /api/v1/game/tick | Advance one economic tick for all planets |
Hangar — Frames
| Method | Path | Description |
|---|---|---|
GET | /api/v1/frames | List frames (filter: category) |
GET | /api/v1/frames/:id | Get single frame |
Hangar — Modules
| Method | Path | Description |
|---|---|---|
GET | /api/v1/modules | List modules (filter: type) |
GET | /api/v1/modules/:id | Get single module |
Hangar — Blueprints
| Method | Path | Description |
|---|---|---|
GET | /api/v1/blueprints | List current user's blueprints |
GET | /api/v1/blueprints/:id | Get blueprint with all slot details |
POST | /api/v1/blueprints | Create blueprint |
PUT | /api/v1/blueprints/:id | Replace blueprint (increments version) |
DELETE | /api/v1/blueprints/:id | Delete blueprint |
Fleet — Production
| Method | Path | Description |
|---|---|---|
GET | /api/v1/planets/:id/production | List production orders for a planet |
POST | /api/v1/planets/:id/production | Queue a new production order |
DELETE | /api/v1/planets/:id/production/:orderId | Cancel order (refunds unfinished ships) |
GET | /api/v1/planets/:id/production/cost/:blueprintId | Preview cost for one ship from blueprint |
Queue Order Body
Fleet
| Method | Path | Description |
|---|---|---|
GET | /api/v1/fleets | List current user's fleets |
GET | /api/v1/fleets/:id | Get single fleet with ship stacks |
Users
| Method | Path | Description |
|---|---|---|
GET | /api/v1/users | List users |
GET | /api/v1/users/:id | Get user |
POST | /api/v1/users | Create/upsert user |