API reference · v0.2.0

The JumboBridge API

Everything the console does goes through this HTTP API — so everything the console does, your scripts and CI can do too. JSON in, JSON out, plus one WebSocket for live updates.

Basics

Base URL & conventions

The API is served next to the UI: http://localhost:8080/api by default. Requests and responses are JSON. Create endpoints accept port: 0 (or omit it) to auto-assign a free port from the reserved range. Entity run-state changes only through the start/stop endpoints.

No auth by default. JumboBridge trusts its network: the API is open unless the Enterprise login gate is enabled. Run it on a trusted network or behind your own auth proxy — don't expose it to the public internet.

Quickstart

Three requests to see the shape

Create a project
curl -X POST http://localhost:8080/api/projects \
  -H 'content-type: application/json' \
  -d '{"name":"Payments Gateway","description":"integration sandbox"}'
Create and start a forwarding rule
# port 0 = auto-assign from the reserved range
curl -X POST http://localhost:8080/api/forwarding-rules \
  -H 'content-type: application/json' \
  -d '{"project_id":"default","name":"api","source_port":0,
       "target_host":"api.internal","target_port":8080,"protocol":"http"}'

curl -X POST http://localhost:8080/api/rules/<id>/start
Create, start and seed a mock database
curl -X POST http://localhost:8080/api/mock-databases \
  -H 'content-type: application/json' \
  -d '{"project_id":"default","name":"orders-db"}'

curl -X POST http://localhost:8080/api/mock-dbs/<id>/start

curl -X POST http://localhost:8080/api/mock-dbs/<id>/query \
  -H 'content-type: application/json' \
  -d '{"sql":"CREATE TABLE orders (id INTEGER PRIMARY KEY, total REAL); INSERT INTO orders VALUES (1, 9.99);"}'
Endpoints

REST reference

Hand-maintained against v0.2.0 — the routes live in crates/server/src/api/ if you want the source of truth.

Health & info

Always available, no auth.

MethodPathDescription
GET/api/healthLiveness check.
GET/api/infoServer and build info.

Projects

Group forwards, mocks, databases and scenarios. The default project always exists and can't be deleted.

MethodPathDescription
GET/api/projectsList projects.
POST/api/projectsCreate a project.
GET/api/projects/{id}Get one project.
PUT/api/projects/{id}Update a project.
DELETE/api/projects/{id}Delete a project.

Forwarding rules

TCP/UDP/HTTP forwarders. Pass port 0 on create to auto-assign from the range.

MethodPathDescription
GET/api/forwarding-rulesList rules.
POST/api/forwarding-rulesCreate a rule.
GET/api/forwarding-rules/{id}Get one rule.
PUT/api/forwarding-rules/{id}Update a rule.
DELETE/api/forwarding-rules/{id}Delete a rule.
POST/api/rules/{id}/startStart the forwarder.
POST/api/rules/{id}/stopStop the forwarder.
GET/api/rules/{id}/statisticsConnection and byte counters.

Echo servers

MethodPathDescription
GET/api/echo-serversList echo servers.
POST/api/echo-serversCreate an echo server.
GET/api/echo-servers/{id}Get one echo server.
PUT/api/echo-servers/{id}Update an echo server.
DELETE/api/echo-servers/{id}Delete an echo server.
POST/api/echo/{id}/startStart the listener.
POST/api/echo/{id}/stopStop the listener.

Mock servers

Protocol-aware listeners (HTTP, WebSocket, raw TCP, MCP, LLM) that answer traffic.

MethodPathDescription
GET/api/mock-serversList mock servers.
POST/api/mock-serversCreate a mock server.
GET/api/mock-servers/{id}Get one mock server.
PUT/api/mock-servers/{id}Update a mock server.
DELETE/api/mock-servers/{id}Delete a mock server.
POST/api/mocks/{id}/startStart the mock.
POST/api/mocks/{id}/stopStop the mock.
POST/api/mocks/{id}/restartRestart (applies edits).
GET/api/mocks/{id}/logThe request log.
DELETE/api/mocks/{id}/logClear the request log.
GET/api/mock-protocolsSupported protocols.

Mock rules

Priority-ordered request/message patterns and their responses.

MethodPathDescription
GET/api/mock-rules?mock_server_id={id}List rules (optionally per server).
POST/api/mock-rulesCreate a rule.
GET/api/mock-rules/{id}Get one rule.
PUT/api/mock-rules/{id}Update a rule.
DELETE/api/mock-rules/{id}Delete a rule.

Mock databases

Hosted SQLite databases served over the PostgreSQL wire protocol (plus Enterprise external connections).

MethodPathDescription
GET/api/mock-databasesList mock databases.
POST/api/mock-databasesCreate a database.
GET/api/mock-databases/{id}Get one database.
PUT/api/mock-databases/{id}Update a database.
DELETE/api/mock-databases/{id}Delete a database (and its file).
POST/api/mock-dbs/{id}/startStart the wire listener.
POST/api/mock-dbs/{id}/stopStop the wire listener.
POST/api/mock-dbs/{id}/restartRestart the listener.
GET/api/mock-dbs/{id}/schemaTables, columns and row counts.
GET/api/mock-dbs/{id}/tables/{table}/rowsPage through table data.
POST/api/mock-dbs/{id}/queryRun SQL from the console (DDL and multi-statement scripts supported).
GET/api/mock-dbs/{id}/logThe live query log.
DELETE/api/mock-dbs/{id}/logClear the query log.
GET/api/mock-db-enginesSupported engines.
POST/api/mock-dbs/test-connectionTest an external connection (Enterprise).

