Blueprints
Blueprints are versioned schema snapshots created from workspaces. They define what gets deployed to tenant databases.
GET /blueprints
List all blueprints.
Response
JSON
{
  "blueprints": [
    {
      "name": "main",
      "database": "postgresql",
      "workspace_id": "ws_abc123",
      "current_version": 3,
      "tenant_count": 12
    }
  ],
  "count": 1
}
GET /blueprints/{name}
Get blueprint schema and deployment status.
Response
JSON
{
  "name": "main",
  "database": "postgresql",
  "workspace_id": "ws_abc123",
  "current_version": 3,
  "schema": [
    "CREATE TABLE users (id SERIAL PRIMARY KEY, name TEXT NOT NULL)"
  ],
  "tenant_count": 12
}
GET /blueprints/{name}/versions
List all versions of a blueprint.
Response
JSON
{
  "versions": [
    {
      "version": 3,
      "ddl_count": 2,
      "deployed_at": "2025-02-01T10:00:00Z"
    },
    {
      "version": 2,
      "ddl_count": 1,
      "deployed_at": "2025-01-20T14:30:00Z"
    }
  ],
  "count": 2
}