The System API covers the operational surface of Riven: health probes, aggregated library statistics, log access, debug bundle generation, VFS and mount introspection, downloader account information, API key rotation, and Trakt OAuth. Most routes sit directly underDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/rivenmedia/riven/llms.txt
Use this file to discover all available pages before exploring further.
/api/v1 (no sub-prefix). All endpoints except GET /api/v1/ require a valid API key.
Root
GET /
Returns a basic liveness confirmation. This is the only endpoint that does not require authentication, making it suitable for container health checks.Always
"Riven is running!".Current Riven version string (e.g.
"0.18.0").Health
GET /health
Returns the initialization state of the mainProgram service. Use this probe after the root check to confirm that Riven has finished booting.
"True" when Program.initialized is True; "False" otherwise.Services
GET /services
Returns an object mapping every registered service key to a boolean indicating whether that service is currently initialized and running.Statistics
GET /stats
Returns aggregated counts and activity data for the media library.Total number of
MediaItem rows.Number of movie items.
Number of TV show items.
Number of season items.
Number of episode items.
Number of movies and episodes that have an associated
FilesystemEntry (i.e. are symlinked).Number of items whose
last_state is not Completed.Dictionary mapping each
States enum value to its item count. Example: {"Completed": 1234, "Failed": 5}.Dictionary mapping ISO 8601 date strings to the number of items requested on that date. Example:
{"2024-11-15": 12}.Array of
{"year": 2023, "count": 45} objects showing how many items were released in each year.Events
GET /events
Return a snapshot of pending event updates from the Event Manager. The response maps each event type name to a list of item IDs that have a queued event of that type. Useful for debugging pipeline queues without connecting to the SSE stream.Dictionary mapping event type strings to arrays of integer item IDs. Example:
{"Scraping": [42, 99], "Downloading": [17]}.Logs
GET /logs
Read the current log file and return every line as a string array. This is a point-in-time snapshot — use the SSElogging stream at /api/v1/stream/logging for a live tail.
Array of log lines in the order they appear in the log file.
404 if no log-file handler is configured.
POST /upload_logs
Upload the current log file to paste.c-net.org and return a public URL. The service has a 50 MB file-size limit and a 180-day retention period.Whether the upload succeeded.
Public URL of the uploaded log file.
Debug bundle
POST /debug
Generate a comprehensive debug bundle in one call. This endpoint:- Uploads the current log file to paste.c-net.org.
- Creates a local database backup snapshot.
- Collects system information.
true only if both the log upload and the database backup succeeded.Public URL of the uploaded log file, or
null if the upload failed.Filename of the database backup on the server, or
null if the backup failed.List of error messages for any steps that failed. Empty on full success.
Calendar
GET /calendar
Fetch a calendar view of all media items in the library grouped by release date.Dictionary mapping integer date keys to objects describing items releasing on that date.
Mount
GET /mount
List all files currently present in the Riven VFS mount directory. The response maps each filename to its absolute filesystem path.Dictionary of
filename → filepath entries. Example: {"movie.mkv": "/mnt/riven/movies/movie.mkv"}.VFS statistics
GET /vfs_stats
Return internal statistics from the Riven VFS file-system layer.Nested dictionary of VFS opener statistics keyed by stat name.
Downloader account info
GET /downloader_user_info
Return account information from all initialized debrid downloader services (Real-Debrid, AllDebrid, Debrid-Link).Array of service account info objects.
503 if no downloader service is initialized, 500 if no account info could be retrieved from any service.
API key generation
POST /generateapikey
Generate a new random API key, persist it immediately to the settings file, and return it. The previous key is invalidated as soon as this response is received.The newly generated API key string.
Trakt OAuth
GET /trakt/oauth/initiate
Begin the Trakt OAuth 2.0 authorization code flow. Returns a URL to redirect the user to for authorization.Full Trakt authorization URL to open in a browser. Example:
https://trakt.tv/oauth/authorize?response_type=code&client_id=....404 if the Trakt service is not enabled or has not been configured with an API key.
GET /trakt/oauth/callback
Exchange the OAuth authorization code returned by Trakt for an access token. Riven stores the token in settings automatically.The
code query parameter returned by Trakt after the user grants access."OAuth token obtained successfully" on success.400 if the code exchange fails, 404 if the Trakt API service is not found or no API key is configured.
Webhooks
POST /webhook/overseerr
Receive an Overseerr notification webhook and immediately add the requested media item to the Riven processing queue. Configure this URL in your Overseerr notification settings. Webhook URL to configure in Overseerr:MediaItem.
Whether the webhook was processed successfully.
Error description when
success is false.