Skip to content

Runtime API

The runtime exposes a small management API at https://runtime.<root>/_api/*. All endpoints require Authorization: Bearer ${PIPEBASE_DEPLOY_TOKEN} except /_api/health.

User-defined Camel routes can NOT claim paths under /_api/* — the runtime rejects PUTs that try to.

Method + pathAuthPurpose
GET /_api/healthopenReturns uptime, Camel version, per-route status
GET /_api/flowsbearerList YAML files in routes dir + lastModified + hash + routeCount
PUT /_api/flows/:idbearerInstall/replace a flow’s YAML. Body: {yaml, params?}
DELETE /_api/flows/:idbearerStop + remove the flow’s routes; delete YAML
GET /_api/runs?routeId=X&limit=NbearerPer-route run history (in-memory ring buffer)
GET /_api/value-mappingsbearerList installed value-mapping tables
PUT /_api/value-mappings/:idbearerInstall/replace a value-mapping
DELETE /_api/value-mappings/:idbearerRemove
GET /_api/message-mappingsbearerList installed message-mapping documents
PUT /_api/message-mappings/:idbearerInstall/replace
DELETE /_api/message-mappings/:idbearerRemove
PUT /_api/auth/:flowIdbearerInstall per-flow RBAC policy
GET /_api/auth/:flowIdbearerRead policy
DELETE /_api/auth/:flowIdbearerRemove
GET /_api/trace/streambearerSSE — live trace events
GET /_api/logs/streambearerSSE — live log events

Runtime reads PIPEBASE_DEPLOY_TOKEN once at boot via AuthPredicate. Constant-time comparison via MessageDigest.isEqual.

ScenarioStatusBody
Token env var unset503{"error":"PIPEBASE_DEPLOY_TOKEN not configured"}
Missing/wrong header401{"error":"unauthorized"}
Token matcheshand off to handler
Terminal window
# Health (no auth)
curl https://runtime.<root>/_api/health
# List flows
curl -H "Authorization: Bearer $TOKEN" https://runtime.<root>/_api/flows
# Deploy a flow
curl -X PUT -H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{"yaml": "- route:\n id: hello\n from: { uri: timer:tick?period=5000 }\n steps:\n - log: hello"}' \
https://runtime.<root>/_api/flows/hello
# Tail runs for a route
curl -H "Authorization: Bearer $TOKEN" \
"https://runtime.<root>/_api/runs?routeId=hello&limit=10"

runtime/src/main/java/dev/pipebase/runtime/ManagementApi.java — all endpoints declared in configure(). See the GitHub source.