Skip to main content
The bw run command starts a local HTTP server that serves your discovered APIs. All endpoints documented in this section are served by this local server.

Base URL

http://127.0.0.1:8787
The port is configurable via bw run --port <number>.

Request format

POST endpoints expect a JSON request body with the Content-Type header:
Content-Type: application/json
GET endpoints accept inputs as query parameters.

Response format

All endpoints return JSON. Successful responses include an ok: true field. Error responses include an error message. Success:
{ "ok": true, "data": [ ... ], "state": "HomePage", "steps": [ ... ] }
Error:
{ "error": "View 'product_list' not found" }
HTTP status codes: 200 for success, 404 for unknown slugs/states/operations, 429 for max concurrent reached, 500 for execution errors.

CORS

All endpoints include permissive CORS headers:
Access-Control-Allow-Origin: *
Access-Control-Allow-Methods: GET, POST, OPTIONS
Access-Control-Allow-Headers: Content-Type

Endpoints

MethodEndpointDescription
GET/api/healthHealth check
GET/api/sitesList all cached manifests
GET/api/sites/:slug/manifestFull manifest JSON for a site
GET/api/sites/:slug/views/:state/:viewExecute a view (read data)
POST/api/sites/:slug/actions/:state/:actionExecute an action (perform interaction)
The :slug parameter identifies a site. It’s derived from the domain — for example, example.com becomes example-com. Use GET /api/sites to see all available slugs.