### GET /api/v1/setup/status Source: https://context7.com/kkodecs/livrarr/llms.txt Checks if initial setup has been completed. ```APIDOC ## GET /api/v1/setup/status ### Description Checks if initial setup has been completed. Returns whether an admin account needs to be created. ### Method GET ### Endpoint /api/v1/setup/status ### Response #### Success Response (200) - **setupRequired** (boolean) - Indicates if setup is required. #### Response Example { "setupRequired": true } ``` -------------------------------- ### Initial Setup Commands Source: https://github.com/kkodecs/livrarr/blob/main/README.md Commands to create the configuration directory and set appropriate permissions before starting Livrarr with Docker Compose. ```bash mkdir config sudo chown 1000:1000 config docker compose up -d ``` -------------------------------- ### Complete Initial Setup Source: https://context7.com/kkodecs/livrarr/llms.txt Completes the initial setup by creating the admin account. This endpoint only works when no users exist in the system. It returns an API key and a session token. ```bash curl -X POST http://localhost:8789/api/v1/setup \ -H "Content-Type: application/json" \ -d '{ "username": "admin", "password": "secure-password-here" }' ``` -------------------------------- ### Check Setup Status Source: https://context7.com/kkodecs/livrarr/llms.txt Checks if the initial setup for Livrarr has been completed. Returns a boolean indicating if an admin account needs to be created. ```bash curl http://localhost:8789/api/v1/setup/status ``` -------------------------------- ### POST /api/v1/setup Source: https://context7.com/kkodecs/livrarr/llms.txt Completes initial setup by creating the admin account. ```APIDOC ## POST /api/v1/setup ### Description Completes initial setup by creating the admin account. Only works when no users exist. ### Method POST ### Endpoint /api/v1/setup ### Request Body - **username** (string) - Required - The admin username. - **password** (string) - Required - The admin password. ### Request Example { "username": "admin", "password": "secure-password-here" } ### Response #### Success Response (200) - **apiKey** (string) - The generated API key. - **token** (string) - The session token. #### Response Example { "apiKey": "abc123-your-api-key-xyz789", "token": "session-token-for-immediate-use" } ``` -------------------------------- ### GET /work Source: https://github.com/kkodecs/livrarr/blob/main/docs/llm-context.md Lists works in the library with support for pagination. ```APIDOC ## GET /work ### Description List works in the library. Supports pagination. ### Method GET ### Endpoint /work ### Parameters #### Query Parameters - **page** (integer) - Optional - Default: 1 - **page_size** (integer) - Optional - Default: 50, Max: 500 ### Response #### Success Response (200) - **items** (array) - List of works - **total** (integer) - Total count - **page** (integer) - Current page - **pageSize** (integer) - Items per page ``` -------------------------------- ### Docker Compose for Livrarr Deployment Source: https://github.com/kkodecs/livrarr/blob/main/docs/llm-context.md Example Docker Compose configuration for deploying Livrarr. Ensure volume mappings for config, library, and downloads are correctly set. ```yaml services: livrarr: image: ghcr.io/kkodecs/livrarr:0.1.0-alpha2 container_name: livrarr ports: - "8789:8789" volumes: - ./config:/config # config.toml, livrarr.db, covers, logs - /path/to/books:/books # ebook/audiobook library root - /path/to/downloads:/downloads # download client complete dir restart: unless-stopped security_opt: - no-new-privileges:true cap_drop: - ALL mem_limit: 512m ``` -------------------------------- ### GET /api/v1/indexer Source: https://context7.com/kkodecs/livrarr/llms.txt Lists all configured Torznab/Newznab indexers. ```APIDOC ## GET /api/v1/indexer ### Description Lists all configured Torznab/Newznab indexers. ### Method GET ### Endpoint /api/v1/indexer ### Response #### Success Response (200) - **id** (integer) - Unique identifier for the indexer. - **name** (string) - The name of the indexer. - **protocol** (string) - The protocol used by the indexer (e.g., "torrent"). - **url** (string) - The base URL of the indexer. - **apiPath** (string) - The API path for the indexer. - **apiKeySet** (boolean) - Indicates if an API key is set. - **categories** (array of integers) - List of category IDs supported by the indexer. - **priority** (integer) - Priority level for the indexer. - **enableAutomaticSearch** (boolean) - Whether automatic searching is enabled. - **enableInteractiveSearch** (boolean) - Whether interactive searching is enabled. - **supportsBookSearch** (boolean) - Whether the indexer supports book searches. - **enableRss** (boolean) - Whether RSS feeds are enabled. - **enabled** (boolean) - Whether the indexer is enabled. ### Response Example ```json [ { "id": 1, "name": "MyIndexer", "protocol": "torrent", "url": "https://indexer.example", "apiPath": "/api", "apiKeySet": true, "categories": [7020, 3030], "priority": 25, "enableAutomaticSearch": true, "enableInteractiveSearch": true, "supportsBookSearch": true, "enableRss": true, "enabled": true } ] ``` ``` -------------------------------- ### GET /system/status Source: https://github.com/kkodecs/livrarr/blob/main/docs/llm-context.md Retrieves system information including version, OS, uptime, and database path. ```APIDOC ## GET /system/status ### Description Retrieves system information including version, OS, uptime, and database path. Requires Admin authentication. ### Method GET ### Endpoint /system/status ``` -------------------------------- ### GET /api/v1/rootfolder Source: https://context7.com/kkodecs/livrarr/llms.txt Lists configured library root folders with disk space information. ```APIDOC ## GET /api/v1/rootfolder ### Description Lists configured library root folders with disk space information. ### Method GET ### Endpoint /api/v1/rootfolder ### Response #### Success Response (200) - **id** (integer) - Unique identifier for the root folder. - **path** (string) - The absolute path to the root folder on the server. - **mediaType** (string) - The type of media stored in this folder (e.g., "ebook", "audiobook"). - **freeSpace** (integer) - The amount of free space in bytes. - **totalSpace** (integer) - The total disk space in bytes. ### Response Example ```json [ { "id": 1, "path": "/books", "mediaType": "ebook", "freeSpace": 50000000000, "totalSpace": 100000000000 }, { "id": 2, "path": "/audiobooks", "mediaType": "audiobook", "freeSpace": 50000000000, "totalSpace": 100000000000 } ] ``` ``` -------------------------------- ### GET /api/v1/work Source: https://context7.com/kkodecs/livrarr/llms.txt Lists all works in the user's library. ```APIDOC ## GET /api/v1/work ### Description Lists all works in the user's library with pagination support. ### Method GET ### Endpoint /api/v1/work ### Parameters #### Query Parameters - **page** (integer) - Optional - Page number. - **pageSize** (integer) - Optional - Number of items per page. ### Response #### Success Response (200) - **items** (array) - List of works. - **total** (integer) - Total count of works. #### Response Example { "items": [ { "id": 42, "title": "Dune", "authorName": "Frank Herbert", "enrichmentStatus": "enriched", "libraryItems": [ { "id": 101, "path": "/books/Frank Herbert/Dune.epub", "mediaType": "ebook", "fileSize": 2048576, "importedAt": "2024-01-20T15:30:00Z" } ] } ], "total": 150 } ``` -------------------------------- ### GET /health Source: https://github.com/kkodecs/livrarr/blob/main/docs/llm-context.md Performs a basic health check on the Livrarr service. ```APIDOC ## GET /health ### Description Performs a basic health check on the Livrarr service. ### Method GET ### Endpoint /health ``` -------------------------------- ### GET /work/{id} Source: https://github.com/kkodecs/livrarr/blob/main/docs/llm-context.md Retrieves detailed information for a specific work, including library items. ```APIDOC ## GET /work/{id} ### Description Retrieves detailed information for a specific work, including library items. ### Method GET ### Endpoint /work/{id} ### Parameters #### Path Parameters - **id** (string) - Required - The unique identifier of the work ``` -------------------------------- ### GET /api/v1/auth/me Source: https://context7.com/kkodecs/livrarr/llms.txt Returns the currently authenticated user's information and authentication method. ```APIDOC ## GET /api/v1/auth/me ### Description Returns the currently authenticated user's information and authentication method. ### Method GET ### Endpoint /api/v1/auth/me ### Response #### Success Response (200) - **user** (object) - The user details. - **authType** (string) - The authentication method used. #### Response Example { "user": { "id": 1, "username": "admin", "role": "admin", "createdAt": "2024-01-15T10:30:00Z", "updatedAt": "2024-01-15T10:30:00Z" }, "authType": "api_key" } ``` -------------------------------- ### Get Authenticated User Info Source: https://context7.com/kkodecs/livrarr/llms.txt Retrieves information about the currently authenticated user and their authentication method. Requires an API key in the 'X-Api-Key' header. ```bash curl http://localhost:8789/api/v1/auth/me \ -H "X-Api-Key: your-api-key" ``` -------------------------------- ### Create Download Client Configuration Source: https://context7.com/kkodecs/livrarr/llms.txt Creates a new download client configuration for either qBittorrent or SABnzbd. ```bash curl -X POST http://localhost:8789/api/v1/downloadclient \ -H "X-Api-Key: your-api-key" \ -H "Content-Type: application/json" \ -d '{ "name": "qBittorrent", "implementation": "qBittorrent", "host": "qbittorrent.local", "port": 8080, "useSsl": false, "skipSslValidation": false, "username": "admin", "password": "adminpass", "category": "livrarr", "enabled": true }' ``` ```bash curl -X POST http://localhost:8789/api/v1/downloadclient \ -H "X-Api-Key: your-api-key" \ -H "Content-Type: application/json" \ -d '{ "name": "SABnzbd", "implementation": "sabnzbd", "host": "sabnzbd.local", "port": 8080, "useSsl": false, "apiKey": "your-sabnzbd-api-key", "category": "livrarr", "enabled": true }' ``` -------------------------------- ### List Download Clients Source: https://context7.com/kkodecs/livrarr/llms.txt Returns a list of all configured download clients. ```bash curl http://localhost:8789/api/v1/downloadclient \ -H "X-Api-Key: your-api-key" ``` -------------------------------- ### Create Root Folder Source: https://context7.com/kkodecs/livrarr/llms.txt Registers a new root folder for storing media files. ```bash curl -X POST http://localhost:8789/api/v1/rootfolder \ -H "X-Api-Key: your-api-key" \ -H "Content-Type: application/json" \ -d '{ "path": "/books", "mediaType": "ebook" }' ``` -------------------------------- ### GET /api/v1/work/lookup Source: https://context7.com/kkodecs/livrarr/llms.txt Searches metadata providers for book information. ```APIDOC ## GET /api/v1/work/lookup ### Description Searches metadata providers (OpenLibrary for English, Goodreads for foreign languages) for book information. ### Method GET ### Endpoint /api/v1/work/lookup ### Parameters #### Query Parameters - **term** (string) - Required - The search term. - **lang** (string) - Required - The language code. ### Response #### Success Response (200) - **items** (array) - List of matching works. #### Response Example [ { "olKey": "OL893415W", "title": "Dune", "authorName": "Frank Herbert", "authorOlKey": "OL4123456A", "year": 1965, "coverUrl": "https://covers.openlibrary.org/b/id/12345-M.jpg", "description": "A science fiction novel...", "seriesName": "Dune Chronicles", "seriesPosition": 1.0 } ] ``` -------------------------------- ### List Works in Library Source: https://context7.com/kkodecs/livrarr/llms.txt Lists all works in the user's library with support for pagination. Requires 'X-Api-Key' header. ```bash curl "http://localhost:8789/api/v1/work?page=1&pageSize=25" \ -H "X-Api-Key: your-api-key" ``` -------------------------------- ### Docker Compose for Livrarr Source: https://github.com/kkodecs/livrarr/blob/main/README.md Use this compose file to set up and run Livrarr as a Docker container. Ensure host paths for configuration, books, and downloads are correctly mapped. ```yaml services: livrarr: image: ghcr.io/kkodecs/livrarr:0.1.0-alpha2 container_name: livrarr ports: - 8789:8789 volumes: - ./config:/config - /path/to/books:/books - /path/to/downloads:/downloads restart: unless-stopped ``` -------------------------------- ### List Root Folders Source: https://context7.com/kkodecs/livrarr/llms.txt Lists all configured library root folders along with their disk space statistics. ```bash curl http://localhost:8789/api/v1/rootfolder \ -H "X-Api-Key: your-api-key" ``` -------------------------------- ### Check System Health Source: https://context7.com/kkodecs/livrarr/llms.txt Returns the status of external dependencies like qBittorrent and Hardcover. ```bash curl http://localhost:8789/api/v1/health \ -H "X-Api-Key: your-api-key" # Response: # [ # { # "source": "qBittorrent", # "checkType": "ok", # "message": "Connected" # }, # { # "source": "Hardcover", # "checkType": "ok", # "message": "API responding" # } # ] ``` -------------------------------- ### POST /api/v1/downloadclient Source: https://context7.com/kkodecs/livrarr/llms.txt Creates a new download client configuration. Supports various clients like qBittorrent and SABnzbd. ```APIDOC ## POST /api/v1/downloadclient ### Description Creates a new download client configuration. ### Method POST ### Endpoint /api/v1/downloadclient ### Request Body - **name** (string) - Required - The name of the download client. - **implementation** (string) - Required - The type of download client (e.g., "qBittorrent", "sabnzbd"). - **host** (string) - Required - The hostname or IP address of the download client. - **port** (integer) - Required - The port number for the download client. - **useSsl** (boolean) - Optional - Whether to use SSL/TLS for the connection. - **skipSslValidation** (boolean) - Optional - Whether to skip SSL certificate validation. - **username** (string) - Optional - Username for authentication. - **password** (string) - Optional - Password for authentication. - **apiKey** (string) - Optional - API key for clients that use it (e.g., SABnzbd). - **category** (string) - Optional - Default category for downloads. - **enabled** (boolean) - Optional - Whether the download client is enabled. ### Request Example ```json { "name": "qBittorrent", "implementation": "qBittorrent", "host": "qbittorrent.local", "port": 8080, "useSsl": false, "skipSslValidation": false, "username": "admin", "password": "adminpass", "category": "livrarr", "enabled": true } ``` ```json { "name": "SABnzbd", "implementation": "sabnzbd", "host": "sabnzbd.local", "port": 8080, "useSsl": false, "apiKey": "your-sabnzbd-api-key", "category": "livrarr", "enabled": true } ``` ``` -------------------------------- ### Create Indexer Configuration Source: https://context7.com/kkodecs/livrarr/llms.txt Adds a new indexer configuration to the system. ```bash curl -X POST http://localhost:8789/api/v1/indexer \ -H "X-Api-Key: your-api-key" \ -H "Content-Type: application/json" \ -d '{ "name": "MyIndexer", "protocol": "torrent", "url": "https://indexer.example", "apiPath": "/api", "apiKey": "your-indexer-api-key", "categories": [7020, 3030], "priority": 25, "enableAutomaticSearch": true, "enableInteractiveSearch": true, "enableRss": true, "enabled": true }' ``` -------------------------------- ### Server Configuration (config.toml) Source: https://context7.com/kkodecs/livrarr/llms.txt Optional file-based configuration for server, logging, and authentication settings. ```toml [server] bind_address = "0.0.0.0" # Network interface to bind port = 8789 # HTTP port url_base = "" # Reverse proxy path prefix, e.g. "/livrarr" [log] level = "info" # trace | debug | info | warn | error format = "text" # text | json [auth] # For reverse proxy authentication (optional) # external_header = "X-Remote-User" # trusted_proxies = ["10.0.0.0/8"] ``` -------------------------------- ### Grab Release Source: https://context7.com/kkodecs/livrarr/llms.txt Sends a selected release to the configured download client. ```bash curl -X POST http://localhost:8789/api/v1/release/grab \ -H "X-Api-Key: your-api-key" \ -H "Content-Type: application/json" \ -d '{ "workId": 42, "downloadUrl": "https://indexer.example/download/abc123", "title": "Frank Herbert - Dune (Retail EPUB)", "indexer": "MyIndexer", "guid": "abc123-unique-id", "size": 2500000, "protocol": "torrent", "categories": [7020] }' ``` -------------------------------- ### Test Download Client Configuration Source: https://context7.com/kkodecs/livrarr/llms.txt Tests a download client configuration without saving it to the database. ```bash curl -X POST http://localhost:8789/api/v1/downloadclient/test \ -H "X-Api-Key: your-api-key" \ -H "Content-Type: application/json" \ -d '{ "name": "Test qBit", "implementation": "qBittorrent", "host": "qbittorrent.local", "port": 8080, "useSsl": false, "username": "admin", "password": "adminpass", "category": "livrarr", "enabled": true }' ``` -------------------------------- ### Retrieve Metadata Configuration Source: https://context7.com/kkodecs/livrarr/llms.txt Fetches current metadata provider settings including Hardcover, LLM, and Audnexus configurations. ```bash curl http://localhost:8789/api/v1/config/metadata \ -H "X-Api-Key: your-api-key" # Response: # { # "hardcoverEnabled": true, # "hardcoverApiTokenSet": true, # "llmEnabled": true, # "llmProvider": "groq", # "llmEndpoint": "https://api.groq.com/openai/v1", # "llmApiKeySet": true, # "llmModel": "llama-3.3-70b-versatile", # "audnexusUrl": "https://api.audnex.us", # "languages": ["en", "fr", "de"] # } ``` -------------------------------- ### Advanced Configuration Options Source: https://github.com/kkodecs/livrarr/blob/main/README.md Optional TOML file for advanced Livrarr server and logging configurations. The port should match the one exposed in your Docker compose file. ```toml [server] port = 8789 # internal port (map externally in compose) bind_address = "0.0.0.0" [log] level = "info" # trace | debug | info | warn | error ``` -------------------------------- ### Scan Directory for Imports Source: https://context7.com/kkodecs/livrarr/llms.txt Scans a specified directory path for importable ebook and audiobook files. ```bash curl -X POST http://localhost:8789/api/v1/manualimport/scan \ -H "X-Api-Key: your-api-key" \ -H "Content-Type: application/json" \ -d '{ "path": "/downloads/completed/books" }' ``` -------------------------------- ### POST /release/grab Source: https://github.com/kkodecs/livrarr/blob/main/docs/llm-context.md Sends a release to the configured download client. ```APIDOC ## POST /release/grab ### Description Sends a release to the download client. ### Method POST ### Endpoint /release/grab ``` -------------------------------- ### Retrieve System Status Source: https://context7.com/kkodecs/livrarr/llms.txt Provides system information including version, paths, and uptime. ```bash curl http://localhost:8789/api/v1/system/status \ -H "X-Api-Key: your-api-key" # Response: # { # "version": "0.1.0-alpha2", # "osInfo": "Linux x86_64", # "dataDirectory": "/config", # "logFile": "/config/logs/livrarr.txt", # "startupTime": "2024-01-20T10:00:00Z", # "logLevel": "info" # } ``` -------------------------------- ### POST /api/v1/indexer Source: https://context7.com/kkodecs/livrarr/llms.txt Creates a new indexer configuration. ```APIDOC ## POST /api/v1/indexer ### Description Creates a new indexer configuration. ### Method POST ### Endpoint /api/v1/indexer ### Request Body - **name** (string) - Required - The name of the indexer. - **protocol** (string) - Required - The protocol used by the indexer (e.g., "torrent"). - **url** (string) - Required - The base URL of the indexer. - **apiPath** (string) - Required - The API path for the indexer. - **apiKey** (string) - Required - The API key for the indexer. - **categories** (array of integers) - Optional - List of category IDs to use. - **priority** (integer) - Optional - Priority level for the indexer. - **enableAutomaticSearch** (boolean) - Optional - Whether to enable automatic searching. - **enableInteractiveSearch** (boolean) - Optional - Whether to enable interactive searching. - **enableRss** (boolean) - Optional - Whether to enable RSS feeds. - **enabled** (boolean) - Optional - Whether the indexer is enabled. ### Request Example ```json { "name": "MyIndexer", "protocol": "torrent", "url": "https://indexer.example", "apiPath": "/api", "apiKey": "your-indexer-api-key", "categories": [7020, 3030], "priority": 25, "enableAutomaticSearch": true, "enableInteractiveSearch": true, "enableRss": true, "enabled": true } ``` ``` -------------------------------- ### POST /api/v1/rootfolder Source: https://context7.com/kkodecs/livrarr/llms.txt Creates a new root folder for storing imported files. ```APIDOC ## POST /api/v1/rootfolder ### Description Creates a new root folder for storing imported files. ### Method POST ### Endpoint /api/v1/rootfolder ### Request Body - **path** (string) - Required - The absolute path to the new root folder. - **mediaType** (string) - Required - The type of media this folder will store (e.g., "ebook", "audiobook"). ### Request Example ```json { "path": "/books", "mediaType": "ebook" } ``` ``` -------------------------------- ### Manual Import API Source: https://context7.com/kkodecs/livrarr/llms.txt Endpoints for scanning directories and importing files into the library. ```APIDOC ## POST /api/v1/manualimport/scan ### Description Scans a directory for importable ebook and audiobook files. ### Method POST ### Endpoint /api/v1/manualimport/scan ### Parameters #### Request Body - **path** (string) - Required - The absolute path to the directory to scan. ### Request Example ```json { "path": "/downloads/completed/books" } ``` ``` ```APIDOC ## POST /api/v1/manualimport/import ### Description Imports scanned files into the library, associating them with works. ### Method POST ### Endpoint /api/v1/manualimport/import ### Parameters #### Request Body - **items** (array of objects) - Required - A list of items to import. - **path** (string) - Required - The absolute path to the file to import. - **workId** (integer) - Required - The ID of the work to associate the file with. ### Request Example ```json { "items": [ { "path": "/downloads/completed/books/Dune.epub", "workId": 42 } ] } ``` ``` -------------------------------- ### List Queue Items Source: https://context7.com/kkodecs/livrarr/llms.txt Retrieves a list of active and recent download tasks. ```bash curl "http://localhost:8789/api/v1/queue?page=1" \ -H "X-Api-Key: your-api-key" ``` -------------------------------- ### Add Work to Library Source: https://context7.com/kkodecs/livrarr/llms.txt Adds a work to the user's library, triggering automatic metadata enrichment and cover download. Requires 'X-Api-Key' header and JSON content. ```bash curl -X POST http://localhost:8789/api/v1/work \ -H "X-Api-Key: your-api-key" \ -H "Content-Type: application/json" \ -d '{ "olKey": "OL893415W", "title": "Dune", "authorName": "Frank Herbert", "authorOlKey": "OL4123456A", "year": 1965, "coverUrl": "https://covers.openlibrary.org/b/id/12345-M.jpg" }' ``` -------------------------------- ### Login and Authenticate User Source: https://context7.com/kkodecs/livrarr/llms.txt Authenticates a user with username and password, returning a session token. The token can be used in subsequent requests via the 'Cookie' header. ```bash curl -X POST http://localhost:8789/api/v1/auth/login \ -H "Content-Type: application/json" \ -d '{ "username": "admin", "password": "your-password", "rememberMe": true }' ``` ```bash curl http://localhost:8789/api/v1/auth/me \ -H "Cookie: session=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..." ``` -------------------------------- ### Test Indexer Configuration Source: https://context7.com/kkodecs/livrarr/llms.txt Validates an indexer by fetching its Torznab capabilities. ```bash curl -X POST http://localhost:8789/api/v1/indexer/test \ -H "X-Api-Key: your-api-key" \ -H "Content-Type: application/json" \ -d '{ "url": "https://indexer.example", "apiPath": "/api", "apiKey": "your-indexer-api-key" }' ``` -------------------------------- ### POST /api/v1/remotepathmapping Source: https://context7.com/kkodecs/livrarr/llms.txt Creates a path mapping for when download clients report different paths than Livrarr can access. ```APIDOC ## POST /api/v1/remotepathmapping ### Description Creates a path mapping for when download clients report different paths than Livrarr can access. ### Method POST ### Endpoint /api/v1/remotepathmapping ### Request Body - **host** (string) - Required - The hostname of the download client. - **remotePath** (string) - Required - The path reported by the download client. Must end with a trailing slash. - **localPath** (string) - Required - The corresponding local path accessible by Livrarr. Must end with a trailing slash. ### Request Example ```json { "host": "qbittorrent.local", "remotePath": "/downloads/", "localPath": "/mnt/downloads/" } ``` ### Note Both `remotePath` and `localPath` must end with a trailing slash. ``` -------------------------------- ### Import Indexers from Prowlarr Source: https://context7.com/kkodecs/livrarr/llms.txt Imports indexer configurations from an existing Prowlarr instance. ```bash curl -X POST http://localhost:8789/api/v1/indexer/import/prowlarr \ -H "X-Api-Key: your-api-key" \ -H "Content-Type: application/json" \ -d '{ "url": "http://prowlarr.local:9696", "apiKey": "prowlarr-api-key" }' ``` -------------------------------- ### List Indexers Source: https://context7.com/kkodecs/livrarr/llms.txt Retrieves a list of all configured Torznab/Newznab indexers. ```bash curl http://localhost:8789/api/v1/indexer \ -H "X-Api-Key: your-api-key" ``` -------------------------------- ### Download Clients API Source: https://context7.com/kkodecs/livrarr/llms.txt Endpoints for listing configured download clients. ```APIDOC ## GET /api/v1/downloadclient ### Description Lists all configured download clients (qBittorrent and SABnzbd). ### Method GET ### Endpoint /api/v1/downloadclient ### Request Example ```bash curl http://localhost:8789/api/v1/downloadclient \ -H "X-Api-Key: your-api-key" ``` ### Response #### Success Response (200) - An array of download client objects. - **id** (integer) - The unique identifier for the download client. - **name** (string) - The name of the download client. - **implementation** (string) - The implementation type (e.g., "qBittorrent"). - **host** (string) - The hostname or IP address of the download client. - **port** (integer) - The port number for the download client. - **useSsl** (boolean) - Whether SSL/TLS is used for the connection. #### Response Example ```json [ { "id": 1, "name": "qBittorrent", "implementation": "qBittorrent", "host": "qbittorrent.local", "port": 8080, "useSsl": false } ] ``` ``` -------------------------------- ### Create Remote Path Mapping Source: https://context7.com/kkodecs/livrarr/llms.txt Defines a mapping between remote download client paths and local paths accessible by Livrarr. Both paths must end with a trailing slash. ```bash curl -X POST http://localhost:8789/api/v1/remotepathmapping \ -H "X-Api-Key: your-api-key" \ -H "Content-Type: application/json" \ -d '{ "host": "qbittorrent.local", "remotePath": "/downloads/", "localPath": "/mnt/downloads/" }' ``` -------------------------------- ### Retry Failed Grab Source: https://context7.com/kkodecs/livrarr/llms.txt Attempts to re-import a failed download grab. ```bash curl -X POST http://localhost:8789/api/v1/grab/15/retry \ -H "X-Api-Key: your-api-key" ``` -------------------------------- ### POST /api/v1/indexer/test Source: https://context7.com/kkodecs/livrarr/llms.txt Tests an indexer by fetching its Torznab capabilities. ```APIDOC ## POST /api/v1/indexer/test ### Description Tests an indexer by fetching its Torznab capabilities. ### Method POST ### Endpoint /api/v1/indexer/test ### Request Body - **url** (string) - Required - The base URL of the indexer. - **apiPath** (string) - Required - The API path for the indexer. - **apiKey** (string) - Required - The API key for the indexer. ### Request Example ```json { "url": "https://indexer.example", "apiPath": "/api", "apiKey": "your-indexer-api-key" } ``` ### Response #### Success Response (200) - **ok** (boolean) - Indicates if the test was successful. - **supportsBookSearch** (boolean) - Whether the indexer supports book searches. - **warnings** (array of strings) - Any warnings encountered during the test. #### Response Example ```json { "ok": true, "supportsBookSearch": true, "warnings": [] } ``` ``` -------------------------------- ### List Historical Events Source: https://context7.com/kkodecs/livrarr/llms.txt Lists import and enrichment events with pagination support. ```bash curl "http://localhost:8789/api/v1/history?page=1&pageSize=50" \ -H "X-Api-Key: your-api-key" # Response: # { # "items": [ # { # "id": 1234, # "workId": 42, # "eventType": "imported", # "data": { # "title": "Dune", # "path": "/books/Frank Herbert/Dune.epub" # }, # "date": "2024-01-20T15:30:00Z" # } # ], # "total": 500, # "page": 1, # "pageSize": 50 # } ``` -------------------------------- ### Tail Application Logs Source: https://context7.com/kkodecs/livrarr/llms.txt Retrieves recent log entries from the application. ```bash curl "http://localhost:8789/api/v1/system/logs/tail?lines=100" \ -H "X-Api-Key: your-api-key" ``` -------------------------------- ### POST /api/v1/indexer/import/prowlarr Source: https://context7.com/kkodecs/livrarr/llms.txt Imports indexers from a Prowlarr instance. ```APIDOC ## POST /api/v1/indexer/import/prowlarr ### Description Imports indexers from a Prowlarr instance. ### Method POST ### Endpoint /api/v1/indexer/import/prowlarr ### Request Body - **url** (string) - Required - The URL of the Prowlarr instance. - **apiKey** (string) - Required - The API key for the Prowlarr instance. ### Request Example ```json { "url": "http://prowlarr.local:9696", "apiKey": "prowlarr-api-key" } ``` ### Response #### Success Response (200) - **imported** (integer) - The number of indexers successfully imported. - **skipped** (integer) - The number of indexers skipped. - **errors** (array of strings) - Any errors encountered during the import process. #### Response Example ```json { "imported": 5, "skipped": 2, "errors": [] } ``` ``` -------------------------------- ### POST /api/v1/downloadclient/test Source: https://context7.com/kkodecs/livrarr/llms.txt Tests a download client configuration without saving it. ```APIDOC ## POST /api/v1/downloadclient/test ### Description Tests a download client configuration without saving it. ### Method POST ### Endpoint /api/v1/downloadclient/test ### Request Body - **name** (string) - Required - The name of the download client. - **implementation** (string) - Required - The type of download client (e.g., "qBittorrent"). - **host** (string) - Required - The hostname or IP address of the download client. - **port** (integer) - Required - The port number for the download client. - **useSsl** (boolean) - Optional - Whether to use SSL/TLS for the connection. - **username** (string) - Optional - Username for authentication. - **password** (string) - Optional - Password for authentication. - **category** (string) - Optional - Default category for downloads. - **enabled** (boolean) - Optional - Whether the download client is enabled. ### Request Example ```json { "name": "Test qBit", "implementation": "qBittorrent", "host": "qbittorrent.local", "port": 8080, "useSsl": false, "username": "admin", "password": "adminpass", "category": "livrarr", "enabled": true } ``` ### Response #### Success Response (200) Returns 200 OK on successful connection. ``` -------------------------------- ### Configure Trusted Proxies Source: https://github.com/kkodecs/livrarr/blob/main/docs/llm-context.md Set trusted proxies if an external header is used for authentication. This is configured in `config.toml`. ```toml trusted_proxies = ["10.0.0.0/8"] ``` -------------------------------- ### POST /api/v1/auth/login Source: https://context7.com/kkodecs/livrarr/llms.txt Authenticates a user and returns a session token for subsequent requests. ```APIDOC ## POST /api/v1/auth/login ### Description Authenticates a user and returns a session token for subsequent requests. ### Method POST ### Endpoint /api/v1/auth/login ### Request Body - **username** (string) - Required - The username of the user. - **password** (string) - Required - The password of the user. - **rememberMe** (boolean) - Optional - Whether to remember the session. ### Request Example { "username": "admin", "password": "your-password", "rememberMe": true } ### Response #### Success Response (200) - **token** (string) - The session token. #### Response Example { "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..." } ``` -------------------------------- ### Configuration API Source: https://context7.com/kkodecs/livrarr/llms.txt Endpoints for retrieving and updating metadata provider configurations. ```APIDOC ## GET /api/v1/config/metadata ### Description Retrieves metadata provider configuration including Hardcover, LLM, and Audnexus settings. ### Method GET ### Endpoint /api/v1/config/metadata ### Response #### Success Response (200) - **hardcoverEnabled** (boolean) - Indicates if Hardcover is enabled. - **hardcoverApiTokenSet** (boolean) - Indicates if the Hardcover API token is set. - **llmEnabled** (boolean) - Indicates if the LLM is enabled. - **llmProvider** (string) - The LLM provider being used (e.g., 'groq'). - **llmEndpoint** (string) - The endpoint URL for the LLM. - **llmApiKeySet** (boolean) - Indicates if the LLM API key is set. - **llmModel** (string) - The LLM model being used. - **audnexusUrl** (string) - The URL for the Audnexus service. - **languages** (array of strings) - A list of supported languages. #### Response Example ```json { "hardcoverEnabled": true, "hardcoverApiTokenSet": true, "llmEnabled": true, "llmProvider": "groq", "llmEndpoint": "https://api.groq.com/openai/v1", "llmApiKeySet": true, "llmModel": "llama-3.3-70b-versatile", "audnexusUrl": "https://api.audnex.us", "languages": ["en", "fr", "de"] } ``` ``` ```APIDOC ## PUT /api/v1/config/metadata ### Description Updates metadata provider configuration. ### Method PUT ### Endpoint /api/v1/config/metadata ### Parameters #### Request Body - **hardcoverEnabled** (boolean) - Required - Set to true to enable Hardcover. - **hardcoverApiToken** (string) - Optional - The API token for Hardcover. - **llmEnabled** (boolean) - Required - Set to true to enable LLM. - **llmProvider** (string) - Required - The LLM provider to use (e.g., 'groq'). - **llmEndpoint** (string) - Required - The endpoint URL for the LLM. - **llmApiKey** (string) - Required - The API key for the LLM. - **llmModel** (string) - Required - The LLM model to use. - **languages** (array of strings) - Required - A list of supported languages. ### Request Example ```json { "hardcoverEnabled": true, "hardcoverApiToken": "your-hardcover-token", "llmEnabled": true, "llmProvider": "groq", "llmEndpoint": "https://api.groq.com/openai/v1", "llmApiKey": "your-groq-api-key", "llmModel": "llama-3.3-70b-versatile", "languages": ["en", "fr", "de", "es"] } ``` ``` -------------------------------- ### POST /work Source: https://github.com/kkodecs/livrarr/blob/main/docs/llm-context.md Adds a new work to the library. ```APIDOC ## POST /work ### Description Adds a new work to the library. ### Method POST ### Endpoint /work ``` -------------------------------- ### Import Scanned Files Source: https://context7.com/kkodecs/livrarr/llms.txt Imports files previously identified by the scan endpoint into the library. ```bash curl -X POST http://localhost:8789/api/v1/manualimport/import \ -H "X-Api-Key: your-api-key" \ -H "Content-Type: application/json" \ -d '{ "items": [ { "path": "/downloads/completed/books/Dune.epub", "workId": 42 } ] }' ``` -------------------------------- ### System API Source: https://context7.com/kkodecs/livrarr/llms.txt Endpoints for checking system health and retrieving status information. ```APIDOC ## GET /api/v1/health ### Description Returns health check results for all configured external dependencies. ### Method GET ### Endpoint /api/v1/health ### Response #### Success Response (200) - **source** (string) - The name of the dependency being checked. - **checkType** (string) - The type of check performed (e.g., 'ok'). - **message** (string) - A message indicating the status of the check. #### Response Example ```json [ { "source": "qBittorrent", "checkType": "ok", "message": "Connected" }, { "source": "Hardcover", "checkType": "ok", "message": "API responding" } ] ``` ``` ```APIDOC ## GET /api/v1/system/status ### Description Returns system information including version, paths, and uptime. ### Method GET ### Endpoint /api/v1/system/status ### Response #### Success Response (200) - **version** (string) - The current version of Livrarr. - **osInfo** (string) - Information about the operating system. - **dataDirectory** (string) - The path to the data directory. - **logFile** (string) - The path to the log file. - **startupTime** (string) - The timestamp when Livrarr started. - **logLevel** (string) - The current logging level. #### Response Example ```json { "version": "0.1.0-alpha2", "osInfo": "Linux x86_64", "dataDirectory": "/config", "logFile": "/config/logs/livrarr.txt", "startupTime": "2024-01-20T10:00:00Z", "logLevel": "info" } ``` ``` ```APIDOC ## GET /api/v1/system/logs/tail ### Description Returns recent log entries from the application log file. ### Method GET ### Endpoint /api/v1/system/logs/tail ### Parameters #### Query Parameters - **lines** (integer) - Optional - The number of recent log lines to retrieve. Defaults to 100. ### Request Example ```bash curl "http://localhost:8789/api/v1/system/logs/tail?lines=100" \ -H "X-Api-Key: your-api-key" ``` ``` -------------------------------- ### Retrieve Work Details Source: https://context7.com/kkodecs/livrarr/llms.txt Fetches detailed information about a specific work by its ID. ```bash curl http://localhost:8789/api/v1/work/42 \ -H "X-Api-Key: your-api-key" ``` -------------------------------- ### Update Metadata Configuration Source: https://context7.com/kkodecs/livrarr/llms.txt Updates the metadata provider settings using a JSON payload. ```bash curl -X PUT http://localhost:8789/api/v1/config/metadata \ -H "X-Api-Key: your-api-key" \ -H "Content-Type: application/json" \ -d '{ "hardcoverEnabled": true, "hardcoverApiToken": "your-hardcover-token", "llmEnabled": true, "llmProvider": "groq", "llmEndpoint": "https://api.groq.com/openai/v1", "llmApiKey": "your-groq-api-key", "llmModel": "llama-3.3-70b-versatile", "languages": ["en", "fr", "de", "es"] }' ```