Skip to main content

CRUD Endpoints

All app routes require a Bearer JWT signed with the app's jwt_secret (HS256).

MethodPathDescription
GET/{app}/{table}List records
POST/{app}/{table}Create record
GET/{app}/{table}/{id}Get by ID
PUT/PATCH/{app}/{table}/{id}Update (partial)
DELETE/{app}/{table}/{id}Delete (or soft-delete if enabled)
GET/{app}/healthApp health check (no auth required)
POST/{app}/filesUpload file (multipart)
GET/{app}/filesList files
GET/{app}/files/{id}Get file metadata
GET/{app}/files/{id}/downloadDownload file (302 → signed URL)
GET/{app}/files/{id}/urlGet signed URL
DELETE/{app}/files/{id}Delete file

Example

TOKEN=$(jwt encode --secret "$MY_JWT_SECRET" '{}')

# Create
curl -X POST localhost:8080/billing/invoices \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{"amount": 150.00, "status": "pending"}'

# List
curl localhost:8080/billing/invoices \
-H "Authorization: Bearer $TOKEN"

# Get
curl localhost:8080/billing/invoices/018e4c72-... \
-H "Authorization: Bearer $TOKEN"

Sorting

Use ?order=field.desc or ?order=field.asc:

curl "localhost:8080/billing/invoices?order=created_at.desc"

Soft Delete

When soft delete is enabled (Dashboard → Settings → Soft Delete), the DELETE endpoint performs an UPDATE SET deleted_at = now() instead. Listed records automatically exclude soft-deleted rows. Use ?deleted=true to include them:

curl "localhost:8080/billing/invoices?deleted=true"

Health Check

Each app exposes an unauthenticated health endpoint:

curl localhost:8080/my-app/health
# {"status":"ok","app":"my-app","healthy":true,"checks":{"database":true,"schema":true}}

Response Format

List:

{ "data": [...], "count": 42, "limit": 50, "offset": 0 }

Single record:

{ "id": "018e4c72-...", "title": "Hello", "created_at": "...", "updated_at": "..." }

Error:

{ "error": "not found" }