Axon Docs
GitHub Quickstart

Docs / API Reference

Axon.Server

GoAxon.Server — the scheduler and dispatcher. All of the extension methods below chain off AddAxonServer()'s AxonServerBuilder.

AddAxonServer

Extension method
AxonServerBuilder AddAxonServer(this IServiceCollection services)

Registers the core scheduler: SignalR hub, in-memory job/recurring-job/instance stores (until you register a real backend — see Storage backends), the background dispatch processor, and a readiness health check. Maps no HTTP surface by itself — chain AddAxonApiEndpoints() or AddAxonDashboard() for that.

AddAxonApiEndpoints

Extension method
AxonServerBuilder AddAxonApiEndpoints(this AxonServerBuilder builder)

Maps the JSON API under /axon (job/recurring-job listing, retry, delete, trigger). Neither this nor the dashboard UI is mapped unless opted into explicitly.

AddAxonDashboard

Extension method
AxonServerBuilder AddAxonDashboard(this AxonServerBuilder builder)

Calls AddAxonApiEndpoints() and additionally maps the HTML dashboard UI — /axon/dashboard, /axon/login, and job detail pages.

AddQueues

Extension method
AxonServerBuilder AddQueues(this AxonServerBuilder builder, params string[] queueNames)

Restricts this Axon.Server instance to only claim/dispatch jobs on the given queues, plus "default" which every instance serves implicitly — even one that never calls AddQueues at all. This always adds to what's served, never replaces the default with an exclusive allowlist. Throws ArgumentException if queueNames is empty or contains a blank entry. See Priority and queues.

AddJobCleanup

Extension method
AxonServerBuilder AddJobCleanup(this AxonServerBuilder builder, TimeSpan retention, TimeSpan? pollInterval = null)

Opts into a background sweep that purges completed jobs (Succeeded/Failed/Skipped) and their history older than retention, so job tables don't grow unbounded in a long-running deployment. Off by default. pollInterval defaults to one hour. Throws ArgumentOutOfRangeException if retention isn't positive.

AddAuthentication

Extension method
AxonServerBuilder AddAuthentication(this AxonServerBuilder builder, Action<DashboardAuthOptions> configureAuth)

Requires username/password sign-in for the dashboard/API, with per-user Admin/ReadOnly roles. Registers its own cookie scheme (axon_dashboard_auth) without setting an app-wide default authentication scheme, so it coexists with a host app's own auth. Throws InvalidOperationException if no users are configured, a user is missing a username/password, or usernames aren't unique. See Dashboard authentication.

UseAxonServer

Extension method
void UseAxonServer(this WebApplication app)

Maps the SignalR hub, the /axon API/dashboard (if opted into), and two unauthenticated health check endpoints for your orchestrator: /axon/health/live and /axon/health/ready. Call once, after builder.Build().