• 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 Development Client Development Does Items not exist?

     
    • 0 Vote(s) - 0 Average

    Does Items not exist?

    Kenneth Armstrong
    Offline

    Junior Member

    Posts: 8
    Threads: 1
    Joined: 2023 Jun
    Reputation: 0
    #1
    2023-08-14, 12:42 PM
    Hi all.
    I'm tinkering around with a Python client and so far I can log it in, and out, and get a list of users and system info. However, when I try to perform a GET on this endpoint, /Items, it does not seem to work. I'm following the example here:

    https://api.jellyfin.org/#tag/Items/operation/GetItems

    It's possible that I am doing something wrong (at the moment just trying to do a json dumps at that endpoint) but I just wanted to make sure that this particular endpoint is the correct one to use to parse a library.

    Thanks.
    niels
    Offline

    Core Team

    Posts: 248
    Threads: 4
    Joined: 2023 Jun
    Reputation: 12
    Country:Netherlands
    #2
    2023-08-14, 12:53 PM
    Without any logs we can only guess, is the response invalid? Does the server throw an exception? Please give us some more detail.
    Kenneth Armstrong
    Offline

    Junior Member

    Posts: 8
    Threads: 1
    Joined: 2023 Jun
    Reputation: 0
    #3
    2023-08-14, 03:41 PM
    (2023-08-14, 12:53 PM)niels Wrote: Without any logs we can only guess, is the response invalid? Does the server throw an exception? Please give us some more detail.

    Yep, my bad. I'm getting an HTTP 400, so my request is wrong.

    Code:
    [2023-08-14 09:57:05.122 -04:00] [INF] [67] Jellyfin.Server.Implementations.Users.UserManager: Authentication request for "Kenny" has succeeded.
    [2023-08-14 09:57:05.122 -04:00] [INF] [67] Emby.Server.Implementations.Session.SessionManager: Current/Max sessions for user "Kenny": 3/0
    [2023-08-14 09:57:05.124 -04:00] [INF] [67] Emby.Server.Implementations.Session.SessionManager: Creating new access token for user blahblahblahblah
    [2023-08-14 09:57:05.361 -04:00] [ERR] [67] Jellyfin.Server.Middleware.ExceptionMiddleware: Error processing request. URL "GET" "/Items".
    System.ArgumentNullException: Value cannot be null. (Parameter 'user')

    I'm still tinkering with this (learning as I go) so I'm sure I'll get it figured out.
    niels
    Offline

    Core Team

    Posts: 248
    Threads: 4
    Joined: 2023 Jun
    Reputation: 12
    Country:Netherlands
    #4
    2023-08-14, 04:00 PM
    Make sure to set the user id query parameter
    Kenneth Armstrong
    Offline

    Junior Member

    Posts: 8
    Threads: 1
    Joined: 2023 Jun
    Reputation: 0
    #5
    2023-08-14, 04:17 PM
    (2023-08-14, 04:00 PM)niels Wrote: Make sure to set the user id query parameter

    That's the part that I'm messing up right now:

    Code:
    parameters = {
    'user': user_id
    }
    print(parameters)

    all = requests.get(f'{server_url}/Items', params=parameters, headers=auth_headers)

    For some reason, the logs keep saying that 'user' is null, so I still don't have the header right I think.
    niels
    Offline

    Core Team

    Posts: 248
    Threads: 4
    Joined: 2023 Jun
    Reputation: 12
    Country:Netherlands
    #6
    2023-08-14, 04:42 PM
    The parameter is called "userId" as listed on api.jellyfin.org. The exception in the logs is because it cannot find a user because the id is missing.
    Kenneth Armstrong
    Offline

    Junior Member

    Posts: 8
    Threads: 1
    Joined: 2023 Jun
    Reputation: 0
    #7
    2023-08-14, 06:03 PM
    (2023-08-14, 04:42 PM)niels Wrote: The parameter is called "userId" as listed on api.jellyfin.org. The exception in the logs is because it cannot find a user because the id is missing.

    Son of a gun, that's what it was. I saw 'user' in the log and kept trying to pass that. I changed it to 'userid' and it worked. Thanks!
    « Next Oldest | Next Newest »

    Users browsing this thread: 1 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