LoomDeploy
Reference

API Reference

Complete REST API reference for the LoomDeploy backend.

All API routes are prefixed with /api. Authenticated routes require a Bearer token in the Authorization header.

Authentication

POST /auth/register

Create the initial admin account. Locked after the first user is created.

POST /auth/login

{ "username": "admin", "password": "yourpassword" }

Returns a JWT token. Store and send as Authorization: Bearer <token>.

GET /auth/me

Returns the current authenticated user.

POST /auth/change-password

{ "current_password": "old", "new_password": "new" }

GET /auth/users

Admin only. Returns all users.


System

GET /system/stats

Returns server CPU, memory, disk usage, uptime, and running container count.


Projects

GET /projects

List all projects for the authenticated user.

POST /projects

Create a new project.

{
  "name": "my-api",
  "repo_url": "https://github.com/user/repo",
  "branch": "main"
}

GET /projects/:id

Get a single project by ID.

PATCH /projects/:id

Update project name or branch.

DELETE /projects/:id

Delete project and stop its container.

POST /projects/:id/deploy

Trigger a new deployment.

POST /projects/:id/container/:action

Perform a container action. Valid actions: start, stop, restart.


Deployments

GET /projects/:id/deployments

List all deployments for a project.

POST /projects/:id/deployments/:depId/redeploy

Roll back to a specific deployment by its ID.

DELETE /projects/:id/deployments/:depId

Delete a deployment record.

GET /projects/:id/build-logs/stream

SSE endpoint — streams live build logs for the active deployment.

GET /projects/:id/logs

SSE endpoint — streams live container runtime logs.


Environment Variables

GET /projects/:id/env

Returns all env vars for a project (values are masked).

PUT /projects/:id/env

Set all env vars at once (replaces existing).

[
  { "key": "NODE_ENV", "value": "production" },
  { "key": "PORT", "value": "3000" }
]

Stats

GET /projects/:id/stats

Returns current CPU and memory usage for the project container.


Webhooks

POST /projects/:id/webhook/regenerate

Regenerate the webhook secret URL for a project.

POST /webhooks/:secret (public)

Triggered by GitHub (or any Git host) on push events. Fires a new deployment.


GitHub App

GET /github/app/status

Returns GitHub App connection status.

GET /github/app/manifest

Returns the GitHub App manifest JSON for registration.

GET /github/app/connect

Initiates the GitHub App OAuth flow.

DELETE /github/app/disconnect

Disconnect the GitHub App integration.

GET /github/app/repos

List repositories accessible via the GitHub App installation.


Settings

GET /settings/source-control

List all source control tokens.

PUT /settings/source-control

Add or update a source control token.

DELETE /settings/source-control/:provider

Remove a source control token by provider name.