Disruptions

Latency, throttle, drop, corrupt, partial, blackhole and close — armed per scenario.

MethodPathDescription
GET/api/disruptionsList scenarios.
POST/api/disruptionsCreate a scenario.
GET/api/disruptions/{id}Get one scenario.
PUT/api/disruptions/{id}Update a scenario.
DELETE/api/disruptions/{id}Delete a scenario.
POST/api/disruptions/{id}/armArm the scenario.
POST/api/disruptions/{id}/disarmDisarm the scenario.
GET/api/disruptions-activeEffects currently applied.

API client

Saved requests sent server-side — no CORS, can reach internal ports.

MethodPathDescription
GET/api/requestsList saved requests.
POST/api/requestsCreate a saved request.
GET/api/requests/{id}Get one request.
PUT/api/requests/{id}Update a request.
DELETE/api/requests/{id}Delete a request.
POST/api/requests/{id}/sendSend it once, return the full response.
POST/api/requests/{id}/loadStart a load run (concurrent traffic).
GET/api/requests/{id}/loadLoad-run status.
POST/api/requests/{id}/load/stopStop the load run.
GET/api/requests/{id}/runsRun history for one request.
GET/api/runsAll run history.
GET/api/request-protocolsSupported request protocols.

Test suites

MethodPathDescription
GET/api/test-suitesList suites.
POST/api/test-suitesCreate a suite.
GET/api/test-suites/{id}Get one suite.
PUT/api/test-suites/{id}Update a suite.
DELETE/api/test-suites/{id}Delete a suite.
GET/api/test-suites/{id}/itemsList suite items.
POST/api/test-suites/{id}/itemsAdd a saved request to the suite.
PUT/api/test-suites/{id}/items/orderReorder items.
DELETE/api/test-suites/{id}/items/{item_id}Remove an item.
POST/api/test-suites/{id}/runRun the suite now.
GET/api/test-suites/{id}/runsRun history for the suite.
GET/api/suite-runs/{id}One run with per-request results.

Environments

Named {{var}} sets for the API client; one active per project.

MethodPathDescription
GET/api/environmentsList environments.
POST/api/environmentsCreate an environment.
GET/api/environments/{id}Get one environment.
PUT/api/environments/{id}Update an environment.
DELETE/api/environments/{id}Delete an environment.
POST/api/environments/{id}/activateMake it the active one.

MCP explorer

MethodPathDescription
POST/api/mcp/connectOpen a live session to an MCP server.
POST/api/mcp/{conn}/callInvoke a tool on the session.
POST/api/mcp/{conn}/disconnectClose the session.
GET/api/mcp-targetsList saved MCP targets.
POST/api/mcp-targetsSave a target.
GET/api/mcp-targets/{id}Get one target.
PUT/api/mcp-targets/{id}Update a target.
DELETE/api/mcp-targets/{id}Delete a target.

Ports, settings & access log

MethodPathDescription
GET/api/portsPort-range overview: free, reserved, running.
GET/api/settingsAll settings.
GET/api/settings/{key}One setting.
PUT/api/settings/{key}Set a setting.
GET/api/access-log/{entity_type}/{entity_id}Access log for a forward/echo (secrets redacted).
DELETE/api/access-log/{entity_type}/{entity_id}Clear that log.

Auth, users & Enterprise

Auth is disabled by default; these matter once the Enterprise login gate is on.

MethodPathDescription
GET/api/auth/configWhether login is required.
POST/api/auth/loginStart a session.
POST/api/auth/logoutEnd the session.
GET/api/auth/meThe current user.
GET/api/usersList users.
POST/api/usersCreate a user.
PUT/api/users/{id}Update a user.
DELETE/api/users/{id}Delete a user.
GET/api/projects/{id}/membersList project members.
POST/api/projects/{id}/membersAdd or change a member role.
DELETE/api/projects/{id}/members/{user_id}Remove a member.
GET/api/enterpriseLicense / entitlement status.
POST/api/enterprise/licenseActivate a license key.
DELETE/api/enterprise/licenseDeactivate the license.
PUT/api/enterprise/databaseSet the central database URL.
PUT/api/enterprise/retentionSet audit-log retention.
Live updates

The WebSocket

GET /api/ws upgrades to a one-way server→client stream. Every frame is a JSON object { "type": …, …payload } — the same feed the console uses for its live counters and logs.

Event typeMeaning
entity_changedA collection changed ({ entity: name }) — refetch it.
statsForwarding-rule connection/byte counters (every 3 s).
disruptionA disruption scenario activated / deactivated.
mock_logA mock server handled a request.
mockdb_logA mock database executed a statement.
access_logA forward/echo access-log entry.
load_sampleOne sampled response during a load run.
load_statsLive load-run stats (every 2 s).
load_startedA load run started ({ request_id }).
load_stoppedA load run was stopped.
load_finishedA load run finished.
Prefer not to script HTTP at all? The install guide covers the jb CLI, which runs the same engines straight from a config file or the server's database.