{{define "content"}} {{with .Data}}

Using the API

Everything the MCP server offers, over plain HTTP. Base address {{.Base}}; the machine-readable description is /api/openapi.json (OpenAPI 3.1, no token needed).

Every call needs a token on the API access page, sent as Authorization: Bearer rtr_…. A read token may use the read operations; a change token also the others. Changes to the settings are saved, never applied: you review them under Changes and apply them yourself.

Errors are JSON, {"error": "…"}, with the status 400 (refused or a bad argument), 401 (no or an expired token), 403 (the token's access is too low), 409 (stale ETag) or 500. Results are JSON, except the pending changes and the journal, which are plain text.{{if .HasOptions}} GET /api/v1/options lists every router option with its type, default and description: what settings may contain.{{end}}

Examples use -k because the certificate is self-signed unless you set up a certificate; put your token in $TOKEN.

{{range .Ops}}

{{.Method}} {{.Path}} {{.Summary}}

Access: {{.Scope}}

{{.Description}}

{{if .Params}}
{{range .Params}}{{end}}
ParameterTypeDescription
{{.Name}}{{.Type}}{{if .Required}}required{{end}}{{.Description}}
{{end}} {{with .Body}}

Body: {{.}}

{{end}}
{{.Curl}}
{{end}}
{{end}} {{end}}