{ "swagger": "2.0", "info": { "description": "REST API for AltMount — Usenet WebDAV server with NZB queue, health monitoring, ARR integration, FUSE/rclone mounting, and Stremio addon.", "title": "AltMount API", "termsOfService": "http://altmount.kipsilabs.top", "contact": { "name": "AltMount", "url": "https://github.com/kipsilabs/altmount/issues" }, "license": { "name": "MIT" }, "version": "1.0" }, "host": "localhost:8080", "basePath": "/api", "paths": { "/files/duplicate-lookup": { "post": { "description": "Uses the sample-sha256-v1 protocol. Returns raw NZB XML on a match, or 204 on a miss. Requires X-API-Key even when interactive login is disabled.", "consumes": [ "application/json" ], "produces": [ "application/x-nzb" ], "tags": [ "Files" ], "summary": "Find a reusable NZB by original filename, size and sampled content hash", "parameters": [ { "type": "string", "description": "API key", "name": "X-API-Key", "in": "header", "required": true }, { "description": "File fingerprint", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/duplicatelookup.Request" } } ], "responses": { "200": { "description": "OK", "schema": { "type": "file" } }, "204": { "description": "No Content" }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/api.APIResponse" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/api.APIResponse" } }, "503": { "description": "Service Unavailable", "schema": { "$ref": "#/definitions/api.APIResponse" } } } } }, "/arrs/download-client/register": { "post": { "security": [ { "BearerAuth": [] } ], "description": "Automatically registers AltMount as a download client (SABnzbd-compatible) in all configured ARR instances.", "produces": [ "application/json" ], "tags": [ "ARRs" ], "summary": "Register ARR download clients", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/api.APIResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/api.APIResponse" } } } } }, "/arrs/download-client/test": { "post": { "security": [ { "BearerAuth": [] } ], "description": "Tests whether AltMount is reachable as a download client from all configured ARR instances.", "produces": [ "application/json" ], "tags": [ "ARRs" ], "summary": "Test ARR download clients", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/api.APIResponse" } } } } }, "/arrs/health": { "get": { "security": [ { "BearerAuth": [] } ], "description": "Returns health check results from all configured ARR instances.", "produces": [ "application/json" ], "tags": [ "ARRs" ], "summary": "Get ARR health", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/api.APIResponse" } } } } }, "/arrs/instances": { "get": { "security": [ { "BearerAuth": [] } ], "description": "Returns all configured ARR instances.", "produces": [ "application/json" ], "tags": [ "ARRs" ], "summary": "List ARR instances", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/api.APIResponse" } } } } }, "/arrs/instances/test": { "post": { "security": [ { "BearerAuth": [] } ], "description": "Tests connectivity to an ARR instance with given credentials.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "ARRs" ], "summary": "Test ARR connection", "parameters": [ { "description": "Instance connection details", "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/api.TestConnectionRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/api.APIResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/api.APIResponse" } } } } }, "/arrs/instances/{type}/{name}": { "get": { "security": [ { "BearerAuth": [] } ], "description": "Returns a specific ARR instance by type and name.", "produces": [ "application/json" ], "tags": [ "ARRs" ], "summary": "Get ARR instance", "parameters": [ { "type": "string", "description": "Instance type (sonarr, radarr, lidarr, readarr, whisparr, or sportarr)", "name": "type", "in": "path", "required": true }, { "type": "string", "description": "Instance name", "name": "name", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/api.APIResponse" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/api.APIResponse" } } } } }, "/arrs/stats": { "get": { "security": [ { "BearerAuth": [] } ], "description": "Returns sync statistics for all configured ARR instances.", "produces": [ "application/json" ], "tags": [ "ARRs" ], "summary": "Get ARR statistics", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/api.APIResponse" } } } } }, "/arrs/webhook": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "Receives file-import webhook events from ARR instances and triggers health checks. Authenticated via API key query parameter.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "ARRs" ], "summary": "ARR webhook receiver", "parameters": [ { "type": "string", "description": "AltMount API key", "name": "apikey", "in": "query", "required": true }, { "description": "Webhook payload", "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/api.ArrsWebhookRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/api.APIResponse" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/api.APIResponse" } } } } }, "/arrs/webhook/register": { "post": { "security": [ { "BearerAuth": [] } ], "description": "Automatically registers AltMount as a webhook connection in all configured ARR instances.", "produces": [ "application/json" ], "tags": [ "ARRs" ], "summary": "Register ARR webhooks", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/api.APIResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/api.APIResponse" } } } } }, "/auth/config": { "get": { "description": "Returns authentication configuration (login required flag, available providers). Public endpoint.", "produces": [ "application/json" ], "tags": [ "Auth" ], "summary": "Get auth config", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/api.APIResponse" } } } } }, "/auth/login": { "post": { "description": "Authenticates with username and password and returns a JWT access token. Rate-limited to 10/min per IP.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Auth" ], "summary": "Login", "parameters": [ { "description": "Login credentials", "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/api.LoginRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/api.APIResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/api.AuthResponse" } } } ] } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/api.APIResponse" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/api.APIResponse" } }, "429": { "description": "Too Many Requests", "schema": { "$ref": "#/definitions/api.APIResponse" } } } } }, "/auth/register": { "post": { "description": "Creates the first admin user account. Only allowed when no users exist yet.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Auth" ], "summary": "Register", "parameters": [ { "description": "Registration details", "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/api.RegisterRequest" } } ], "responses": { "201": { "description": "Created", "schema": { "allOf": [ { "$ref": "#/definitions/api.APIResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/api.AuthResponse" } } } ] } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/api.APIResponse" } }, "409": { "description": "Conflict", "schema": { "$ref": "#/definitions/api.APIResponse" } } } } }, "/auth/registration-status": { "get": { "description": "Returns whether registration is currently open (i.e. no users exist yet).", "produces": [ "application/json" ], "tags": [ "Auth" ], "summary": "Check registration status", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/api.APIResponse" } } } } }, "/auth/reset-admin-password": { "post": { "description": "Resets the password for a direct-auth user. Only available when login is disabled.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Auth" ], "summary": "Reset admin password", "parameters": [ { "description": "Reset credentials", "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/api.ResetAdminPasswordRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/api.APIResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/api.APIResponse" } }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/api.APIResponse" } } } } }, "/config": { "get": { "security": [ { "BearerAuth": [] } ], "description": "Returns the current AltMount configuration with sensitive values masked.", "produces": [ "application/json" ], "tags": [ "Config" ], "summary": "Get configuration", "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/api.APIResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/api.ConfigAPIResponse" } } } ] } }, "503": { "description": "Service Unavailable", "schema": { "$ref": "#/definitions/api.APIResponse" } } } }, "put": { "security": [ { "BearerAuth": [] } ], "description": "Replaces the entire AltMount configuration. Triggers restart if required.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Config" ], "summary": "Update configuration", "parameters": [ { "description": "Complete configuration object", "name": "body", "in": "body", "required": true, "schema": { "type": "object" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/api.APIResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/api.APIResponse" } } } } }, "/config/providers/{id}/speedtest": { "post": { "security": [ { "BearerAuth": [] } ], "description": "Runs a speed test against the specified NNTP provider and saves the result to config.", "produces": [ "application/json" ], "tags": [ "Providers" ], "summary": "Test provider download speed", "parameters": [ { "type": "string", "description": "Provider ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/api.APIResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/api.ProviderSpeedTestResponse" } } } ] } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/api.APIResponse" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/api.APIResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/api.APIResponse" } } } } }, "/config/providers/{id}/tune-pipeline": { "post": { "security": [ { "BearerAuth": [] } ], "description": "Sweeps inflight depths against the provider and returns the recommended inflight_requests value.", "produces": [ "application/json" ], "tags": [ "Providers" ], "summary": "Auto-tune provider pipeline depth", "parameters": [ { "type": "string", "description": "Provider ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/api.APIResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/api.PipelineTuneResponse" } } } ] } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/api.APIResponse" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/api.APIResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/api.APIResponse" } } } } }, "/config/reload": { "post": { "security": [ { "BearerAuth": [] } ], "description": "Reloads the AltMount configuration from disk without restarting.", "produces": [ "application/json" ], "tags": [ "Config" ], "summary": "Reload configuration", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/api.APIResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/api.APIResponse" } } } } }, "/config/validate": { "post": { "security": [ { "BearerAuth": [] } ], "description": "Validates a configuration object without saving it.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Config" ], "summary": "Validate configuration", "parameters": [ { "description": "Configuration to validate", "name": "body", "in": "body", "required": true, "schema": { "type": "object" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/api.APIResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/api.APIResponse" } } } } }, "/config/{section}": { "patch": { "security": [ { "BearerAuth": [] } ], "description": "Updates a specific named section of the configuration (e.g. import, sabnzbd, rclone).", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Config" ], "summary": "Patch configuration section", "parameters": [ { "type": "string", "description": "Config section name", "name": "section", "in": "path", "required": true }, { "description": "Section configuration", "name": "body", "in": "body", "required": true, "schema": { "type": "object" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/api.APIResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/api.APIResponse" } } } } }, "/files/active-streams": { "get": { "security": [ { "BearerAuth": [] } ], "description": "Returns all currently active NZB file streams. Optionally filter by type=file.", "produces": [ "application/json" ], "tags": [ "Files" ], "summary": "List active streams", "parameters": [ { "type": "string", "description": "Filter by source type (e.g. file)", "name": "type", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/api.APIResponse" } } } } }, "/files/active-streams/{id}": { "delete": { "security": [ { "BearerAuth": [] } ], "description": "Terminates an active NZB file stream by ID.", "produces": [ "application/json" ], "tags": [ "Files" ], "summary": "Kill active stream", "parameters": [ { "type": "string", "description": "Stream ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/api.APIResponse" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/api.APIResponse" } } } } }, "/files/export-batch": { "post": { "security": [ { "BearerAuth": [] } ], "description": "Exports multiple mounted files as NZBs packed in a single ZIP archive.", "consumes": [ "application/json" ], "produces": [ "application/zip" ], "tags": [ "Files" ], "summary": "Batch export files as NZBs", "parameters": [ { "description": "Virtual paths to export", "name": "body", "in": "body", "required": true, "schema": { "type": "object", "properties": { "paths": { "type": "array", "items": { "type": "string" } } } } } ], "responses": { "200": { "description": "OK" }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/api.APIResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/api.APIResponse" } } } } }, "/files/export-nzb": { "get": { "security": [ { "BearerAuth": [] } ], "description": "Exports the metadata of a mounted file back to a downloadable NZB file.", "produces": [ "application/x-nzb" ], "tags": [ "Files" ], "summary": "Export file metadata as NZB", "parameters": [ { "type": "string", "description": "Virtual path to the file", "name": "path", "in": "query", "required": true } ], "responses": { "200": { "description": "OK" }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/api.APIResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/api.APIResponse" } } } } }, "/files/info": { "get": { "security": [ { "BearerAuth": [] } ], "description": "Returns metadata for a mounted NZB file including segment info, encryption, and status.", "produces": [ "application/json" ], "tags": [ "Files" ], "summary": "Get file metadata", "parameters": [ { "type": "string", "description": "Virtual path to the file", "name": "path", "in": "query", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/api.APIResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/api.FileMetadataResponse" } } } ] } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/api.APIResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/api.APIResponse" } } } } }, "/files/streams/history": { "get": { "security": [ { "BearerAuth": [] } ], "description": "Returns a history of recently completed NZB file streams.", "produces": [ "application/json" ], "tags": [ "Files" ], "summary": "Get stream history", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/api.APIResponse" } } } } }, "/fuse/force-stop": { "post": { "security": [ { "BearerAuth": [] } ], "description": "Force-unmounts the FUSE filesystem using platform-specific commands (fusermount/umount).", "produces": [ "application/json" ], "tags": [ "FUSE" ], "summary": "Force stop FUSE mount", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/api.APIResponse" } } } } }, "/fuse/start": { "post": { "security": [ { "BearerAuth": [] } ], "description": "Mounts the NZB filesystem at the given path using FUSE.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "FUSE" ], "summary": "Start FUSE mount", "parameters": [ { "description": "Mount path", "name": "body", "in": "body", "required": true, "schema": { "type": "object", "properties": { "path": { "type": "string" } } } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/api.APIResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/api.APIResponse" } }, "409": { "description": "Conflict", "schema": { "$ref": "#/definitions/api.APIResponse" } } } } }, "/fuse/status": { "get": { "security": [ { "BearerAuth": [] } ], "description": "Returns the current status of the FUSE mount (stopped, starting, running, error).", "produces": [ "application/json" ], "tags": [ "FUSE" ], "summary": "Get FUSE status", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/api.APIResponse" } } } } }, "/fuse/stop": { "post": { "security": [ { "BearerAuth": [] } ], "description": "Gracefully unmounts the FUSE filesystem.", "produces": [ "application/json" ], "tags": [ "FUSE" ], "summary": "Stop FUSE mount", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/api.APIResponse" } }, "409": { "description": "Conflict", "schema": { "$ref": "#/definitions/api.APIResponse" } } } } }, "/health": { "get": { "security": [ { "BearerAuth": [] } ], "description": "Returns a paginated list of file health records with optional status/search filters.", "produces": [ "application/json" ], "tags": [ "Health" ], "summary": "List health records", "parameters": [ { "enum": [ "pending", "checking", "corrupted", "repair_triggered", "healthy" ], "type": "string", "description": "Filter by status", "name": "status", "in": "query" }, { "type": "string", "description": "Search by file path", "name": "search", "in": "query" }, { "enum": [ "file_path", "created_at", "status", "priority", "last_checked", "scheduled_check_at" ], "type": "string", "description": "Sort field", "name": "sort_by", "in": "query" }, { "enum": [ "asc", "desc" ], "type": "string", "description": "Sort direction", "name": "sort_order", "in": "query" }, { "type": "string", "description": "ISO8601 timestamp filter", "name": "since", "in": "query" }, { "type": "integer", "description": "Page size (default 50)", "name": "limit", "in": "query" }, { "type": "integer", "description": "Page offset", "name": "offset", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/api.APIResponse" }, { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/definitions/api.HealthItemResponse" } }, "meta": { "$ref": "#/definitions/api.APIMeta" } } } ] } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/api.APIResponse" } } } } }, "/health/bulk/delete": { "post": { "security": [ { "BearerAuth": [] } ], "description": "Deletes multiple health records by ID.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Health" ], "summary": "Bulk delete health records", "parameters": [ { "description": "List of health record IDs", "name": "body", "in": "body", "required": true, "schema": { "type": "object", "properties": { "ids": { "type": "array", "items": { "type": "integer" } } } } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/api.APIResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/api.APIResponse" } } } } }, "/health/bulk/repair": { "post": { "security": [ { "BearerAuth": [] } ], "description": "Triggers repair attempts for multiple corrupted files.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Health" ], "summary": "Bulk trigger health repair", "parameters": [ { "description": "List of health record IDs", "name": "body", "in": "body", "required": true, "schema": { "type": "object", "properties": { "ids": { "type": "array", "items": { "type": "integer" } } } } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/api.APIResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/api.APIResponse" } } } } }, "/health/bulk/restart": { "post": { "security": [ { "BearerAuth": [] } ], "description": "Resets multiple health records to pending status for re-checking.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Health" ], "summary": "Bulk restart health checks", "parameters": [ { "description": "List of health record IDs", "name": "body", "in": "body", "required": true, "schema": { "type": "object", "properties": { "ids": { "type": "array", "items": { "type": "integer" } } } } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/api.APIResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/api.APIResponse" } } } } }, "/health/check": { "post": { "security": [ { "BearerAuth": [] } ], "description": "Adds a file to the health monitoring queue for checking.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Health" ], "summary": "Add file for health check", "parameters": [ { "description": "File to check", "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/api.HealthCheckRequest" } } ], "responses": { "201": { "description": "Created", "schema": { "allOf": [ { "$ref": "#/definitions/api.APIResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/api.HealthItemResponse" } } } ] } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/api.APIResponse" } } } } }, "/health/cleanup": { "delete": { "security": [ { "BearerAuth": [] } ], "description": "Removes old health records based on age, status, or both. Optionally deletes physical files.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Health" ], "summary": "Cleanup health records", "parameters": [ { "description": "Cleanup filter criteria", "name": "body", "in": "body", "schema": { "$ref": "#/definitions/api.HealthCleanupRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/api.APIResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/api.APIResponse" } } } } }, "/health/corrupted": { "get": { "security": [ { "BearerAuth": [] } ], "description": "Returns a paginated list of health records with corrupted status.", "produces": [ "application/json" ], "tags": [ "Health" ], "summary": "List corrupted files", "parameters": [ { "type": "integer", "description": "Page size (default 50)", "name": "limit", "in": "query" }, { "type": "integer", "description": "Page offset", "name": "offset", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/api.APIResponse" }, { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/definitions/api.HealthItemResponse" } }, "meta": { "$ref": "#/definitions/api.APIMeta" } } } ] } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/api.APIResponse" } } } } }, "/health/library-sync/cancel": { "post": { "security": [ { "BearerAuth": [] } ], "description": "Cancels an in-progress library sync operation.", "produces": [ "application/json" ], "tags": [ "Health" ], "summary": "Cancel library sync", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/api.APIResponse" } }, "503": { "description": "Service Unavailable", "schema": { "$ref": "#/definitions/api.APIResponse" } } } } }, "/health/library-sync/dry-run": { "post": { "security": [ { "BearerAuth": [] } ], "description": "Simulates a library sync and returns what would be changed without applying it.", "produces": [ "application/json" ], "tags": [ "Health" ], "summary": "Dry-run library sync", "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/api.APIResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/api.DryRunSyncResult" } } } ] } }, "503": { "description": "Service Unavailable", "schema": { "$ref": "#/definitions/api.APIResponse" } } } } }, "/health/library-sync/needed": { "get": { "security": [ { "BearerAuth": [] } ], "description": "Returns whether a library sync is needed based on current configuration state.", "produces": [ "application/json" ], "tags": [ "Health" ], "summary": "Check if library sync is needed", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/api.APIResponse" } } } } }, "/health/library-sync/start": { "post": { "security": [ { "BearerAuth": [] } ], "description": "Triggers a library sync operation to reconcile the file system with the database.", "produces": [ "application/json" ], "tags": [ "Health" ], "summary": "Start library sync", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/api.APIResponse" } }, "503": { "description": "Service Unavailable", "schema": { "$ref": "#/definitions/api.APIResponse" } } } } }, "/health/library-sync/status": { "get": { "security": [ { "BearerAuth": [] } ], "description": "Returns the current status of the library sync worker.", "produces": [ "application/json" ], "tags": [ "Health" ], "summary": "Get library sync status", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/api.APIResponse" } }, "503": { "description": "Service Unavailable", "schema": { "$ref": "#/definitions/api.APIResponse" } } } } }, "/health/reset-all": { "post": { "security": [ { "BearerAuth": [] } ], "description": "Resets all health records to pending status for a full re-check cycle.", "produces": [ "application/json" ], "tags": [ "Health" ], "summary": "Reset all health checks", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/api.APIResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/api.APIResponse" } } } } }, "/health/stats": { "get": { "security": [ { "BearerAuth": [] } ], "description": "Returns counts of health records grouped by status.", "produces": [ "application/json" ], "tags": [ "Health" ], "summary": "Get health statistics", "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/api.APIResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/api.HealthStatsResponse" } } } ] } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/api.APIResponse" } } } } }, "/health/worker/status": { "get": { "security": [ { "BearerAuth": [] } ], "description": "Returns the current status and statistics of the background health check worker.", "produces": [ "application/json" ], "tags": [ "Health" ], "summary": "Get health worker status", "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/api.APIResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/api.HealthWorkerStatusResponse" } } } ] } } } } }, "/health/{id}": { "get": { "security": [ { "BearerAuth": [] } ], "description": "Returns a single health record by ID.", "produces": [ "application/json" ], "tags": [ "Health" ], "summary": "Get health record", "parameters": [ { "type": "integer", "description": "Health record ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/api.APIResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/api.HealthItemResponse" } } } ] } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/api.APIResponse" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/api.APIResponse" } } } }, "delete": { "security": [ { "BearerAuth": [] } ], "description": "Deletes a health record and optionally the associated physical file.", "produces": [ "application/json" ], "tags": [ "Health" ], "summary": "Delete health record", "parameters": [ { "type": "integer", "description": "Health record ID", "name": "id", "in": "path", "required": true }, { "type": "boolean", "description": "Also delete the physical file", "name": "delete_file", "in": "query" } ], "responses": { "204": { "description": "No Content" }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/api.APIResponse" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/api.APIResponse" } } } } }, "/health/{id}/cancel": { "post": { "security": [ { "BearerAuth": [] } ], "description": "Cancels an in-progress health check for a file.", "produces": [ "application/json" ], "tags": [ "Health" ], "summary": "Cancel health check", "parameters": [ { "type": "integer", "description": "Health record ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/api.APIResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/api.APIResponse" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/api.APIResponse" } } } } }, "/health/{id}/check-now": { "post": { "security": [ { "BearerAuth": [] } ], "description": "Triggers an immediate health check for a file, bypassing the queue.", "produces": [ "application/json" ], "tags": [ "Health" ], "summary": "Trigger immediate health check", "parameters": [ { "type": "integer", "description": "Health record ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/api.APIResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/api.HealthItemResponse" } } } ] } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/api.APIResponse" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/api.APIResponse" } } } } }, "/health/{id}/priority": { "post": { "security": [ { "BearerAuth": [] } ], "description": "Sets the checking priority for a health record.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Health" ], "summary": "Set health check priority", "parameters": [ { "type": "integer", "description": "Health record ID", "name": "id", "in": "path", "required": true }, { "description": "Priority: normal or high", "name": "body", "in": "body", "required": true, "schema": { "type": "object", "properties": { "priority": { "type": "string" } } } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/api.APIResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/api.HealthItemResponse" } } } ] } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/api.APIResponse" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/api.APIResponse" } } } } }, "/health/{id}/repair": { "post": { "security": [ { "BearerAuth": [] } ], "description": "Triggers a repair attempt for a corrupted file.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Health" ], "summary": "Trigger health repair", "parameters": [ { "type": "integer", "description": "Health record ID", "name": "id", "in": "path", "required": true }, { "description": "Repair options", "name": "body", "in": "body", "schema": { "$ref": "#/definitions/api.HealthRepairRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/api.APIResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/api.HealthItemResponse" } } } ] } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/api.APIResponse" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/api.APIResponse" } } } } }, "/health/{id}/unmask": { "post": { "security": [ { "BearerAuth": [] } ], "description": "Clears the streaming-failure mask on a health record so it can be checked again.", "produces": [ "application/json" ], "tags": [ "Health" ], "summary": "Unmask health record", "parameters": [ { "type": "integer", "description": "Health record ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/api.APIResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/api.HealthItemResponse" } } } ] } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/api.APIResponse" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/api.APIResponse" } } } } }, "/import/file": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "Adds an NZB file at a given filesystem path to the import queue. Public endpoint (API key in query).", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Import" ], "summary": "Manually import a file", "parameters": [ { "description": "File path to import", "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/api.ManualImportRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/api.APIResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/api.ManualImportResponse" } } } ] } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/api.APIResponse" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/api.APIResponse" } }, "409": { "description": "Conflict", "schema": { "$ref": "#/definitions/api.APIResponse" } } } } }, "/import/history": { "get": { "security": [ { "BearerAuth": [] } ], "description": "Returns a paginated list of completed import records.", "produces": [ "application/json" ], "tags": [ "Import" ], "summary": "Get import history", "parameters": [ { "type": "integer", "description": "Page size (default 50)", "name": "limit", "in": "query" }, { "type": "integer", "description": "Page offset", "name": "offset", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/api.APIResponse" }, { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/definitions/api.ImportHistoryResponse" } }, "meta": { "$ref": "#/definitions/api.APIMeta" } } } ] } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/api.APIResponse" } } } }, "delete": { "security": [ { "BearerAuth": [] } ], "description": "Removes all completed import history records.", "produces": [ "application/json" ], "tags": [ "Import" ], "summary": "Clear import history", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/api.APIResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/api.APIResponse" } } } } }, "/import/nzbdav": { "post": { "security": [ { "BearerAuth": [] } ], "description": "Starts an import from a WebDAV/NZBDav source, fetching NZBs from the remote.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Import" ], "summary": "Import from NZBDav source", "parameters": [ { "description": "Import configuration (uses server config if omitted)", "name": "body", "in": "body", "schema": { "type": "object" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/api.APIResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/api.APIResponse" } } } }, "delete": { "security": [ { "BearerAuth": [] } ], "description": "Cancels the currently running NZBDav import operation.", "produces": [ "application/json" ], "tags": [ "Import" ], "summary": "Cancel NZBDav import", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/api.APIResponse" } } } } }, "/import/nzbdav/migrate-symlinks": { "post": { "security": [ { "BearerAuth": [] } ], "description": "Walks a library directory and rewrites symlinks that target the nzbdav mount to point at the altmount path instead.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Import" ], "summary": "Migrate NZBDav library symlinks", "parameters": [ { "description": "library_path, source_mount_path, dry_run", "name": "body", "in": "body", "required": true, "schema": { "type": "object" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/api.APIResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/api.APIResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/api.APIResponse" } } } } }, "/import/nzbdav/migrations": { "delete": { "security": [ { "BearerAuth": [] } ], "description": "Deletes every import_migrations row for source='nzbdav' regardless of status. Use to force a full re-import after the imported files have been deleted from AltMount. This will cause the scanner to re-process every blob on the next import.", "produces": [ "application/json" ], "tags": [ "Import" ], "summary": "Clear ALL NZBDav migration rows", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/api.APIResponse" } } } } }, "/import/nzbdav/pending-migrations": { "delete": { "security": [ { "BearerAuth": [] } ], "description": "Deletes all import_migrations rows with status='pending' for source='nzbdav'. Keeps imported/symlinks_migrated rows untouched. Use to remove orphaned rows from a cancelled/failed import before re-importing.", "produces": [ "application/json" ], "tags": [ "Import" ], "summary": "Clear pending NZBDav migration rows", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/api.APIResponse" } } } } }, "/import/nzbdav/reset": { "post": { "security": [ { "BearerAuth": [] } ], "description": "Resets the NZBDav import state so a new import can be started.", "produces": [ "application/json" ], "tags": [ "Import" ], "summary": "Reset NZBDav import status", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/api.APIResponse" } } } } }, "/import/nzbdav/status": { "get": { "security": [ { "BearerAuth": [] } ], "description": "Returns the current status of the NZBDav import operation.", "produces": [ "application/json" ], "tags": [ "Import" ], "summary": "Get NZBDav import status", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/api.APIResponse" } } } } }, "/import/scan": { "post": { "security": [ { "BearerAuth": [] } ], "description": "Scans a directory for NZB files and adds them to the import queue.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Import" ], "summary": "Start manual directory scan", "parameters": [ { "description": "Directory path to scan", "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/api.ManualScanRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/api.APIResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/api.APIResponse" } } } }, "delete": { "security": [ { "BearerAuth": [] } ], "description": "Cancels the currently running manual directory scan.", "produces": [ "application/json" ], "tags": [ "Import" ], "summary": "Cancel directory scan", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/api.APIResponse" } } } } }, "/import/scan/status": { "get": { "security": [ { "BearerAuth": [] } ], "description": "Returns the current status of the manual directory scan operation.", "produces": [ "application/json" ], "tags": [ "Import" ], "summary": "Get scan status", "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/api.APIResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/api.ScanStatusResponse" } } } ] } } } } }, "/metadata/corrupted": { "get": { "security": [ { "BearerAuth": [] } ], "description": "Returns how many corrupted metadata safety copies are retained and how much disk they occupy.", "produces": [ "application/json" ], "tags": [ "Metadata" ], "summary": "Get corrupted metadata stats", "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/api.APIResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/api.CorruptedMetadataStatsResponse" } } } ] } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/api.APIResponse" } }, "503": { "description": "Service Unavailable", "schema": { "$ref": "#/definitions/api.APIResponse" } } } }, "delete": { "security": [ { "BearerAuth": [] } ], "description": "Removes every corrupted metadata safety copy and releases the segment stores they hold.", "produces": [ "application/json" ], "tags": [ "Metadata" ], "summary": "Purge corrupted metadata", "responses": { "204": { "description": "No Content" }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/api.APIResponse" } }, "503": { "description": "Service Unavailable", "schema": { "$ref": "#/definitions/api.APIResponse" } } } } }, "/metadata/migration/cancel": { "post": { "security": [ { "BearerAuth": [] } ], "description": "Stops an in-flight migration after the current file.", "produces": [ "application/json" ], "tags": [ "Metadata" ], "summary": "Cancel the metadata migration", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/api.APIResponse" } }, "503": { "description": "Service Unavailable", "schema": { "$ref": "#/definitions/api.APIResponse" } } } } }, "/metadata/migration/dry-run": { "post": { "security": [ { "BearerAuth": [] } ], "description": "Converts against an isolated temporary root and reports measured savings without touching the library.", "produces": [ "application/json" ], "tags": [ "Metadata" ], "summary": "Dry-run the metadata migration", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/api.APIResponse" } }, "409": { "description": "Conflict", "schema": { "$ref": "#/definitions/api.APIResponse" } }, "503": { "description": "Service Unavailable", "schema": { "$ref": "#/definitions/api.APIResponse" } } } } }, "/metadata/migration/start": { "post": { "security": [ { "BearerAuth": [] } ], "description": "Rewrites legacy .meta files to the v3 store-backed format in place.", "produces": [ "application/json" ], "tags": [ "Metadata" ], "summary": "Start the metadata migration", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/api.APIResponse" } }, "409": { "description": "Conflict", "schema": { "$ref": "#/definitions/api.APIResponse" } }, "503": { "description": "Service Unavailable", "schema": { "$ref": "#/definitions/api.APIResponse" } } } } }, "/metadata/migration/status": { "get": { "security": [ { "BearerAuth": [] } ], "description": "Returns the status of the legacy metadata → v3 migration worker.", "produces": [ "application/json" ], "tags": [ "Metadata" ], "summary": "Get metadata migration status", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/api.APIResponse" } }, "503": { "description": "Service Unavailable", "schema": { "$ref": "#/definitions/api.APIResponse" } } } } }, "/nzb/streams": { "post": { "description": "Accepts an NZB file (upload or URL), queues it with high priority, and returns Stremio-compatible stream URLs as soon as the file is accessible via VFS. Auth: download_key form field (SHA256 of API key) or X-Api-Key header (raw API key). Returns _cached=true when served from an already-completed item.", "consumes": [ "multipart/form-data" ], "produces": [ "application/json" ], "tags": [ "Stremio" ], "summary": "Get Stremio streams for NZB file", "parameters": [ { "type": "file", "description": "NZB file to process (mutually exclusive with nzb_url)", "name": "file", "in": "formData" }, { "type": "string", "description": "URL to download the NZB from (mutually exclusive with file)", "name": "nzb_url", "in": "formData" }, { "type": "string", "description": "SHA256 hash of the user's API key (alternative: X-Api-Key header)", "name": "download_key", "in": "formData" }, { "type": "string", "description": "Raw API key (alternative to download_key form field)", "name": "X-Api-Key", "in": "header" }, { "type": "string", "description": "Queue category (default: stremio)", "name": "category", "in": "formData" }, { "type": "integer", "description": "Processing timeout in seconds (default: 300)", "name": "timeout", "in": "formData" }, { "type": "integer", "description": "Season number for selecting one episode from a season pack", "name": "season", "in": "formData" }, { "type": "integer", "description": "Episode number for selecting one episode from a season pack", "name": "episode", "in": "formData" }, { "type": "string", "description": "Stremio content id (e.g. tt1234567:1:5) as an alternative to season/episode", "name": "id", "in": "formData" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/api.StremioStreamsResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/api.APIResponse" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/api.APIResponse" } }, "503": { "description": "Service Unavailable", "schema": { "$ref": "#/definitions/api.APIResponse" } } } } }, "/providers": { "post": { "security": [ { "BearerAuth": [] } ], "description": "Adds a new NNTP provider to the configuration.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Providers" ], "summary": "Create NNTP provider", "parameters": [ { "description": "Provider details", "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/api.ProviderCreateRequest" } } ], "responses": { "201": { "description": "Created", "schema": { "allOf": [ { "$ref": "#/definitions/api.APIResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/api.ProviderAPIResponse" } } } ] } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/api.APIResponse" } } } } }, "/providers/backbones": { "get": { "description": "Returns a cached mapping of usenet hostnames to their upstream backbone (storage group)", "produces": [ "application/json" ], "tags": [ "providers" ], "summary": "Get provider backbone map", "responses": { "200": { "description": "OK", "schema": { "type": "object", "additionalProperties": true } }, "503": { "description": "Service Unavailable", "schema": { "type": "object", "additionalProperties": true } } } } }, "/providers/reorder": { "put": { "security": [ { "BearerAuth": [] } ], "description": "Sets the priority order of NNTP providers.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Providers" ], "summary": "Reorder NNTP providers", "parameters": [ { "description": "Ordered list of provider IDs", "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/api.ProviderReorderRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/api.APIResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/api.APIResponse" } } } } }, "/providers/test": { "post": { "security": [ { "BearerAuth": [] } ], "description": "Tests NNTP provider connectivity with given credentials, returning RTT on success.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Providers" ], "summary": "Test NNTP provider", "parameters": [ { "description": "Provider credentials to test", "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/api.ProviderTestRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/api.APIResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/api.TestProviderResponse" } } } ] } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/api.APIResponse" } } } } }, "/providers/{id}": { "put": { "security": [ { "BearerAuth": [] } ], "description": "Updates an existing NNTP provider by ID.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Providers" ], "summary": "Update NNTP provider", "parameters": [ { "type": "string", "description": "Provider ID", "name": "id", "in": "path", "required": true }, { "description": "Fields to update", "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/api.ProviderUpdateRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/api.APIResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/api.ProviderAPIResponse" } } } ] } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/api.APIResponse" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/api.APIResponse" } } } }, "delete": { "security": [ { "BearerAuth": [] } ], "description": "Removes an NNTP provider by ID from the configuration.", "produces": [ "application/json" ], "tags": [ "Providers" ], "summary": "Delete NNTP provider", "parameters": [ { "type": "string", "description": "Provider ID", "name": "id", "in": "path", "required": true } ], "responses": { "204": { "description": "No Content" }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/api.APIResponse" } } } } }, "/providers/{id}/reset-quota": { "post": { "security": [ { "BearerAuth": [] } ], "description": "Resets the download quota counter for the specified provider, allowing it to download again.", "produces": [ "application/json" ], "tags": [ "Providers" ], "summary": "Reset provider download quota", "parameters": [ { "type": "string", "description": "Provider ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/api.APIResponse" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/api.APIResponse" } } } } }, "/prowlarr/indexers": { "post": { "security": [ { "BearerAuth": [] } ], "description": "Returns the usenet indexers configured in Prowlarr for the Stremio addon.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Config" ], "summary": "List Prowlarr indexers", "parameters": [ { "description": "Optional Prowlarr connection overrides", "name": "body", "in": "body", "schema": { "$ref": "#/definitions/api.prowlarrIndexersRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/api.APIResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/api.APIResponse" } } } } }, "/queue": { "get": { "security": [ { "BearerAuth": [] } ], "description": "Returns a paginated list of NZB download queue items with optional filters.", "produces": [ "application/json" ], "tags": [ "Queue" ], "summary": "List queue items", "parameters": [ { "enum": [ "pending", "processing", "waiting_repair", "completed", "failed", "fallback" ], "type": "string", "description": "Filter by status", "name": "status", "in": "query" }, { "type": "string", "description": "Search by filename", "name": "search", "in": "query" }, { "enum": [ "created_at", "updated_at", "status", "nzb_path" ], "type": "string", "description": "Sort field", "name": "sort_by", "in": "query" }, { "enum": [ "asc", "desc" ], "type": "string", "description": "Sort direction", "name": "sort_order", "in": "query" }, { "type": "string", "description": "ISO8601 timestamp filter", "name": "since", "in": "query" }, { "type": "integer", "description": "Page size (default 50)", "name": "limit", "in": "query" }, { "type": "integer", "description": "Page offset", "name": "offset", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/api.APIResponse" }, { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/definitions/api.QueueItemResponse" } }, "meta": { "$ref": "#/definitions/api.APIMeta" } } } ] } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/api.APIResponse" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/api.APIResponse" } } } } }, "/queue/bulk": { "delete": { "security": [ { "BearerAuth": [] } ], "description": "Deletes multiple queue items by ID. Cannot delete items currently being processed.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Queue" ], "summary": "Bulk delete queue items", "parameters": [ { "description": "List of queue item IDs", "name": "body", "in": "body", "required": true, "schema": { "type": "object", "properties": { "ids": { "type": "array", "items": { "type": "integer" } } } } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/api.APIResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/api.APIResponse" } }, "409": { "description": "Conflict", "schema": { "$ref": "#/definitions/api.APIResponse" } } } } }, "/queue/bulk/cancel": { "post": { "security": [ { "BearerAuth": [] } ], "description": "Requests cancellation of multiple currently-processing queue items.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Queue" ], "summary": "Bulk cancel queue items", "parameters": [ { "description": "List of queue item IDs", "name": "body", "in": "body", "required": true, "schema": { "type": "object", "properties": { "ids": { "type": "array", "items": { "type": "integer" } } } } } ], "responses": { "202": { "description": "Accepted", "schema": { "$ref": "#/definitions/api.APIResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/api.APIResponse" } } } } }, "/queue/bulk/priority": { "patch": { "security": [ { "BearerAuth": [] } ], "description": "Updates the priority for multiple queue items at once. Items currently being processed are skipped.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Queue" ], "summary": "Bulk update queue item priorities", "parameters": [ { "description": "IDs and priority: 1=high, 2=normal, 3=low", "name": "body", "in": "body", "required": true, "schema": { "type": "object", "properties": { "ids": { "type": "array", "items": { "type": "integer", "format": "int64" } }, "priority": { "type": "integer" } } } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/api.APIResponse" }, { "type": "object", "properties": { "data": { "type": "object", "properties": { "message": { "type": "string" }, "skipped_count": { "type": "integer" }, "updated_count": { "type": "integer" } } } } } ] } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/api.APIResponse" } } } } }, "/queue/bulk/restart": { "post": { "security": [ { "BearerAuth": [] } ], "description": "Resets multiple queue items to pending status for reprocessing.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Queue" ], "summary": "Bulk restart queue items", "parameters": [ { "description": "List of queue item IDs", "name": "body", "in": "body", "required": true, "schema": { "type": "object", "properties": { "ids": { "type": "array", "items": { "type": "integer" } } } } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/api.APIResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/api.APIResponse" } }, "409": { "description": "Conflict", "schema": { "$ref": "#/definitions/api.APIResponse" } } } } }, "/queue/completed": { "delete": { "security": [ { "BearerAuth": [] } ], "description": "Removes all completed items from the queue.", "produces": [ "application/json" ], "tags": [ "Queue" ], "summary": "Clear completed queue items", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/api.APIResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/api.APIResponse" } } } } }, "/queue/failed": { "delete": { "security": [ { "BearerAuth": [] } ], "description": "Removes all failed items from the queue.", "produces": [ "application/json" ], "tags": [ "Queue" ], "summary": "Clear failed queue items", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/api.APIResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/api.APIResponse" } } } } }, "/queue/pending": { "delete": { "security": [ { "BearerAuth": [] } ], "description": "Removes all pending items from the queue.", "produces": [ "application/json" ], "tags": [ "Queue" ], "summary": "Clear pending queue items", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/api.APIResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/api.APIResponse" } } } } }, "/queue/stats": { "get": { "security": [ { "BearerAuth": [] } ], "description": "Returns current queue statistics (counts by status, average processing time).", "produces": [ "application/json" ], "tags": [ "Queue" ], "summary": "Get queue statistics", "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/api.APIResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/api.QueueStatsResponse" } } } ] } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/api.APIResponse" } } } } }, "/queue/stats/history": { "get": { "security": [ { "BearerAuth": [] } ], "description": "Returns historical import statistics over a rolling window (last 24h, 7d, 30d, 365d).", "produces": [ "application/json" ], "tags": [ "Queue" ], "summary": "Get historical queue statistics", "parameters": [ { "type": "integer", "description": "Number of days of history (default 1, max 365)", "name": "days", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/api.APIResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/api.QueueHistoricalStatsResponse" } } } ] } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/api.APIResponse" } } } } }, "/queue/test": { "post": { "security": [ { "BearerAuth": [] } ], "description": "Downloads a test NZB from sabnzbd.org and adds it to the queue for connectivity testing.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Queue" ], "summary": "Add test download to queue", "parameters": [ { "description": "Size: 100MB, 1GB, or 10GB", "name": "body", "in": "body", "required": true, "schema": { "type": "object", "properties": { "size": { "type": "string" } } } } ], "responses": { "201": { "description": "Created", "schema": { "allOf": [ { "$ref": "#/definitions/api.APIResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/api.QueueItemResponse" } } } ] } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/api.APIResponse" } }, "502": { "description": "Bad Gateway", "schema": { "$ref": "#/definitions/api.APIResponse" } } } } }, "/queue/upload": { "post": { "security": [ { "BearerAuth": [] } ], "description": "Uploads an NZB file and adds it to the download queue.", "consumes": [ "multipart/form-data" ], "produces": [ "application/json" ], "tags": [ "Queue" ], "summary": "Upload NZB file to queue", "parameters": [ { "type": "file", "description": "NZB file to upload (max 100MB)", "name": "file", "in": "formData", "required": true }, { "type": "string", "description": "Optional category", "name": "category", "in": "formData" }, { "type": "string", "description": "Optional relative path under CompleteDir", "name": "relative_path", "in": "formData" }, { "type": "integer", "description": "Priority: 1=high, 2=normal, 3=low", "name": "priority", "in": "formData" } ], "responses": { "201": { "description": "Created", "schema": { "allOf": [ { "$ref": "#/definitions/api.APIResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/api.QueueItemResponse" } } } ] } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/api.APIResponse" } }, "503": { "description": "Service Unavailable", "schema": { "$ref": "#/definitions/api.APIResponse" } } } } }, "/queue/upload-by-name": { "post": { "security": [ { "BearerAuth": [] } ], "description": "Searches for an NZB by name via the configured indexer and adds the result to the queue.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Queue" ], "summary": "Search NZB by name and add to queue", "parameters": [ { "description": "Search request", "name": "body", "in": "body", "required": true, "schema": { "type": "object", "properties": { "category": { "type": "string" }, "name": { "type": "string" }, "password": { "type": "string" }, "priority": { "type": "integer" }, "relative_path": { "type": "string" } } } } ], "responses": { "201": { "description": "Created", "schema": { "$ref": "#/definitions/api.APIResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/api.APIResponse" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/api.APIResponse" } }, "503": { "description": "Service Unavailable", "schema": { "$ref": "#/definitions/api.APIResponse" } } } } }, "/queue/upload-nzblnk": { "post": { "security": [ { "BearerAuth": [] } ], "description": "Resolves one or more nzblnk:// links and adds the resulting NZBs to the queue.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Queue" ], "summary": "Add NZBLnk links to queue", "parameters": [ { "description": "NZBLNK request (max 20 links)", "name": "body", "in": "body", "required": true, "schema": { "type": "object", "properties": { "category": { "type": "string" }, "links": { "type": "array", "items": { "type": "string" } }, "priority": { "type": "integer" }, "relative_path": { "type": "string" } } } } ], "responses": { "201": { "description": "Created", "schema": { "$ref": "#/definitions/api.APIResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/api.APIResponse" } }, "503": { "description": "Service Unavailable", "schema": { "$ref": "#/definitions/api.APIResponse" } } } } }, "/queue/{id}": { "get": { "security": [ { "BearerAuth": [] } ], "description": "Returns a single queue item by ID.", "produces": [ "application/json" ], "tags": [ "Queue" ], "summary": "Get queue item", "parameters": [ { "type": "integer", "description": "Queue item ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/api.APIResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/api.QueueItemResponse" } } } ] } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/api.APIResponse" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/api.APIResponse" } } } }, "delete": { "security": [ { "BearerAuth": [] } ], "description": "Deletes a queue item by ID. Cannot delete items currently being processed.", "produces": [ "application/json" ], "tags": [ "Queue" ], "summary": "Delete queue item", "parameters": [ { "type": "integer", "description": "Queue item ID", "name": "id", "in": "path", "required": true } ], "responses": { "204": { "description": "No Content" }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/api.APIResponse" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/api.APIResponse" } }, "409": { "description": "Conflict", "schema": { "$ref": "#/definitions/api.APIResponse" } } } } }, "/queue/{id}/cancel": { "post": { "security": [ { "BearerAuth": [] } ], "description": "Requests cancellation of a queue item that is currently being processed.", "produces": [ "application/json" ], "tags": [ "Queue" ], "summary": "Cancel queue item", "parameters": [ { "type": "integer", "description": "Queue item ID", "name": "id", "in": "path", "required": true } ], "responses": { "202": { "description": "Accepted", "schema": { "$ref": "#/definitions/api.APIResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/api.APIResponse" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/api.APIResponse" } }, "409": { "description": "Conflict", "schema": { "$ref": "#/definitions/api.APIResponse" } } } } }, "/queue/{id}/download": { "get": { "security": [ { "BearerAuth": [] } ], "description": "Downloads the original NZB file associated with a queue item.", "produces": [ "application/x-nzb" ], "tags": [ "Queue" ], "summary": "Download NZB file", "parameters": [ { "type": "integer", "description": "Queue item ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK" }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/api.APIResponse" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/api.APIResponse" } } } } }, "/queue/{id}/priority": { "patch": { "security": [ { "BearerAuth": [] } ], "description": "Changes the priority of a pending or failed queue item.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Queue" ], "summary": "Update queue item priority", "parameters": [ { "type": "integer", "description": "Queue item ID", "name": "id", "in": "path", "required": true }, { "description": "Priority: 1=high, 2=normal, 3=low", "name": "body", "in": "body", "required": true, "schema": { "type": "object", "properties": { "priority": { "type": "integer" } } } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/api.APIResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/api.QueueItemResponse" } } } ] } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/api.APIResponse" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/api.APIResponse" } }, "409": { "description": "Conflict", "schema": { "$ref": "#/definitions/api.APIResponse" } } } } }, "/queue/{id}/retry": { "post": { "security": [ { "BearerAuth": [] } ], "description": "Resets a failed, pending, or completed queue item to pending so it is picked up by the worker pool.", "produces": [ "application/json" ], "tags": [ "Queue" ], "summary": "Retry queue item", "parameters": [ { "type": "integer", "description": "Queue item ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/api.APIResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/api.QueueItemResponse" } } } ] } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/api.APIResponse" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/api.APIResponse" } }, "409": { "description": "Conflict", "schema": { "$ref": "#/definitions/api.APIResponse" } } } } }, "/stremio/{key}/manifest.json": { "get": { "description": "Returns the Stremio addon manifest JSON for installation. The key authenticates the addon.", "produces": [ "application/json" ], "tags": [ "Stremio" ], "summary": "Stremio addon manifest", "parameters": [ { "type": "string", "description": "Download key (SHA256 of API key)", "name": "key", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/api.stremioManifest" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/api.APIResponse" } } } } }, "/stremio/{key}/play": { "get": { "description": "Downloads the NZB from Prowlarr by URL, queues it with high priority, waits for download completion, then redirects (302) to the first media stream URL.", "produces": [ "application/json" ], "tags": [ "Stremio" ], "summary": "Play Stremio NZB stream", "parameters": [ { "type": "string", "description": "Download key (SHA256 of API key)", "name": "key", "in": "path", "required": true }, { "type": "string", "description": "Prowlarr NZB download URL", "name": "url", "in": "query", "required": true }, { "type": "string", "description": "Safe filename title for the NZB", "name": "title", "in": "query" }, { "type": "integer", "description": "Season number for selecting one episode from a season pack", "name": "season", "in": "query" }, { "type": "integer", "description": "Episode number for selecting one episode from a season pack", "name": "episode", "in": "query" } ], "responses": { "302": { "description": "Redirects to media stream URL", "schema": { "type": "string" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/api.APIResponse" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/api.APIResponse" } }, "503": { "description": "Service Unavailable", "schema": { "$ref": "#/definitions/api.APIResponse" } } } } }, "/stremio/{key}/stream/{type}/{id}.json": { "get": { "description": "Searches Prowlarr for matching NZBs and returns Stremio-compatible stream URL options.", "produces": [ "application/json" ], "tags": [ "Stremio" ], "summary": "Stremio stream handler", "parameters": [ { "type": "string", "description": "Download key", "name": "key", "in": "path", "required": true }, { "type": "string", "description": "Content type (movie or series)", "name": "type", "in": "path", "required": true }, { "type": "string", "description": "Stremio content ID (e.g. tt1234567)", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/api.APIResponse" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/api.APIResponse" } } } } }, "/system/browse": { "get": { "security": [ { "BearerAuth": [] } ], "description": "Lists filesystem entries at a given path for directory/file picker UIs.", "produces": [ "application/json" ], "tags": [ "System" ], "summary": "Browse filesystem", "parameters": [ { "type": "string", "description": "Directory path to browse (defaults to root)", "name": "path", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/api.APIResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/api.APIResponse" } } } } }, "/system/cleanup": { "post": { "security": [ { "BearerAuth": [] } ], "description": "Removes old queue items and health records based on age. Supports dry-run mode.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "System" ], "summary": "System cleanup", "parameters": [ { "description": "Cleanup criteria", "name": "body", "in": "body", "schema": { "$ref": "#/definitions/api.SystemCleanupRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/api.APIResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/api.SystemCleanupResponse" } } } ] } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/api.APIResponse" } } } } }, "/system/health": { "get": { "security": [ { "BearerAuth": [] } ], "description": "Returns health status of all system components (database, workers, etc.).", "produces": [ "application/json" ], "tags": [ "System" ], "summary": "Get system health", "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/api.APIResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/api.SystemHealthResponse" } } } ] } } } } }, "/system/pool/metrics": { "get": { "security": [ { "BearerAuth": [] } ], "description": "Returns download/upload metrics, speed, and per-provider connection statistics.", "produces": [ "application/json" ], "tags": [ "System" ], "summary": "Get NNTP pool metrics", "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/api.APIResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/api.PoolMetricsResponse" } } } ] } } } } }, "/system/provider-speed-history": { "get": { "security": [ { "BearerAuth": [] } ], "description": "Returns speed test history per provider over the given number of days.", "produces": [ "application/json" ], "tags": [ "System" ], "summary": "Get provider speed test history", "parameters": [ { "type": "integer", "description": "Number of days to fetch data for (default: 30)", "name": "days", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/api.APIResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/api.ProviderSpeedTestHistoryResponse" } } } ] } } } } }, "/system/provider-stats": { "get": { "security": [ { "BearerAuth": [] } ], "description": "Returns aggregated data usage per provider over the given number of days.", "produces": [ "application/json" ], "tags": [ "System" ], "summary": "Get provider historical data usage stats", "parameters": [ { "type": "integer", "description": "Number of days to fetch data for (default: 30)", "name": "days", "in": "query" }, { "type": "string", "description": "Aggregation interval (daily, weekly, monthly, yearly)", "name": "interval", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/api.APIResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/api.ProviderHistoricalStatsResponse" } } } ] } } } } }, "/system/restart": { "post": { "security": [ { "BearerAuth": [] } ], "description": "Schedules a graceful system restart. Use force=true to skip safety checks.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "System" ], "summary": "Restart system", "parameters": [ { "description": "Restart options", "name": "body", "in": "body", "schema": { "$ref": "#/definitions/api.SystemRestartRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/api.APIResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/api.SystemRestartResponse" } } } ] } } } } }, "/system/stats": { "get": { "security": [ { "BearerAuth": [] } ], "description": "Returns combined queue, health, and system information statistics.", "produces": [ "application/json" ], "tags": [ "System" ], "summary": "Get system statistics", "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/api.APIResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/api.SystemStatsResponse" } } } ] } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/api.APIResponse" } } } } }, "/system/stats/reset": { "post": { "security": [ { "BearerAuth": [] } ], "description": "Resets accumulated system statistics counters (pool metrics, download counters).", "produces": [ "application/json" ], "tags": [ "System" ], "summary": "Reset system statistics", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/api.APIResponse" } } } } }, "/system/update/apply": { "post": { "security": [ { "BearerAuth": [] } ], "description": "Pulls the latest Docker image and restarts the container to apply the update.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "System" ], "summary": "Apply update", "parameters": [ { "description": "Update channel (latest or dev)", "name": "body", "in": "body", "schema": { "type": "object", "properties": { "channel": { "type": "string" } } } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/api.APIResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/api.APIResponse" } }, "503": { "description": "Service Unavailable", "schema": { "$ref": "#/definitions/api.APIResponse" } } } } }, "/system/update/status": { "get": { "security": [ { "BearerAuth": [] } ], "description": "Checks Docker Hub for the latest available version and returns whether an update is available.", "produces": [ "application/json" ], "tags": [ "System" ], "summary": "Get update status", "parameters": [ { "enum": [ "latest", "dev" ], "type": "string", "description": "Release channel", "name": "channel", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/api.APIResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/api.UpdateStatusResponse" } } } ] } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/api.APIResponse" } } } } }, "/user": { "get": { "security": [ { "BearerAuth": [] } ], "description": "Returns information about the currently authenticated user.", "produces": [ "application/json" ], "tags": [ "User" ], "summary": "Get current user", "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/api.APIResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/api.UserResponse" } } } ] } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/api.APIResponse" } } } } }, "/user/api-key/regenerate": { "post": { "security": [ { "BearerAuth": [] } ], "description": "Generates a new API key for the authenticated user, invalidating the old one.", "produces": [ "application/json" ], "tags": [ "User" ], "summary": "Regenerate API key", "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/api.APIResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/api.UserResponse" } } } ] } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/api.APIResponse" } } } } }, "/user/logout": { "post": { "security": [ { "BearerAuth": [] } ], "description": "Invalidates the current session and JWT token.", "produces": [ "application/json" ], "tags": [ "User" ], "summary": "Logout", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/api.APIResponse" } } } } }, "/user/password": { "put": { "security": [ { "BearerAuth": [] } ], "description": "Changes the password for the currently authenticated user.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "User" ], "summary": "Change password", "parameters": [ { "description": "Password change request", "name": "body", "in": "body", "required": true, "schema": { "type": "object", "properties": { "current_password": { "type": "string" }, "new_password": { "type": "string" } } } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/api.APIResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/api.APIResponse" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/api.APIResponse" } } } } }, "/user/refresh": { "post": { "security": [ { "BearerAuth": [] } ], "description": "Issues a new JWT access token using the current valid token.", "produces": [ "application/json" ], "tags": [ "User" ], "summary": "Refresh token", "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/api.APIResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/api.AuthResponse" } } } ] } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/api.APIResponse" } } } } } }, "definitions": { "duplicatelookup.Request": { "type": "object", "properties": { "algorithm": { "type": "string" }, "hash": { "type": "string" }, "name": { "type": "string" }, "size": { "type": "integer" } } }, "api.APIError": { "type": "object", "properties": { "code": { "type": "string" }, "details": { "type": "string" }, "message": { "type": "string" } } }, "api.APIMeta": { "type": "object", "properties": { "count": { "type": "integer" }, "limit": { "type": "integer" }, "offset": { "type": "integer" }, "total": { "type": "integer" } } }, "api.APIResponse": { "type": "object", "properties": { "data": {}, "error": { "$ref": "#/definitions/api.APIError" }, "meta": { "$ref": "#/definitions/api.APIMeta" }, "success": { "type": "boolean" } } }, "api.ArrsAPIResponse": { "type": "object", "properties": { "enabled": { "type": "boolean" }, "lidarr_instances": { "type": "array", "items": { "$ref": "#/definitions/api.ArrsInstanceAPIResponse" } }, "max_workers": { "type": "integer" }, "queue_cleanup_enabled": { "type": "boolean" }, "queue_cleanup_grace_period_minutes": { "type": "integer" }, "queue_cleanup_interval_seconds": { "type": "integer" }, "queue_cleanup_max_failures": { "type": "integer" }, "queue_cleanup_rules": { "type": "array", "items": { "$ref": "#/definitions/config.StuckCleanupRule" } }, "radarr_instances": { "type": "array", "items": { "$ref": "#/definitions/api.ArrsInstanceAPIResponse" } }, "readarr_instances": { "type": "array", "items": { "$ref": "#/definitions/api.ArrsInstanceAPIResponse" } }, "sonarr_instances": { "type": "array", "items": { "$ref": "#/definitions/api.ArrsInstanceAPIResponse" } }, "sportarr_instances": { "type": "array", "items": { "$ref": "#/definitions/api.ArrsInstanceAPIResponse" } }, "webhook_base_url": { "type": "string" }, "whisparr_instances": { "type": "array", "items": { "$ref": "#/definitions/api.ArrsInstanceAPIResponse" } } } }, "api.ArrsDeletedFile": { "type": "object", "properties": { "path": { "type": "string" } } }, "api.ArrsInstanceAPIResponse": { "type": "object", "properties": { "api_key": { "type": "string" }, "api_key_set": { "type": "boolean" }, "category": { "type": "string" }, "enabled": { "type": "boolean" }, "name": { "type": "string" }, "sync_interval_hours": { "type": "integer" }, "url": { "type": "string" } } }, "api.ArrsWebhookRequest": { "type": "object", "properties": { "album": { "type": "object", "properties": { "id": { "type": "integer" }, "title": { "type": "string" } } }, "artist": { "type": "object", "properties": { "id": { "type": "integer" }, "path": { "type": "string" } } }, "author": { "type": "object", "properties": { "id": { "type": "integer" }, "path": { "type": "string" } } }, "book": { "type": "object", "properties": { "id": { "type": "integer" }, "title": { "type": "string" } } }, "bookFile": { "type": "object", "properties": { "id": { "type": "integer" } } }, "deletedFiles": { "type": "array", "items": { "$ref": "#/definitions/api.ArrsDeletedFile" } }, "downloadId": { "type": "string" }, "episodeFile": { "type": "object", "properties": { "id": { "type": "integer" }, "path": { "type": "string" }, "sceneName": { "type": "string" } } }, "episodes": { "type": "array", "items": { "type": "object", "properties": { "episodeNumber": { "type": "integer" }, "id": { "type": "integer" }, "seasonNumber": { "type": "integer" }, "title": { "type": "string" } } } }, "eventType": { "type": "string" }, "filePath": { "type": "string" }, "instanceName": { "type": "string" }, "movie": { "description": "For upgrades/renames, the file path might be in other fields or need to be inferred", "type": "object", "properties": { "folderPath": { "type": "string" }, "id": { "type": "integer" }, "tmdbId": { "type": "integer" } } }, "movieFile": { "type": "object", "properties": { "id": { "type": "integer" }, "path": { "type": "string" }, "sceneName": { "type": "string" } } }, "release": { "type": "object", "properties": { "indexer": { "type": "string" }, "releaseTitle": { "type": "string" } } }, "series": { "type": "object", "properties": { "id": { "type": "integer" }, "path": { "type": "string" }, "tvdbId": { "type": "integer" } } }, "trackFile": { "type": "object", "properties": { "id": { "type": "integer" } } } } }, "api.AuthResponse": { "type": "object", "properties": { "message": { "type": "string" }, "redirect_url": { "type": "string" }, "user": { "$ref": "#/definitions/api.UserResponse" } } }, "api.ComponentHealth": { "type": "object", "properties": { "details": { "type": "string" }, "message": { "type": "string" }, "status": { "description": "\"healthy\", \"degraded\", \"unhealthy\"", "type": "string" } } }, "api.ConfigAPIResponse": { "type": "object", "properties": { "api": { "$ref": "#/definitions/config.APIConfig" }, "api_key": { "description": "User's API key for authentication", "type": "string" }, "arrs": { "$ref": "#/definitions/api.ArrsAPIResponse" }, "auth": { "$ref": "#/definitions/config.AuthConfig" }, "database": { "$ref": "#/definitions/config.DatabaseConfig" }, "download_key": { "description": "SHA256 of the API key, used for download/stream URLs", "type": "string" }, "fuse": { "$ref": "#/definitions/config.FuseConfig" }, "health": { "$ref": "#/definitions/config.HealthConfig" }, "import": { "$ref": "#/definitions/api.ImportAPIResponse" }, "log": { "$ref": "#/definitions/config.LogConfig" }, "memory_limit_mb": { "description": "MemoryLimitMB is the Go soft memory limit. Unset or 0 derives it from\nthe budgets that allocate (see SoftMemoryLimit); a positive value pins\nit; a negative value leaves the runtime default. GOMEMLIMIT in the\nenvironment always takes precedence.", "type": "integer" }, "metadata": { "$ref": "#/definitions/config.MetadataConfig" }, "mount_path": { "type": "string" }, "mount_type": { "$ref": "#/definitions/config.MountType" }, "network": { "$ref": "#/definitions/config.NetworkConfig" }, "par2_repair": { "$ref": "#/definitions/config.Par2RepairConfig" }, "profiler_enabled": { "type": "boolean" }, "providers": { "type": "array", "items": { "$ref": "#/definitions/api.ProviderAPIResponse" } }, "rclone": { "$ref": "#/definitions/api.RCloneAPIResponse" }, "sabnzbd": { "$ref": "#/definitions/api.SABnzbdAPIResponse" }, "segment_cache": { "$ref": "#/definitions/config.SegmentCacheConfig" }, "streaming": { "$ref": "#/definitions/config.StreamingConfig" }, "stremio": { "$ref": "#/definitions/api.StremioAPIResponse" }, "user_agent": { "description": "UserAgent is the HTTP User-Agent sent on every outbound HTTP request that\nidentifies AltMount (indexer NZB downloads, metadata lookups, nzblnk://\nresolution, GitHub release checks). Defaults to a browser-like string\nbecause some public indexers reject non-browser agents. Leave empty to\nuse the default.", "type": "string" }, "webdav": { "$ref": "#/definitions/api.WebDAVAPIResponse" } } }, "api.CorruptedMetadataStatsResponse": { "type": "object", "properties": { "file_count": { "type": "integer" }, "total_bytes": { "type": "integer" } } }, "api.DailyStat": { "type": "object", "properties": { "completed": { "type": "integer" }, "day": { "type": "string" }, "failed": { "type": "integer" } } }, "api.DryRunSyncResult": { "type": "object", "properties": { "database_records_to_clean": { "description": "Number of database records to clean", "type": "integer" }, "orphaned_library_files": { "description": "Number of orphaned library files (symlinks/STRM)", "type": "integer" }, "orphaned_metadata_count": { "description": "Number of orphaned metadata files", "type": "integer" }, "would_cleanup": { "description": "Whether cleanup would occur based on config", "type": "boolean" } } }, "api.FileMetadataResponse": { "type": "object", "properties": { "available_segments": { "type": "integer" }, "created_at": { "type": "string" }, "encryption": { "type": "string" }, "file_size": { "type": "integer" }, "modified_at": { "type": "string" }, "nested_sources": { "type": "array", "items": { "$ref": "#/definitions/api.NestedSourceResponse" } }, "password_protected": { "type": "boolean" }, "segment_count": { "type": "integer" }, "segments": { "type": "array", "items": { "$ref": "#/definitions/api.SegmentInfoResponse" } }, "source_nzb_path": { "type": "string" }, "status": { "type": "string" } } }, "api.HealthCheckRequest": { "type": "object", "properties": { "file_path": { "type": "string" }, "library_path": { "type": "string" }, "max_retries": { "type": "integer" }, "priority": { "$ref": "#/definitions/database.HealthPriority" }, "source_nzb_path": { "type": "string" } } }, "api.HealthCleanupRequest": { "type": "object", "properties": { "delete_files": { "description": "Whether to also delete the physical files", "type": "boolean" }, "older_than": { "type": "string" }, "status": { "$ref": "#/definitions/database.HealthStatus" } } }, "api.HealthItemResponse": { "type": "object", "properties": { "created_at": { "type": "string" }, "error_details": { "type": "string" }, "file_path": { "type": "string" }, "id": { "type": "integer" }, "indexer": { "description": "Added indexer", "type": "string" }, "is_masked": { "type": "boolean" }, "last_checked": { "type": "string" }, "last_error": { "type": "string" }, "library_path": { "type": "string" }, "max_repair_retries": { "type": "integer" }, "max_retries": { "type": "integer" }, "metadata": { "type": "string" }, "priority": { "$ref": "#/definitions/database.HealthPriority" }, "repair_retry_count": { "type": "integer" }, "retry_count": { "type": "integer" }, "scheduled_check_at": { "type": "string" }, "source_nzb_path": { "type": "string" }, "status": { "$ref": "#/definitions/database.HealthStatus" }, "streaming_failure_count": { "description": "Failure masking fields", "type": "integer" }, "updated_at": { "type": "string" } } }, "api.HealthRepairRequest": { "type": "object", "properties": { "reset_repair_retry_count": { "type": "boolean" } } }, "api.HealthStatsResponse": { "type": "object", "properties": { "checking": { "type": "integer" }, "corrupted": { "type": "integer" }, "degraded": { "type": "integer" }, "healthy": { "type": "integer" }, "pending": { "type": "integer" }, "repair_triggered": { "type": "integer" }, "total": { "type": "integer" } } }, "api.HealthWorkerStatusResponse": { "type": "object", "properties": { "current_run_files_checked": { "type": "integer" }, "current_run_start_time": { "type": "string" }, "error_count": { "type": "integer" }, "last_error": { "type": "string" }, "last_run_time": { "type": "string" }, "next_run_time": { "type": "string" }, "status": { "type": "string" }, "total_files_checked": { "type": "integer" }, "total_files_corrupted": { "type": "integer" }, "total_files_healthy": { "type": "integer" }, "total_runs_completed": { "type": "integer" } } }, "api.ImportAPIResponse": { "type": "object", "properties": { "allow_nested_rar_extraction": { "type": "boolean" }, "allowed_file_extensions": { "type": "array", "items": { "type": "string" } }, "filter_sample_files": { "type": "boolean" }, "import_dir": { "type": "string" }, "import_strategy": { "$ref": "#/definitions/config.ImportStrategy" }, "max_download_prefetch": { "type": "integer" }, "max_processor_workers": { "type": "integer" }, "queue_processing_interval_seconds": { "description": "Interval in seconds", "type": "integer" }, "read_timeout_seconds": { "type": "integer" }, "rename_to_nzb_name": { "type": "boolean" }, "segment_sample_percentage": { "description": "Percentage of segments to check (1-100)", "type": "integer" }, "stream_headroom_connections": { "description": "StreamHeadroomConnections is nil when the reservation derives from pool\nsize, and an explicit 0 when the operator has disabled it entirely.", "type": "integer" }, "watch_dir": { "type": "string" }, "watch_interval_seconds": { "type": "integer" } } }, "api.ImportHistoryResponse": { "type": "object", "properties": { "category": { "type": "string" }, "completed_at": { "type": "string" }, "file_name": { "type": "string" }, "file_size": { "type": "integer" }, "id": { "type": "integer" }, "indexer": { "description": "Added indexer", "type": "string" }, "library_path": { "type": "string" }, "metadata": { "type": "string" }, "nzb_id": { "type": "integer" }, "nzb_name": { "type": "string" }, "virtual_path": { "type": "string" } } }, "api.LoginRequest": { "type": "object", "properties": { "password": { "type": "string" }, "username": { "type": "string" } } }, "api.ManualImportRequest": { "type": "object", "properties": { "file_path": { "type": "string" }, "relative_path": { "type": "string" }, "skip_arr_notification": { "type": "boolean" } } }, "api.ManualImportResponse": { "type": "object", "properties": { "message": { "type": "string" }, "queue_id": { "type": "integer" } } }, "api.ManualScanRequest": { "type": "object", "properties": { "path": { "type": "string" } } }, "api.NestedSegmentResponse": { "type": "object", "properties": { "end_offset": { "type": "integer" }, "message_id": { "type": "string" }, "segment_size": { "type": "integer" }, "start_offset": { "type": "integer" } } }, "api.NestedSourceResponse": { "type": "object", "properties": { "encrypted": { "type": "boolean" }, "inner_length": { "type": "integer" }, "inner_volume_size": { "type": "integer" }, "segment_count": { "type": "integer" }, "segments": { "type": "array", "items": { "$ref": "#/definitions/api.NestedSegmentResponse" } }, "volume_index": { "type": "integer" } } }, "api.NewsnabIndexerAPIResponse": { "type": "object", "properties": { "api_key": { "type": "string" }, "api_key_set": { "type": "boolean" }, "categories": { "type": "array", "items": { "type": "integer" } }, "enabled": { "type": "boolean" }, "id": { "type": "string" }, "name": { "type": "string" }, "timeout_seconds": { "type": "integer" }, "url": { "type": "string" }, "weight": { "type": "integer" } } }, "api.PipelineDepthSample": { "type": "object", "properties": { "depth": { "type": "integer" }, "mbps": { "type": "number" } } }, "api.PipelineTuneResponse": { "type": "object", "properties": { "baseline_mbps": { "type": "number" }, "best_mbps": { "type": "number" }, "enabled": { "type": "boolean" }, "improvement_pct": { "type": "number" }, "recommended_inflight": { "type": "integer" }, "recommended_stat_inflight": { "type": "integer" }, "test_connections": { "type": "integer" }, "tested": { "type": "array", "items": { "$ref": "#/definitions/api.PipelineDepthSample" } }, "warning": { "type": "string" } } }, "api.PoolMetricsResponse": { "type": "object", "properties": { "articles_downloaded": { "type": "integer" }, "articles_posted": { "type": "integer" }, "bytes_downloaded": { "type": "integer" }, "bytes_downloaded_24h": { "type": "integer" }, "bytes_uploaded": { "type": "integer" }, "download_speed_bytes_per_sec": { "type": "number" }, "max_download_speed_bytes_per_sec": { "type": "number" }, "provider_bytes": { "type": "object", "additionalProperties": { "type": "integer", "format": "int64" } }, "provider_errors": { "type": "object", "additionalProperties": { "type": "integer", "format": "int64" } }, "providers": { "type": "array", "items": { "$ref": "#/definitions/api.ProviderStatusResponse" } }, "started_at": { "type": "string" }, "timestamp": { "type": "string" }, "total_errors": { "type": "integer" }, "upload_speed_bytes_per_sec": { "type": "number" } } }, "api.ProviderAPIResponse": { "type": "object", "properties": { "account_expiration_date": { "type": "string" }, "enabled": { "type": "boolean" }, "host": { "type": "string" }, "id": { "description": "ID is a stable public provider identifier; it is not an authentication field.", "type": "string" }, "inflight_requests": { "type": "integer" }, "insecure_tls": { "type": "boolean" }, "is_backup_provider": { "type": "boolean" }, "keepalive_command": { "type": "string" }, "keepalive_interval_seconds": { "type": "integer" }, "last_rtt_ms": { "type": "integer" }, "last_speed_test_mbps": { "type": "number" }, "last_speed_test_time": { "type": "string" }, "max_connections": { "type": "integer" }, "min_connections_alive": { "type": "integer" }, "name": { "type": "string" }, "password_set": { "type": "boolean" }, "port": { "type": "integer" }, "proxy_url": { "type": "string" }, "max_article_age_days": { "description": "How far back this provider's retention reaches, in days. Articles older than this are fetched from it only after every provider that does reach back that far. 0 means no limit.", "type": "integer" }, "quota_bytes": { "type": "integer" }, "quota_period_hours": { "type": "integer" }, "skip_ping": { "type": "boolean" }, "stat_inflight_requests": { "type": "integer" }, "storage_group": { "type": "string" }, "strict_max_article_age": { "description": "Makes max_article_age_days binding rather than an ordering preference: the provider is not contacted at all for an article older than its retention.", "type": "boolean" }, "tls": { "type": "boolean" }, "user_agent": { "type": "string" }, "username": { "type": "string" } } }, "api.ProviderCreateRequest": { "type": "object", "properties": { "enabled": { "type": "boolean" }, "host": { "type": "string" }, "insecure_tls": { "type": "boolean" }, "is_backup_provider": { "type": "boolean" }, "max_connections": { "type": "integer" }, "min_connections_alive": { "type": "integer" }, "password": { "type": "string" }, "port": { "type": "integer" }, "proxy_url": { "type": "string" }, "storage_group": { "type": "string" }, "tls": { "type": "boolean" }, "username": { "type": "string" } } }, "api.ProviderHistoricalStatResponse": { "type": "object", "properties": { "bytes_downloaded": { "type": "integer" }, "provider_id": { "type": "string" }, "timestamp": { "type": "string" } } }, "api.ProviderHistoricalStatsResponse": { "type": "object", "properties": { "stats": { "type": "array", "items": { "$ref": "#/definitions/api.ProviderHistoricalStatResponse" } } } }, "api.ProviderReorderRequest": { "type": "object", "properties": { "provider_ids": { "type": "array", "items": { "type": "string" } } } }, "api.ProviderSpeedTestHistoryResponse": { "type": "object", "properties": { "history": { "type": "array", "items": { "$ref": "#/definitions/api.ProviderSpeedTestHistoryStat" } } } }, "api.ProviderSpeedTestHistoryStat": { "type": "object", "properties": { "created_at": { "type": "string" }, "id": { "type": "integer" }, "provider_id": { "type": "string" }, "speed_mbps": { "type": "number" } } }, "api.ProviderSpeedTestResponse": { "type": "object", "properties": { "duration_seconds": { "type": "number" }, "speed_mbps": { "type": "number" } } }, "api.ProviderStatusResponse": { "type": "object", "properties": { "byte_count": { "type": "integer" }, "byte_count_24h": { "type": "integer" }, "current_speed_bytes_per_sec": { "type": "number" }, "error_count": { "type": "integer" }, "failure_reason": { "type": "string" }, "host": { "type": "string" }, "id": { "type": "string" }, "last_connection_attempt": { "type": "string" }, "last_speed_test_mbps": { "type": "number" }, "last_speed_test_time": { "type": "string" }, "last_successful_connect": { "type": "string" }, "max_connections": { "type": "integer" }, "missing_count": { "type": "integer" }, "missing_rate_per_minute": { "type": "number" }, "missing_warning": { "type": "boolean" }, "name": { "type": "string" }, "ping_ms": { "type": "integer" }, "quota_bytes": { "type": "integer" }, "quota_exceeded": { "type": "boolean" }, "quota_reset_at": { "type": "string" }, "quota_used": { "type": "integer" }, "started_at": { "type": "string" }, "state": { "type": "string" }, "used_connections": { "type": "integer" } } }, "api.ProviderTestRequest": { "type": "object", "properties": { "host": { "type": "string" }, "insecure_tls": { "type": "boolean" }, "password": { "type": "string" }, "port": { "type": "integer" }, "proxy_url": { "type": "string" }, "tls": { "type": "boolean" }, "username": { "type": "string" } } }, "api.ProviderUpdateRequest": { "type": "object", "properties": { "enabled": { "type": "boolean" }, "host": { "type": "string" }, "insecure_tls": { "type": "boolean" }, "is_backup_provider": { "type": "boolean" }, "max_connections": { "type": "integer" }, "min_connections_alive": { "type": "integer" }, "password": { "type": "string" }, "port": { "type": "integer" }, "proxy_url": { "type": "string" }, "storage_group": { "type": "string" }, "tls": { "type": "boolean" }, "username": { "type": "string" } } }, "api.ProwlarrAPIResponse": { "type": "object", "properties": { "api_key": { "type": "string" }, "api_key_set": { "type": "boolean" }, "categories": { "type": "array", "items": { "type": "integer" } }, "custom_scores": { "type": "object", "additionalProperties": { "type": "integer" } }, "enabled": { "type": "boolean" }, "exclude_keywords": { "type": "array", "items": { "type": "string" } }, "host": { "type": "string" }, "indexers": { "type": "array", "items": { "type": "integer" } }, "languages": { "type": "array", "items": { "type": "string" } }, "preferred_indexer_names": { "type": "array", "items": { "type": "string" } }, "preferred_indexers": { "type": "array", "items": { "type": "integer" } }, "preferred_languages": { "type": "array", "items": { "type": "string" } }, "qualities": { "type": "array", "items": { "type": "string" } } } }, "api.QueueHistoricalStatsResponse": { "type": "object", "properties": { "daily": { "type": "array", "items": { "$ref": "#/definitions/api.DailyStat" } }, "last_24_hours": { "$ref": "#/definitions/api.QueueHistoryRange" }, "last_30_days": { "$ref": "#/definitions/api.QueueHistoryRange" }, "last_365_days": { "$ref": "#/definitions/api.QueueHistoryRange" }, "last_7_days": { "$ref": "#/definitions/api.QueueHistoryRange" } } }, "api.QueueHistoryRange": { "type": "object", "properties": { "completed": { "type": "integer" }, "failed": { "type": "integer" }, "percentage": { "type": "number" } } }, "api.QueueItemResponse": { "type": "object", "properties": { "batch_id": { "type": "string" }, "category": { "type": "string" }, "completed_at": { "type": "string" }, "created_at": { "type": "string" }, "error_message": { "type": "string" }, "file_size": { "type": "integer" }, "id": { "type": "integer" }, "indexer": { "description": "Indexer name", "type": "string" }, "max_retries": { "type": "integer" }, "metadata": { "type": "string" }, "nzb_display_name": { "type": "string" }, "nzb_path": { "type": "string" }, "percentage": { "description": "Progress percentage (0-100), only for items being processed", "type": "integer" }, "priority": { "$ref": "#/definitions/database.QueuePriority" }, "retry_count": { "type": "integer" }, "stage": { "description": "Progress stage (e.g. \"Validating segments\")", "type": "string" }, "started_at": { "type": "string" }, "status": { "$ref": "#/definitions/database.QueueStatus" }, "storage_path": { "description": "Internal FUSE mount path (populated after completion)", "type": "string" }, "target_path": { "type": "string" }, "updated_at": { "type": "string" } } }, "api.QueueStatsResponse": { "type": "object", "properties": { "avg_processing_time_ms": { "type": "integer" }, "last_updated": { "type": "string" }, "total_completed": { "type": "integer" }, "total_failed": { "type": "integer" }, "total_processing": { "type": "integer" }, "total_queued": { "type": "integer" } } }, "api.RCloneAPIResponse": { "type": "object", "properties": { "allow_non_empty": { "type": "boolean" }, "allow_other": { "description": "Mount-Specific Settings", "type": "boolean" }, "async_read": { "type": "boolean" }, "attr_timeout": { "type": "string" }, "buffer_size": { "type": "string" }, "cache_dir": { "description": "VFS Cache Settings", "type": "string" }, "dir_cache_time": { "type": "string" }, "gid": { "type": "integer" }, "links": { "type": "boolean" }, "log_level": { "description": "System and filesystem options", "type": "string" }, "mount_enabled": { "description": "Mount Configuration", "type": "boolean" }, "mount_options": { "type": "object", "additionalProperties": { "type": "string" } }, "no_checksum": { "type": "boolean" }, "no_mod_time": { "description": "Advanced Settings", "type": "boolean" }, "password_set": { "description": "Encryption", "type": "boolean" }, "rc_enabled": { "type": "boolean" }, "rc_options": { "type": "object", "additionalProperties": { "type": "string" } }, "rc_pass_set": { "type": "boolean" }, "rc_port": { "type": "integer" }, "rc_url": { "type": "string" }, "rc_user": { "type": "string" }, "rcd_restart_after": { "description": "RcdRestartAfter is how long the rcd may stay unresponsive to liveness\nprobes before it is killed and restarted. Empty means the built-in default.", "type": "string" }, "read_only": { "type": "boolean" }, "salt_set": { "type": "boolean" }, "syslog": { "type": "boolean" }, "timeout": { "type": "string" }, "transfers": { "type": "integer" }, "uid": { "type": "integer" }, "umask": { "type": "string" }, "use_mmap": { "type": "boolean" }, "vfs_cache_max_age": { "type": "string" }, "vfs_cache_max_size": { "type": "string" }, "vfs_cache_min_free_space": { "type": "string" }, "vfs_cache_mode": { "type": "string" }, "vfs_cache_poll_interval": { "type": "string" }, "vfs_disk_space_total": { "type": "string" }, "vfs_fast_fingerprint": { "type": "boolean" }, "vfs_name": { "type": "string" }, "vfs_read_ahead": { "type": "string" }, "vfs_read_chunk_size": { "type": "string" }, "vfs_read_chunk_size_limit": { "type": "string" }, "vfs_read_chunk_streams": { "type": "integer" } } }, "api.RegisterRequest": { "type": "object", "properties": { "email": { "type": "string" }, "password": { "type": "string" }, "username": { "type": "string" } } }, "api.ResetAdminPasswordRequest": { "type": "object", "properties": { "new_password": { "type": "string" }, "username": { "type": "string" } } }, "api.SABnzbdAPIResponse": { "type": "object", "properties": { "categories": { "type": "array", "items": { "$ref": "#/definitions/config.SABnzbdCategory" } }, "complete_dir": { "type": "string" }, "download_client_base_url": { "type": "string" }, "enabled": { "type": "boolean" }, "fallback_api_key": { "description": "Obfuscated if set", "type": "string" }, "fallback_api_key_set": { "description": "Indicates if API key is set", "type": "boolean" }, "fallback_host": { "type": "string" }, "history_retention_minutes": { "type": "integer" } } }, "api.ScanStatusResponse": { "type": "object", "properties": { "current_file": { "type": "string" }, "files_added": { "type": "integer" }, "files_found": { "type": "integer" }, "last_error": { "type": "string" }, "path": { "type": "string" }, "start_time": { "type": "string" }, "status": { "type": "string" } } }, "api.SegmentInfoResponse": { "type": "object", "properties": { "available": { "type": "boolean" }, "end_offset": { "type": "integer" }, "message_id": { "type": "string" }, "segment_size": { "type": "integer" }, "start_offset": { "type": "integer" } } }, "api.StreamScoringAPIResponse": { "type": "object", "properties": { "custom_formats": { "type": "array", "items": { "$ref": "#/definitions/api.TrashCustomFormatAPIResponse" } }, "exclude_keywords": { "type": "array", "items": { "type": "string" } }, "exclude_regex": { "type": "string" }, "preferred_languages": { "type": "array", "items": { "type": "string" } }, "preset": { "type": "string" }, "require_preferred_language": { "type": "boolean" } } }, "api.StremioAPIResponse": { "type": "object", "properties": { "addon_description": { "type": "string" }, "addon_name": { "type": "string" }, "base_url": { "type": "string" }, "direct_stream": { "type": "boolean" }, "enabled": { "type": "boolean" }, "failed_release_ttl_hours": { "description": "No omitempty: an explicit 0 must survive the round-trip, otherwise saving the\nconfig would silently restore the defaults.", "type": "integer" }, "fallback_timeout_ms": { "type": "integer" }, "fast_fail_header_only": { "type": "boolean" }, "include_library_streams": { "type": "boolean" }, "indexers": { "$ref": "#/definitions/api.StremioIndexersAPIResponse" }, "max_fallback_releases": { "type": "integer" }, "max_retries": { "type": "integer" }, "nzb_ttl_hours": { "type": "integer" }, "prowlarr": { "$ref": "#/definitions/api.ProwlarrAPIResponse" }, "scoring": { "$ref": "#/definitions/api.StreamScoringAPIResponse" }, "show_cached_indicator": { "type": "boolean" }, "stream_ttl_seconds": { "type": "integer" } } }, "api.StremioIndexersAPIResponse": { "type": "object", "properties": { "custom_user_agent": { "type": "string" }, "newsnab": { "type": "array", "items": { "$ref": "#/definitions/api.NewsnabIndexerAPIResponse" } }, "provider": { "type": "string" }, "prowlarr": { "$ref": "#/definitions/api.ProwlarrAPIResponse" }, "user_agent_mode": { "type": "string" } } }, "api.StremioStream": { "type": "object", "properties": { "name": { "type": "string" }, "title": { "type": "string" }, "url": { "type": "string" } } }, "api.StremioStreamsResponse": { "type": "object", "properties": { "_cached": { "description": "Cached is true when streams were served from an already-completed queue item\nwithout re-processing. Callers such as AIOStreams can use this to show an\n\"instant\" indicator to the user.", "type": "boolean" }, "_queue_item_id": { "type": "integer" }, "_queue_status": { "type": "string" }, "streams": { "type": "array", "items": { "$ref": "#/definitions/api.StremioStream" } } } }, "api.SystemCleanupRequest": { "type": "object", "properties": { "dry_run": { "type": "boolean" }, "health_older_than": { "type": "string" }, "queue_older_than": { "type": "string" } } }, "api.SystemCleanupResponse": { "type": "object", "properties": { "dry_run": { "type": "boolean" }, "health_records_removed": { "type": "integer" }, "queue_items_removed": { "type": "integer" } } }, "api.SystemHealthResponse": { "type": "object", "properties": { "components": { "type": "object", "additionalProperties": { "$ref": "#/definitions/api.ComponentHealth" } }, "status": { "description": "\"healthy\", \"degraded\", \"unhealthy\"", "type": "string" }, "timestamp": { "type": "string" } } }, "api.SystemInfoResponse": { "type": "object", "properties": { "git_commit": { "type": "string" }, "go_version": { "type": "string" }, "start_time": { "type": "string" }, "uptime": { "type": "string" }, "version": { "type": "string" } } }, "api.SystemRestartRequest": { "type": "object", "properties": { "force": { "description": "Force restart even if unsafe", "type": "boolean" } } }, "api.SystemRestartResponse": { "type": "object", "properties": { "message": { "type": "string" }, "timestamp": { "type": "string" } } }, "api.SystemStatsResponse": { "type": "object", "properties": { "health": { "$ref": "#/definitions/api.HealthStatsResponse" }, "queue": { "$ref": "#/definitions/api.QueueStatsResponse" }, "system": { "$ref": "#/definitions/api.SystemInfoResponse" } } }, "api.TestConnectionRequest": { "type": "object", "properties": { "api_key": { "type": "string" }, "type": { "type": "string" }, "url": { "type": "string" } } }, "api.TestProviderResponse": { "type": "object", "properties": { "error_message": { "type": "string" }, "rtt_ms": { "type": "integer" }, "success": { "type": "boolean" } } }, "api.TrashCustomFormatAPIResponse": { "type": "object", "properties": { "category": { "type": "string" }, "enabled": { "type": "boolean" }, "id": { "type": "string" }, "invert": { "type": "boolean" }, "is_custom": { "type": "boolean" }, "name": { "type": "string" }, "pattern": { "type": "string" }, "pattern_type": { "type": "string" }, "score": { "type": "integer" } } }, "api.UpdateChannel": { "type": "string", "enum": [ "latest", "dev" ], "x-enum-varnames": [ "UpdateChannelLatest", "UpdateChannelDev" ] }, "api.UpdateStatusResponse": { "type": "object", "properties": { "binary_update_available": { "type": "boolean" }, "channel": { "$ref": "#/definitions/api.UpdateChannel" }, "current_version": { "type": "string" }, "docker_available": { "type": "boolean" }, "git_commit": { "type": "string" }, "latest_version": { "type": "string" }, "release_url": { "type": "string" }, "update_available": { "type": "boolean" } } }, "api.UserResponse": { "type": "object", "properties": { "api_key": { "type": "string" }, "avatar_url": { "type": "string" }, "email": { "type": "string" }, "id": { "type": "string" }, "is_admin": { "type": "boolean" }, "last_login": { "type": "string" }, "name": { "type": "string" }, "provider": { "type": "string" } } }, "api.WebDAVAPIResponse": { "type": "object", "properties": { "host": { "type": "string" }, "password": { "description": "Masked if set", "type": "string" }, "port": { "type": "integer" }, "user": { "type": "string" } } }, "api.prowlarrIndexersRequest": { "type": "object", "properties": { "api_key": { "type": "string" }, "host": { "type": "string" } } }, "api.stremioManifest": { "type": "object", "properties": { "catalogs": { "type": "array", "items": {} }, "description": { "type": "string" }, "id": { "type": "string" }, "idPrefixes": { "type": "array", "items": { "type": "string" } }, "name": { "type": "string" }, "resources": { "type": "array", "items": { "type": "string" } }, "types": { "type": "array", "items": { "type": "string" } }, "version": { "type": "string" } } }, "config.APIConfig": { "type": "object", "properties": { "allowed_origins": { "type": "array", "items": { "type": "string" } }, "key_override": { "type": "string" }, "prefix": { "type": "string" } } }, "config.ArrsConfig": { "type": "object", "properties": { "enabled": { "type": "boolean" }, "lidarr_instances": { "type": "array", "items": { "$ref": "#/definitions/config.ArrsInstanceConfig" } }, "max_workers": { "type": "integer" }, "queue_cleanup_enabled": { "type": "boolean" }, "queue_cleanup_grace_period_minutes": { "type": "integer" }, "queue_cleanup_interval_seconds": { "type": "integer" }, "queue_cleanup_max_failures": { "description": "QueueCleanupMaxFailures is the per-target failure circuit breaker. After\nAltMount has acted on the same target (a Radarr movie or Sonarr/Whisparr\nepisode that keeps failing import) this many times — via queue cleanup,\nhealth-repair re-searches or the partial-pack reconcile — it gives up:\nit blocklists without re-searching and unmonitors the item in the *arr so it\nstops being automatically re-grabbed. 0 (the default) disables the breaker.", "type": "integer" }, "queue_cleanup_rules": { "description": "QueueCleanupRules matches an *arr status message for a stuck/failed import and\ndecides the action (remove / blocklist / blocklist+search). This is the single\nmessage-rule list for queue cleanup; ghost/empty-folder detection runs alongside\nit in the same pass. Only items owned by AltMount's download client are touched\n(see issue #523).", "type": "array", "items": { "$ref": "#/definitions/config.StuckCleanupRule" } }, "radarr_instances": { "type": "array", "items": { "$ref": "#/definitions/config.ArrsInstanceConfig" } }, "readarr_instances": { "type": "array", "items": { "$ref": "#/definitions/config.ArrsInstanceConfig" } }, "sonarr_instances": { "type": "array", "items": { "$ref": "#/definitions/config.ArrsInstanceConfig" } }, "sportarr_instances": { "type": "array", "items": { "$ref": "#/definitions/config.ArrsInstanceConfig" } }, "webhook_base_url": { "type": "string" }, "whisparr_instances": { "type": "array", "items": { "$ref": "#/definitions/config.ArrsInstanceConfig" } } } }, "config.ArrsInstanceConfig": { "type": "object", "properties": { "api_key": { "type": "string" }, "category": { "type": "string" }, "enabled": { "type": "boolean" }, "name": { "type": "string" }, "sync_interval_hours": { "type": "integer" }, "url": { "type": "string" } } }, "config.AuthConfig": { "type": "object", "properties": { "login_required": { "type": "boolean" } } }, "config.DatabaseConfig": { "type": "object", "properties": { "dsn": { "description": "DSN is the PostgreSQL connection string (postgres only).\nExample: \"postgres://user:password@localhost:5432/altmount?sslmode=disable\"", "type": "string" }, "path": { "description": "Path is the SQLite database file path (sqlite only).", "type": "string" }, "type": { "description": "Type selects the database backend: \"sqlite\" (default) or \"postgres\".", "type": "string" } } }, "config.FailureMaskingConfig": { "type": "object", "properties": { "enabled": { "type": "boolean" }, "threshold": { "type": "integer" } } }, "config.FuseConfig": { "type": "object", "properties": { "allow_other": { "type": "boolean" }, "async_buffer_max_total_mb": { "description": "AsyncBufferMaxTotalMB caps total read-ahead memory across all open files\n(MB). Buffers reserve their size only while actively streaming; over the\ncap, additional streams run unbuffered. 0 = unlimited.", "type": "integer" }, "async_buffer_size_mb": { "description": "AsyncBufferSizeMB is the per-open-file read-ahead buffer size (MB). A\nbackground goroutine fills it ahead of the player so reads are served\nfrom memory instead of blocking on the network, mirroring the buffering\nrclone's VFS provides over WebDAV. 0 disables read-ahead (every read is a\ndirect passthrough — the previous behavior).", "type": "integer" }, "attr_timeout_seconds": { "type": "integer" }, "backend": { "description": "\"hanwen\" or \"cgo\" (empty = platform default)", "type": "string" }, "debug": { "type": "boolean" }, "enabled": { "type": "boolean" }, "entry_timeout_seconds": { "type": "integer" }, "max_cache_size_mb": { "type": "integer" }, "max_read_ahead_mb": { "type": "integer" }, "mount_path": { "type": "string" }, "no_mod_time": { "description": "NoModTime reports epoch for all timestamps (mtime, ctime, atime); prevents\nmedia servers re-scanning on unstable VFS mtimes. Note: tools like find -atime\nwill not see meaningful access times on this mount.", "type": "boolean" } } }, "config.HealthConfig": { "type": "object", "properties": { "acceptable_missing_segments_percentage": { "type": "number" }, "check_all_segments": { "type": "boolean" }, "check_batch_size": { "type": "integer" }, "check_interval_seconds": { "type": "integer" }, "cleanup_orphaned_metadata": { "type": "boolean" }, "corrupted_retention_days": { "description": "CorruptedRetentionDays bounds how long the corrupted_metadata safety copies\ncreated by MoveToCorrupted are kept before the health cycle prunes them.\nnil or 0 means keep forever, which is what every install did before this\nsetting existed.", "type": "integer" }, "corruption_action": { "description": "CorruptionAction controls what happens when the health checker or a streaming read\nconfirms real (non-degraded) corruption: \"repair\" (default) triggers an Arr rescan;\n\"delete\" removes the file's metadata/NZB/health record and cleans up now-empty\nparent directories instead. Degraded files are never affected either way.", "type": "string" }, "enabled": { "type": "boolean" }, "excluded_categories": { "description": "ExcludedCategories lists SABnzbd category names whose files must never be\nregistered for health checking by the library-sync discovery pass. Matching\nis by the category's configured directory under CompleteDir and is\ncase-insensitive. Empty means no categories are excluded.", "type": "array", "items": { "type": "string" } }, "library_dir": { "type": "string" }, "library_sync_concurrency": { "type": "integer" }, "library_sync_interval_minutes": { "type": "integer" }, "max_concurrent_jobs": { "type": "integer" }, "max_concurrent_segment_checks": { "description": "MaxConcurrentSegmentChecks bounds how many STAT checks a health sweep keeps\nin flight. STAT is bodyless and pipelines many per connection, so connection\ncount is the wrong unit — the import path already sizes its sweep by STAT\npipeline depth (see importer/processor.go).\n\nnil or 0 means \"adapt\": the pool narrows the sweep to one connection's depth\nwhile a stream is playing and widens it to the pool's aggregate STAT capacity\nwhen idle, which measured 24x the sweep throughput on an idle pool.", "type": "integer" }, "max_connections_for_health_checks": { "description": "Deprecated: superseded by MaxConcurrentSegmentChecks, which is named for\nwhat it actually bounds. Read for one-time migration only (see\nmigrateHealthSweepConcurrency), then cleared. Do not use in new code.", "type": "integer" }, "max_retries": { "type": "integer" }, "read_timeout_seconds": { "type": "integer" }, "repair": { "$ref": "#/definitions/config.RepairConfig" }, "resolve_repair_on_import": { "type": "boolean" }, "segment_sample_percentage": { "description": "SegmentSamplePercentage is the fraction (1-100) of segments randomly sampled\nduring health-check sweeps (post-import validation only). Distinct from\nImport.SegmentSamplePercentage, which samples during archive extraction.\nHigher sampling catches more corruption but adds overhead. Default 5%.", "type": "integer" }, "verify_content": { "description": "VerifyContent, when true, probes each eligible video/audio file's\nfirst bytes through the serving stack during a health check and\nmarks the file corrupted if no recognized media container signature\nis found. Distinct from the unrelated, unused VerifyData field above.", "type": "boolean" }, "verify_content_timeout_seconds": { "type": "integer" }, "verify_data": { "type": "boolean" } } }, "config.ImportConfig": { "type": "object", "properties": { "allow_nested_rar_extraction": { "type": "boolean" }, "allowed_file_extensions": { "type": "array", "items": { "type": "string" } }, "expand_bluray_iso": { "type": "boolean" }, "failed_item_retention_hours": { "type": "integer" }, "filter_sample_files": { "type": "boolean" }, "history_retention_days": { "type": "integer" }, "import_dir": { "type": "string" }, "import_strategy": { "$ref": "#/definitions/config.ImportStrategy" }, "iso_analyze_timeout_seconds": { "type": "integer" }, "max_concurrent_imports": { "description": "MaxConcurrentImports caps the number of NZB imports that may run\nend-to-end at the same time. 0 = unlimited. NNTP connection use is\nbalanced automatically: imports share the pool's full capacity and\nyield to streams (priority lane + adaptive connection budget).", "type": "integer" }, "max_download_prefetch": { "type": "integer" }, "max_processor_workers": { "type": "integer" }, "queue_processing_interval_seconds": { "type": "integer" }, "read_timeout_seconds": { "type": "integer" }, "rename_to_nzb_name": { "type": "boolean" }, "segment_sample_percentage": { "description": "SegmentSamplePercentage is the fraction (1-100) of segments randomly sampled\nduring import-phase validation (RAR extraction, archive integrity). Distinct from\nHealth.SegmentSamplePercentage, which samples during post-import health checks.\nLower defaults faster imports but skips error detection. Default 1%.", "type": "integer" }, "stream_headroom_connections": { "description": "StreamHeadroomConnections is how many connections are held back from\nimport per active stream. On a saturated link those connections are slack\n— they are not converting into bytes — so handing them to playback costs\nlittle and measurably shortens stream latency. Past that point the pool\ncan no longer fill the link and import throughput really does fall.\n\nMeasured at 100 connections behind a 400 MB/s link: 8 is free (import\n358 vs 359 MB/s) and takes stream p50 190ms -\u003e 179ms; 32 costs ~13% import\nand takes p50 to 146ms and p99 245ms -\u003e 167ms. The right value depends on\nthe link rate and pool size, so it is a knob rather than a constant.\n0 disables the reservation entirely.\nA nil pointer means \"unset, use the default\"; an explicit 0 disables the\nreservation. A plain int cannot express that difference, since YAML omits\nand YAML-zero both decode to 0.", "type": "integer" }, "verify_content": { "description": "VerifyContent, when true, probes each eligible video/audio file's\nfirst bytes through the serving stack after import and fails the\nimport if no recognized media container signature is found.", "type": "boolean" }, "verify_content_timeout_seconds": { "type": "integer" }, "watch_dir": { "type": "string" }, "watch_interval_seconds": { "type": "integer" } } }, "config.ImportStrategy": { "type": "string", "enum": [ "NONE", "SYMLINK", "STRM" ], "x-enum-varnames": [ "ImportStrategyNone", "ImportStrategySYMLINK", "ImportStrategySTRM" ] }, "config.LogConfig": { "type": "object", "properties": { "compress": { "description": "Compress old log files", "type": "boolean" }, "file": { "description": "Log file path (empty = console only)", "type": "string" }, "level": { "description": "Log level (debug, info, warn, error)", "type": "string" }, "max_age": { "description": "Max age in days to keep files", "type": "integer" }, "max_backups": { "description": "Max number of old files to keep", "type": "integer" }, "max_size": { "description": "Max size in MB before rotation", "type": "integer" } } }, "config.MetadataBackupConfig": { "type": "object", "properties": { "enabled": { "type": "boolean" }, "keep_backups": { "type": "integer" }, "path": { "type": "string" }, "schedule": { "description": "cron expression (UTC)", "type": "string" } } }, "config.MetadataConfig": { "type": "object", "properties": { "backup": { "$ref": "#/definitions/config.MetadataBackupConfig" }, "migration": { "$ref": "#/definitions/config.MetadataMigrationConfig" }, "root_path": { "type": "string" } } }, "config.MetadataMigrationConfig": { "type": "object", "properties": { "default_group": { "description": "DefaultGroup is the newsgroup written into synthesized NzbStore entries.\nLegacy metas do not retain the original groups, and nzb.BuildNZB renders an\nempty \u003cgroups\u003e element without this, which most NZB clients reject.", "type": "string" } } }, "config.MountType": { "type": "string", "enum": [ "none", "rclone", "fuse", "rclone_external" ], "x-enum-varnames": [ "MountTypeNone", "MountTypeRClone", "MountTypeFuse", "MountTypeRCloneExternal" ] }, "config.NetworkConfig": { "type": "object", "properties": { "http_proxy": { "type": "string" }, "https_proxy": { "type": "string" }, "no_proxy": { "type": "string" } } }, "config.NewsnabIndexerConfig": { "type": "object", "properties": { "api_key": { "type": "string" }, "categories": { "type": "array", "items": { "type": "integer" } }, "enabled": { "type": "boolean" }, "id": { "type": "string" }, "name": { "type": "string" }, "timeout_seconds": { "type": "integer" }, "url": { "type": "string" }, "weight": { "type": "integer" } } }, "config.Par2RepairConfig": { "type": "object", "properties": { "arr_first": { "description": "ArrFirst makes PAR2 repair the fallback for corrupted files: the health\nworker triggers the ARR rescan first exactly as before, and enqueues a\nPAR2 repair only when nothing is found in the ARRs (no instance\nconfigured, none tracks the file) or ARR repair is disabled. On by\ndefault; disable to keep PAR2 out of the corrupted-file flow (degraded\nfiles, playback holes and repair-on-import still repair via PAR2\ndirectly).", "type": "boolean" }, "enabled": { "type": "boolean" }, "max_concurrent_jobs": { "description": "MaxConcurrentJobs bounds simultaneously running repair jobs.", "type": "integer" }, "max_connections": { "description": "MaxConnections bounds how many NNTP connections repair jobs use for\narticle fetches (shared across concurrent jobs). Repair streams the\nwhole release once, so this directly sets its download speed on an idle\npool. Fetches ride the pool's background lane: while anything streams\nor imports, the pool holds repair to a quarter of each provider's\nconnections regardless of this value. 0 (default) means 10.", "type": "integer" }, "max_memory_mb": { "description": "MaxMemoryMB bounds one job's in-heap solver memory; jobs needing more\nstill run, backed by memory-mapped scratch files next to the patch store.", "type": "integer" }, "max_patch_store_mb": { "description": "MaxPatchStoreMB bounds the on-disk patch store size; oldest patches are\nevicted first when the cap is exceeded. 0 (default) means unlimited.", "type": "integer" }, "max_release_size_mb": { "type": "integer" }, "max_repair_ratio": { "description": "MaxRepairRatio caps how large a fraction of a file's bytes a repair may\nreconstruct. The release's PAR2 redundancy is always the hard ceiling.", "type": "number" }, "min_release_size_mb": { "description": "MinReleaseSizeMB / MaxReleaseSizeMB bound the size of releases repair\ntakes on (content bytes, PAR2 files excluded). A repair downloads the\nwhole release once, so these let users skip releases too large to be\nworth the bandwidth or too small to bother with. 0 (default) means\nunbounded on that side — all sizes are repaired.", "type": "integer" }, "patch_dir": { "description": "PatchDir is where repaired article payloads (and the solver's transient\nscratch files) are stored. Empty (default) means \u003cmetadata_root\u003e/patches.\nApplied at startup; changing it does not move existing patches.", "type": "string" }, "repair_on_import": { "description": "RepairOnImport queues a repair as soon as an import completes with\nconfirmed missing segments, instead of waiting for the first playback or\na health check. Off by default: every repair costs one full release\ndownload, so a large damaged backlog would be expensive. Worth enabling\nwhen your library outlives article retention — a release's PAR2 volumes\nare most likely to still be retrievable close to the post date.", "type": "boolean" } } }, "config.ProviderConfig": { "type": "object", "properties": { "account_expiration_date": { "type": "string" }, "enabled": { "type": "boolean" }, "host": { "type": "string" }, "id": { "description": "ID is a stable public identifier used in pool names, metrics, and errors.\nIt must never contain credentials or non-graphic characters.", "type": "string" }, "inflight_requests": { "description": "InflightRequests caps concurrent decoded article bodies per connection (memory\nceiling). In practice, the pool-wide ImportBudget caps total in-flight bodies\nto roughly the connection count, so each connection carries ~1 body. Peak observed\ndepth is 3-4 against this cap of 10. Raising it does not improve import throughput.", "type": "integer" }, "insecure_tls": { "type": "boolean" }, "is_backup_provider": { "type": "boolean" }, "keepalive_command": { "type": "string" }, "keepalive_interval_seconds": { "type": "integer" }, "last_rtt_ms": { "type": "integer" }, "last_speed_test_mbps": { "type": "number" }, "last_speed_test_time": { "type": "string" }, "max_connections": { "type": "integer" }, "min_connections_alive": { "type": "integer" }, "name": { "type": "string" }, "port": { "type": "integer" }, "proxy_url": { "type": "string" }, "max_article_age_days": { "description": "How far back this provider's retention reaches, in days. Articles older than this are fetched from it only after every provider that does reach back that far. 0 means no limit.", "type": "integer" }, "quota_bytes": { "type": "integer" }, "quota_period_hours": { "type": "integer" }, "skip_ping": { "type": "boolean" }, "stat_inflight_requests": { "description": "StatInflightRequests caps the per-connection STAT pipeline depth (bodyless\nexistence checks). Its pool-wide aggregate (connections × depth, clamped to 4096)\ndetermines how much an idle-pool health sweep can widen: measured 24x sweep\nthroughput improvement. While a stream is active the sweep is capped lower regardless.", "type": "integer" }, "storage_group": { "type": "string" }, "strict_max_article_age": { "description": "Makes max_article_age_days binding rather than an ordering preference: the provider is not contacted at all for an article older than its retention.", "type": "boolean" }, "stream_inflight_requests": { "description": "StreamInflightRequests caps streaming (priority-lane) bodies in flight\nper connection, so a playback read never queues behind a connection's\nworth of read-ahead. 0 defaults to 4; values above inflight_requests\nare capped to it.", "type": "integer" }, "tls": { "type": "boolean" }, "user_agent": { "type": "string" }, "username": { "type": "string" } } }, "config.ProwlarrConfig": { "type": "object", "properties": { "api_key": { "description": "APIKey is the Prowlarr API key.", "type": "string" }, "categories": { "description": "Categories filters search results by Newznab category IDs.\nDefaults to 5000 (Movies), 5010 (Movies/Foreign), 5030 (TV), 5040 (TV/HD).", "type": "array", "items": { "type": "integer" } }, "custom_scores": { "description": "CustomScores maps keyword/regex patterns to numeric scores (TRaSH guide style).\nPositive scores promote releases; negative scores demote them.\nExamples: {\"2160p\": 500, \"REMUX\": 300, \"DV\": -1000}", "type": "object", "additionalProperties": { "type": "integer" } }, "enabled": { "description": "Enabled controls whether Prowlarr search is active for the Stremio addon.", "type": "boolean" }, "exclude_keywords": { "description": "ExcludeKeywords is an optional list of keywords/patterns; releases containing any are dropped.\nExamples: [\"DV\", \"DoVi\", \"CAM\", \"TS\", \"TeleSync\"]", "type": "array", "items": { "type": "string" } }, "host": { "description": "Host is the Prowlarr base URL (e.g. \"http://localhost:9696\").", "type": "string" }, "indexers": { "description": "Indexers optionally restricts searches to specific Prowlarr indexer IDs.\nEmpty = search across all configured indexers.", "type": "array", "items": { "type": "integer" } }, "languages": { "description": "Languages is an optional list of keywords; releases must contain at least one to pass.\nEmpty = no filtering. Examples: [\"Esp\", \"🇪🇸\", \"Spanish\", \"DUAL\"]", "type": "array", "items": { "type": "string" } }, "preferred_indexer_names": { "description": "PreferredIndexerNames lists Prowlarr indexer names/keywords to prioritize and rank above others.", "type": "array", "items": { "type": "string" } }, "preferred_indexers": { "description": "PreferredIndexers lists Prowlarr indexer IDs to prioritize and rank above others.", "type": "array", "items": { "type": "integer" } }, "preferred_languages": { "description": "PreferredLanguages lists language keywords to prioritize and rank above others.", "type": "array", "items": { "type": "string" } }, "qualities": { "description": "Qualities is an optional list of keywords; releases must contain at least one to pass.\nEmpty = no filtering. Examples: [\"1080p\", \"HD\", \"4K\", \"3D\"]", "type": "array", "items": { "type": "string" } } } }, "config.RCloneConfig": { "type": "object", "properties": { "allow_non_empty": { "type": "boolean" }, "allow_other": { "description": "Mount-Specific Settings", "type": "boolean" }, "async_read": { "type": "boolean" }, "attr_timeout": { "type": "string" }, "buffer_size": { "type": "string" }, "cache_dir": { "description": "VFS Cache Settings", "type": "string" }, "dir_cache_time": { "type": "string" }, "gid": { "type": "integer" }, "links": { "type": "boolean" }, "log_level": { "type": "string" }, "mount_enabled": { "description": "Mount Configuration", "type": "boolean" }, "mount_options": { "type": "object", "additionalProperties": { "type": "string" } }, "no_checksum": { "type": "boolean" }, "no_mod_time": { "description": "Advanced Settings", "type": "boolean" }, "path": { "description": "RClone Path", "type": "string" }, "rc_enabled": { "description": "RC (Remote Control) Configuration", "type": "boolean" }, "rc_options": { "type": "object", "additionalProperties": { "type": "string" } }, "rc_pass": { "type": "string" }, "rc_port": { "type": "integer" }, "rc_url": { "type": "string" }, "rc_user": { "type": "string" }, "rcd_restart_after": { "description": "RcdRestartAfter is how long the rcd subprocess must stay unresponsive to\nliveness probes before it is killed and restarted. Empty means the built-in\ndefault. Restarting is disruptive, because re-establishing the mount\nunmounts it out from under every process reading it, so an install whose\nrcd goes briefly slow under load can raise this to ride the stall out.", "type": "string" }, "read_only": { "type": "boolean" }, "syslog": { "type": "boolean" }, "timeout": { "type": "string" }, "transfers": { "type": "integer" }, "uid": { "type": "integer" }, "umask": { "type": "string" }, "use_mmap": { "type": "boolean" }, "vfs_cache_max_age": { "type": "string" }, "vfs_cache_max_size": { "type": "string" }, "vfs_cache_min_free_space": { "type": "string" }, "vfs_cache_mode": { "type": "string" }, "vfs_cache_poll_interval": { "type": "string" }, "vfs_disk_space_total": { "type": "string" }, "vfs_fast_fingerprint": { "type": "boolean" }, "vfs_name": { "type": "string" }, "vfs_read_ahead": { "type": "string" }, "vfs_read_chunk_size": { "type": "string" }, "vfs_read_chunk_size_limit": { "type": "string" }, "vfs_read_chunk_streams": { "type": "integer" } } }, "config.RepairConfig": { "type": "object", "properties": { "auto_search_wait_seconds": { "description": "AutoSearchWaitSeconds bounds how long a repair waits for the ARR's own\nautomatic redownload search — queued by the ARR the moment a release is\nblocklisted — to finish before the file record is deleted and AltMount\nissues its own targeted search. 0 disables the wait and restores the\nprevious fire-and-forget ordering.", "type": "integer" }, "enabled": { "type": "boolean" }, "exponential_backoff": { "type": "boolean" }, "file_delete_confirm_seconds": { "description": "FileDeleteConfirmSeconds bounds how long a repair waits for the ARR to\nreport the deleted file record as unlinked before issuing its search.", "type": "integer" }, "interval_minutes": { "type": "integer" }, "max_cooldown_hours": { "type": "integer" }, "max_repair_retries": { "type": "integer" } } }, "config.SABnzbdCategory": { "type": "object", "properties": { "dir": { "type": "string" }, "name": { "type": "string" }, "order": { "type": "integer" }, "priority": { "type": "integer" }, "type": { "description": "\"sonarr\" or \"radarr\"", "type": "string" } } }, "config.SABnzbdConfig": { "type": "object", "properties": { "categories": { "type": "array", "items": { "$ref": "#/definitions/config.SABnzbdCategory" } }, "complete_dir": { "type": "string" }, "download_client_base_url": { "type": "string" }, "enabled": { "type": "boolean" }, "fallback_api_key": { "description": "Masked in API responses", "type": "string" }, "fallback_host": { "description": "Fallback configuration for sending failed imports to external SABnzbd", "type": "string" }, "history_retention_minutes": { "description": "HistoryRetentionMinutes controls how far back the SABnzbd-emulating history\nendpoint looks into import_history when *arr clients poll without a specific\nnzo_id filter. Older entries are still returned when *arr asks for them by\nnzo_id. Defaults to 10080 (7 days).", "type": "integer" } } }, "config.SegmentCacheConfig": { "type": "object", "properties": { "cache_path": { "type": "string" }, "enabled": { "type": "boolean" }, "expiry_hours": { "description": "ExpiryHours controls how long cached segments are kept before automatic\neviction. Set to 0 to disable expiry (cache forever, bounded only by\nMaxSizeGB via LRU eviction). Left unset (nil) it defaults to 24 hours.", "type": "integer" }, "max_size_gb": { "type": "integer" }, "memory_mb": { "description": "MemoryMB bounds the in-memory tier of decoded articles that sits in\nfront of the disk cache and is on even when the disk cache is off.\nLeft unset (nil) it defaults to 256; an explicit 0 disables it.", "type": "integer" } } }, "config.StreamScoringConfig": { "type": "object", "properties": { "custom_formats": { "type": "array", "items": { "$ref": "#/definitions/config.TrashCustomFormatConfig" } }, "exclude_keywords": { "type": "array", "items": { "type": "string" } }, "exclude_regex": { "type": "string" }, "preferred_languages": { "type": "array", "items": { "type": "string" } }, "preset": { "type": "string" }, "require_preferred_language": { "type": "boolean" } } }, "config.StreamingConfig": { "type": "object", "properties": { "failure_masking": { "$ref": "#/definitions/config.FailureMaskingConfig" }, "max_prefetch": { "type": "integer" }, "read_timeout_seconds": { "description": "ReadTimeoutSeconds bounds a single streaming read (WebDAV Read and FUSE\nReadAt alike). Nothing below this layer carries a deadline the caller can\nobserve: a segment fetch that stalls without erroring parks the read\nindefinitely, and on FUSE that means an uninterruptible D-state for the\nreading process. On expiry the in-flight reader is interrupted and the\nread fails, so the caller gets an EIO it can act on. 0 uses the built-in\ndefault; a negative value disables the timeout.", "type": "integer" } } }, "config.StremioConfig": { "type": "object", "properties": { "addon_description": { "description": "AddonDescription is the description shown in Stremio's addon catalog.", "type": "string" }, "addon_name": { "description": "AddonName is the display name shown in Stremio's addon catalog.", "type": "string" }, "base_url": { "description": "BaseURL is the public base URL used when building Stremio stream links\n(e.g. \"https://altmount.example.com\"). Falls back to the auto-detected\nrequest origin when not set.", "type": "string" }, "direct_stream": { "description": "DirectStream when true streams NZB media segments directly.", "type": "boolean" }, "enabled": { "description": "Enabled controls whether the endpoint is active. Disabled by default.\nWhen false, the endpoint returns 404 Not Found.", "type": "boolean" }, "failed_release_ttl_hours": { "description": "FailedReleaseTTLHours controls how long a release that failed to import stays\nexcluded from the Stremio stream list. Mirrors NzbTTLHours semantics: it filters\nfailure records by age rather than deleting them, so it is bounded above by\nImport.FailedItemRetentionHours. Set to 0 to exclude for as long as the record\nsurvives. Defaults to 24 hours.", "type": "integer" }, "fallback_timeout_ms": { "description": "FallbackTimeoutMs is the timeout before attempting a fallback release.", "type": "integer" }, "fast_fail_header_only": { "description": "FastFailHeaderOnly when true causes Stremio-originated imports to fail fast\nimmediately on the release-level probe when missing articles are detected,\nskipping the multi-part RAR per-file Stat sweep. Defaults to true.", "type": "boolean" }, "include_library_streams": { "description": "IncludeLibraryStreams when true checks and presents matching completed files\nfrom your Altmount library as instant 0s stream options in Stremio. Defaults to true.", "type": "boolean" }, "indexers": { "description": "Indexers configures Prowlarr and direct Newsnab search providers.", "allOf": [ { "$ref": "#/definitions/config.StremioIndexersConfig" } ] }, "max_fallback_releases": { "description": "MaxFallbackReleases caps how many *extra* releases a single play request may try\nafter the first one fails. Set to 0 to disable fallback. Defaults to 2.", "type": "integer" }, "max_retries": { "description": "MaxRetries is the maximum number of retry attempts for stream fetching.", "type": "integer" }, "nzb_ttl_hours": { "description": "NzbTTLHours controls how long a completed NZB result is cached before\nthe same NZB is re-processed on the next request.\nSet to 0 to disable expiry (cache forever). Defaults to 24 hours.", "type": "integer" }, "prowlarr": { "description": "Prowlarr configures the legacy Prowlarr indexer settings (retained for compatibility).", "allOf": [ { "$ref": "#/definitions/config.ProwlarrConfig" } ] }, "scoring": { "description": "Scoring configures TRaSH format scoring and exclusions.", "allOf": [ { "$ref": "#/definitions/config.StreamScoringConfig" } ] }, "show_cached_indicator": { "description": "ShowCachedIndicator when true shows cached badges in stream titles.", "type": "boolean" }, "stream_ttl_seconds": { "description": "StreamTTLSeconds is the stream cache expiration time in seconds.", "type": "integer" } } }, "config.StremioIndexersConfig": { "type": "object", "properties": { "custom_user_agent": { "type": "string" }, "newsnab": { "type": "array", "items": { "$ref": "#/definitions/config.NewsnabIndexerConfig" } }, "provider": { "description": "\"prowlarr\", \"newsnab\", \"both\"", "type": "string" }, "prowlarr": { "$ref": "#/definitions/config.ProwlarrConfig" }, "user_agent_mode": { "type": "string" } } }, "config.StuckCleanupRule": { "type": "object", "properties": { "action": { "type": "string" }, "enabled": { "type": "boolean" }, "message": { "type": "string" } } }, "config.TrashCustomFormatConfig": { "type": "object", "properties": { "category": { "type": "string" }, "enabled": { "type": "boolean" }, "id": { "type": "string" }, "invert": { "type": "boolean" }, "is_custom": { "type": "boolean" }, "name": { "type": "string" }, "pattern": { "type": "string" }, "pattern_type": { "type": "string" }, "score": { "type": "integer" } } }, "config.WebDAVConfig": { "type": "object", "properties": { "host": { "type": "string" }, "password": { "type": "string" }, "port": { "type": "integer" }, "user": { "type": "string" } } }, "database.HealthPriority": { "type": "integer", "enum": [ 0, 1, 2 ], "x-enum-varnames": [ "HealthPriorityNormal", "HealthPriorityHigh", "HealthPriorityNext" ] }, "database.HealthStatus": { "type": "string", "enum": [ "pending", "checking", "healthy", "repair_triggered", "corrupted", "degraded" ], "x-enum-comments": { "HealthStatusChecking": "File is currently being checked", "HealthStatusCorrupted": "File has missing segments or is corrupted", "HealthStatusDegraded": "Missing segments only hit media payload: still playable, no repair", "HealthStatusHealthy": "File passed health check", "HealthStatusPending": "File has not been checked yet", "HealthStatusRepairTriggered": "File repair has been triggered in Arrs" }, "x-enum-descriptions": [ "File has not been checked yet", "File is currently being checked", "File passed health check", "File repair has been triggered in Arrs", "File has missing segments or is corrupted", "Missing segments only hit media payload: still playable, no repair" ], "x-enum-varnames": [ "HealthStatusPending", "HealthStatusChecking", "HealthStatusHealthy", "HealthStatusRepairTriggered", "HealthStatusCorrupted", "HealthStatusDegraded" ] }, "database.QueuePriority": { "type": "integer", "enum": [ 1, 2, 3 ], "x-enum-varnames": [ "QueuePriorityHigh", "QueuePriorityNormal", "QueuePriorityLow" ] }, "database.QueueStatus": { "type": "string", "enum": [ "pending", "processing", "completed", "failed", "paused", "fallback", "waiting_repair" ], "x-enum-comments": { "QueueStatusFallback": "Sent to external SABnzbd as fallback" }, "x-enum-descriptions": [ "", "", "", "", "", "Sent to external SABnzbd as fallback", "" ], "x-enum-varnames": [ "QueueStatusPending", "QueueStatusProcessing", "QueueStatusCompleted", "QueueStatusFailed", "QueueStatusPaused", "QueueStatusFallback", "QueueStatusWaitingRepair" ] } }, "securityDefinitions": { "ApiKeyAuth": { "type": "apiKey", "name": "apikey", "in": "query" } }, "tags": [ { "description": "NZB download queue management", "name": "Queue" }, { "description": "File health monitoring and repair", "name": "Health" }, { "description": "File metadata, streams, and NZB export", "name": "Files" }, { "description": "Manual file imports and directory scanning", "name": "Import" }, { "description": "NNTP provider management", "name": "Providers" }, { "description": "Sonarr/Radarr integration", "name": "ARRs" }, { "description": "Configuration management", "name": "Config" }, { "description": "System stats, health, and maintenance", "name": "System" }, { "description": "FUSE mount management", "name": "FUSE" }, { "description": "Stremio addon and NZB stream endpoints", "name": "Stremio" }, { "description": "Authentication and registration", "name": "Auth" }, { "description": "Current user management", "name": "User" } ] }