Issues & AI remediation
HTTP routes and behavior for issues & ai remediation.
POST /api/issues # user: report a problem; requires instance_id plus media scope; tmdb/tvdb ids. # Non-admins may only report against a library they can see # (403 in requester vocabulary otherwise); admins may report anywhereGET /api/issues # reporter inbox: the caller's OWN reports, newest first, requester copy appliedGET /api/admin/agent-digest # the agent scoreboard. "Resolved" renders as OUTCOME (real-work resolved + self-cleared) with disjoint attribution lanes (by rules / by agent / by admin; remainder "on their own"); "Close without fix" and dismissals counted but never called resolved; plus actions executed, tokens, and needs-a-human/paused counts that are state NOW, not window factsGET /api/admin/agent-approval-rules/candidates # triples the admin has hand-approved and could automate (grounded; active-ruled triples excluded)POST /api/admin/agent-approval-rules # arm a rule from the catalog; server re-checks the triple was actually hand-approved # for movie/tv, foreign_id (+book_format when both formats exist) for book # (instance must be Radarr for movie, Sonarr for tv, Chaptarr for book; # gated by allow_reporting); returns {issue_id,status}; initial status is # observing or recoveringGET /api/issues/{id} # reporter or admin: issue thread (an admin viewing marks it read)POST /api/issues/{id}/reply # reporter or admin: reply (answers agent questions)POST /api/issues/{id}/confirm-fixed # reporter ONLY: close their own report as fixedGET /api/admin/issues?status=&closed_limit= # admin: issue queue (user-reported + auto-detected; each row carries read/unread). Open issues always complete; closed history bounded (default 200, max 1000) with closed_total for what is not shownPOST /api/admin/issues/{id}/dismiss # adminPOST /api/admin/issues/{id}/resolve # admin: { disposition: resolved|wont_fix, note?: <=8192 bytes }; blank gets attributed default audit text # transactional reviewed completion; races return 409POST /api/admin/issues/{id}/reopen # admin ONLY: no body; restore manual review; 409 links existing_issue_id for a duplicateGET /api/admin/issues/{id}/activity # admin: durable action + run history for one issueGET|PUT /api/admin/remediation-settings # admin: master switch, auto-dispatch, reporting, # mark-resolved-as-read, mode, optional model_override # (provider/credential always follow the shared selection), # step/turn/time and daily-run budgets, # observation_min_minutes (10), observation_quiet_minutes (5), # observation_settle_minutes (2)GET /api/admin/agent-actions?status= # admin: awaiting queue, or status=all for history; # actions include immutable instance_id + instance name/service; # release GUIDs are one-way fingerprints, never raw indexer capabilitiesGET /api/admin/agent-actions/{id} # admin: reconcile one durable action after a lost responsePOST /api/admin/agent-actions/{id}/approve # admin: claims and dispatches the stored proposal once; # body {override?, remember?}; remember additionally arms a # standing auto-approval rule for this (problem, fix, facet)POST /api/admin/agent-actions/approve-batch # admin: approve an explicit list of reviewed proposals; # body {ids} (≤100), decided sequentially by the single- # approve core; 200 with per-item verdicts (durable action # status, or skipped/error with a reason); one conflict # never fails the restPOST /api/admin/agent-actions/{id}/deny # admin: denial resumes the investigationGET /api/admin/agent-runs/{id} # admin: full audit trail of one agent runGET /api/admin/agent-approval-rules # admin: standing auto-approval rules with status + countersPOST /api/admin/agent-approval-rules/{id}/pause # admin: stop a rule matching (idempotent)POST /api/admin/agent-approval-rules/{id}/resume # admin: re-arm a paused rule (idempotent)DELETE /api/admin/agent-approval-rules/{id} # admin: remove a rule; history keeps its attribution