Jump to content

Getting a whole record via api_key method


steamhead

Recommended Posts

steamhead

Hi everyone, I'm fairly new to the Emby API, had a rapid learning curve over the last week, but still struggling in places.  I've had some great help already on other forum sections from @cayars and @PenkethBoy, but I thought I'd better ask the more API related stuff here.

I'm integrating Emby with Media Monkey, in the first instance to help push data into Emby that it doesn't get from other sources, but I can see a lot of potential fun beyond that.  As there is no user context, and looking at the wiki which says "Authentication via API key is the right choice for integration scenarios with other applications, servers or services that are not tied to a certain user's context." I decided to go for the api_key method, especially as it is much simpler to integrate in code.

So far I've happily got Media Monkey finding the ID of each file via the emby/Items by using the file path, the next step is to get the whole record, which is where the Wiki and Swagger are suitably vague.  There doesn't seem to be a call documented in either the wiki or swagger to get a whole record.

Looking at other request types I tried a guess of - http://nnn.nnn.nnn.nnn:8096/emby/Items/205786?api_key=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx - effectively GET /Items/{ItemId} which gives me a response of "Unable to find the specified file", which I now know means this is not a valid endpoint.

I've had it suggested to use /Users/{UserId}/Items/{ItemId} which is also not documented on Swagger as a valid endpoint, but I'll assume that works as @PenkethBoy has steered me right so far, and has given me great and very valuable advice so far.  But it's not what I want to do here, especially as I'm having issues with user authentication (see separate thread for that).

What I'm looking for is how do you get a whole record, so you can update Emby using the api_key method of authentication?  There must be a way to do it, otherwise it would make the api_key method virtually useless if you can't read and update data, and the documentation says api_key is the way to go if you have no user context.

So how is it done? Can it be done? Is it something that's not quite finished yet, and if so any idea when it will be?

Link to comment
Share on other sites

PenkethBoy

see my posts in your other thread and i have answer i think your questions there

nothing is missing you just need to follow how emby works etc

Link to comment
Share on other sites

steamhead

The other thread answers a way to do it if I need the User context, which I don't.  I know docs can be wrong, but having made a fairly clear statement about api_key being the way to go for none user context and integration, I want to know how, if indeed it can be done that way, as it is much better suited to my end goal.

In the meantime I am pursuing getting it working the other way you suggested, but that's not what this thread is about, this thread is asking the question, probably for the product developers to respond, as to whether the api_key method is actually possible yet.

Link to comment
Share on other sites

PenkethBoy

i am 99% sure you need the user context to Get the record - dont think there is anyway to do it otherwise

not sure why you dont to POST - but thats emby for you not alway consistent - as i would have expected the user context to apply to the Post but it does not

Ha Ho

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...