• Login
  • Register
  • Login Register
    Login
    Username/Email:
    Password:
    Or login with a social network below
  • Forum
  • Website
  • GitHub
  • Status
  • Translation
  • Features
  • Team
  • Rules
  • Help
  • Feeds
User Links
  • Login
  • Register
  • Login Register
    Login
    Username/Email:
    Password:
    Or login with a social network below

    Useful Links Forum Website GitHub Status Translation Features Team Rules Help Feeds
    Jellyfin Forum Support General Questions API endpoint to scan a single library

     
    • 0 Vote(s) - 0 Average

    API endpoint to scan a single library

    alextruppel
    Offline

    Junior Member

    Posts: 1
    Threads: 1
    Joined: 2025 Feb
    Reputation: 0
    #1
    2025-02-12, 01:47 PM
    Hi everyone! I know this can be used to trigger a scan of all libraries in Jellyfin:

    Code:
    http://jellyfin-ip-etc.../library/refresh?api_key=my-api-key

    But is there a way to trigger a refresh of just a single library? This is because I have multiple libraries, some smaller libraries have new files being constantly added, whereas some large libraries almost never change and also take easily 1 hour or more to scan, not to mention that they pull 80MB/s from my NAS during the entire time of the scan. Ideally, I'd be able to trigger a re-scan of only some libraries when they change.

    Thank you!
    TheDreadPirate
    Offline

    Community Moderator

    Posts: 15,375
    Threads: 10
    Joined: 2023 Jun
    Reputation: 460
    Country:United States
    #2
    2025-02-12, 04:38 PM
    When I go to Dashboard > Libraries, and scan for updates on an individual library I see this in the browser developer console.

    Code:
    https://jellyfin-testing.domain.tld/Items/f137a2dd21bbc1b99aa5c0f6bf02a805/Refresh?Recursive=true&ImageRefreshMode=Default&MetadataRefreshMode=Default&ReplaceAllImages=false&RegenerateTrickplay=false&ReplaceAllMetadata=false

    Looks like the library has an Items ID that you need to use?
    Jellyfin 10.10.7 (Docker)
    Ubuntu 24.04.2 LTS w/HWE
    Intel i3 12100
    Intel Arc A380
    OS drive - SK Hynix P41 1TB
    Storage
        4x WD Red Pro 6TB CMR in RAIDZ1
    [Image: GitHub%20Sponsors-grey?logo=github]
    arjuan
    Offline

    Junior Member

    Posts: 1
    Threads: 0
    Joined: 2025 Mar
    Reputation: 0
    #3
    2025-03-31, 09:32 PM
    The API documentation is a good place to start for this type of question Smiling-face

    https://api.jellyfin.org/#tag/Library/op...datedMedia

    Here's an example cURL query to update a specific library path:


    curl -H "X-MediaBrowser-Token: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" -H "Content-Type: application/json" -d '{"Updates": [{"Path":"/path/to/folder/","UpdateType":"scan"}]}' https://jellyfin.example.com/Library/Media/Updated
    « Next Oldest | Next Newest »

    Users browsing this thread: 2 Guest(s)


    • View a Printable Version
    • Subscribe to this thread
    Forum Jump:

    Home · Team · Help · Contact
    © Designed by D&D - Powered by MyBB
    L


    Jellyfin

    The Free Software Media System

    Linear Mode
    Threaded Mode