Platform & Hub
REST API & OpenAPI Reference
Complete HTTP reference for VaakLoom Platform, Hub Control Plane endpoints, authentication, and execution endpoints.
Authentication
All administrative and control plane endpoints under /hub/* require an API key passed in the x-api-key header:
curl -H "x-api-key: your_api_key_here" http://localhost:8787/hub/apis
System & Health Endpoints
| Endpoint | Method | Auth Required | Description |
|---|---|---|---|
/health | GET | No | Health check returning {"status":"ok","uptime":1234} |
/metrics | GET | No | Prometheus plain-text metrics scrape endpoint |
/openapi.json | GET | No | OpenAPI 3.1 specification for all registered workflow routes |
Hub Control Plane Endpoints
| Endpoint | Method | Permission | Description |
|---|---|---|---|
/hub/me | GET | Authenticated | Returns the current user/key profile and permissions |
/hub/apis | GET | workflow:read | Returns a list of all registered workflows and metadata |
/hub/workflows | GET | workflow:read | Query all workflow definitions stored in the database |
/hub/workflows | POST | workflow:create | Create and register a new workflow definition |
/hub/workflows/:id | PUT | workflow:edit | Update an existing workflow definition |
/hub/workflows/:id | DELETE | workflow:delete | Remove a workflow definition |
/hub/workflows/validate | POST | workflow:read | Validates a workflow JSON schema without executing it |
/hub/traces | GET | telemetry:read | Query historical execution traces and step timelines |
/hub/tests | GET | workflow:test | List registered Snapline regression tests |
/hub/tests/run | POST | workflow:test | Trigger an automated Snapline test run |
/hub/deploy/plan | POST | workflow:deploy | Generate deployment plan & migration diff |
/hub/deploy/export | POST | workflow:deploy | Export standalone runnable bundle |
/hub/rbac/users | GET | rbac:manage | List users and assigned roles |
/hub/rbac/keys | POST | rbac:manage | Generate new scoped API keys |
Invoking Workflow Endpoints
Workflow routes declared via .route(method, path) are directly reachable at their configured endpoints:
# Example: Triggering the orders workflow
curl -X POST http://localhost:8787/orders \
-H "Content-Type: application/json" \
-H "x-tenant-id: tenant-42" \
-d '{
"orderId": "ord-9821",
"amount": 1450,
"items": [{"sku": "SKU-001", "qty": 2}]
}'