Skip to main content

router

Function router 

Source
pub fn router<S: WorkflowStore + 'static>(state: Arc<AppState<S>>) -> Router
Expand description

Build the full API router.

Three tiers:

  1. Authenticated /api/v1/* — workflows, schedules, namespaces, activities, tasks, workers, queues, api-keys, events, meta/version. Gated by auth::auth_middleware when an auth mode is enabled.
  2. Public /api/v1/* — health, version. Always unauthenticated so Kubernetes probes, load balancers, and third-party monitors can reach them without a bearer token.
  3. Dashboard + OpenAPI — HTML/JSON at the root. Always public.