Jump to content

API Call to /Items fails


kingy444

Recommended Posts

kingy444

I am getting Internal Server 500 errors on the API call to /Items. (The GET request)

 

The call has worked in the past, and seems to have stopped recently, even swagger UI cannot process the request.

 
Running current beta: 3.0.5946.0
 
My call uses the below parameters
NameStartsWith={Letter}
Recursive=true
ParentId={ParentID}
EnableImages=false
format=json
 
Not sure when this stopped working, anyone have any ideas? May be why my Nuvue stopped alerting me of new media some time ago
Link to comment
Share on other sites

kingy444

Best I can tell, its having errors due to post-filtering 'CollapseBoxSetItems'

 

Could you have a look at the attached and see if it helps at all?

Log.txt

Link to comment
Share on other sites

I haven't looked specifically but that error usually indicates your query is missing a required parameter.  In this instance, I'd guess user id...

Link to comment
Share on other sites

kingy444

As I said, the query was working before, without UserID. Adding it does seem to fix the issue - but results are slower than without it.

 

If i specify CollapseBoxSetItems=false and the query works without UserID. Perhaps the default value of this parameter was changed recently?

 

Neither UserID or CollapseBoxSetItems are set as mandatory parameters. Its strange that if no USERID is provided that CollapseBoxSetItems fails to NOT enumerate. ie CollapseBoxSetItems-true fails, when its not enumerating it breaks.

 

Any ideas?

Link to comment
Share on other sites

My guess would be it is related to a bug being fixed where Collections were showing when the current user had no access to the underlying items.

 

Anyway, I would suggest using the user/id/items endpoint whenever possible instead as almost everything should be in the context of a user

Link to comment
Share on other sites

kingy444
Maybe I didnt make sense. The strange thing is, it seems to enumerate collections without UserID. It would make sense this failing the other way.

 

ie the below fails with a 500 error

NameStartsWith=S

Recursive=true

ParentId=e71b98e7c247ba4aa71c61c37a6c4f13

EnableImages=false

CollapseBoxSetItems=true

format=json

 

where  the below returns results. The same number of results as if i specify UserID

NameStartsWith=S

Recursive=true

ParentId=e71b98e7c247ba4aa71c61c37a6c4f13

EnableImages=false

CollapseBoxSetItems=false

format=json

Link to comment
Share on other sites

Probably because the operation of collapsing the box sets is forcing a parental control check which, in turn, requires a user context.  I'm just making a semi-educated guess though.

 

What are you really trying to accomplish such that you don't have a user context?

Link to comment
Share on other sites

kingy444

i just never did before. Its fine to add it.

 

I am just trying to point out the enumeration appears to be in reverse. Your deduction makes sense except for it failing when you tell it not to CollapseBoxSetItems.

Link to comment
Share on other sites

i just never did before. Its fine to add it.

 

I am just trying to point out the enumeration appears to be in reverse. Your deduction makes sense except for it failing when you tell it not to CollapseBoxSetItems.

 

That's not what you posted above...

 

 

 

Maybe I didnt make sense. The strange thing is, it seems to enumerate collections without UserID. It would make sense this failing the other way.
 
ie the below fails with a 500 error
NameStartsWith=S
Recursive=true
ParentId=e71b98e7c247ba4aa71c61c37a6c4f13
EnableImages=false
CollapseBoxSetItems=true
format=json
 
where  the below returns results. The same number of results as if i specify UserID
NameStartsWith=S
Recursive=true
ParentId=e71b98e7c247ba4aa71c61c37a6c4f13
EnableImages=false
CollapseBoxSetItems=false
format=json

 

Link to comment
Share on other sites

kingy444

think i get what you were saying now, i was using the logic that running CollapseBoxSetItems was true that you wouldn't need to look inside box sets. instead what your saying is that you dont know if its a box set until you verify the user

 

so the way i read it above was that since CillapseBoxSetItems was false, you were looking inside box sets (ie not collapsing them)

Link to comment
Share on other sites

  • 2 weeks later...
kingy444

Would appreciate a little more help on this. 
 
While i have the above working with the help from @ebr I am not getting the same results that I used to. Parameters are as mentioned previously, however when the NameStartsWith paramater is a number then the results fail.

 

ie. I cannot return results for shows like The 100, 12 Monkeys, 2 broke girls etc.

 

Shows starting with a letter are fine but I cannot get results to return for shows where the title starts with a numeric value.

 

Did something change in the API?

Link to comment
Share on other sites

You dont use NameStartsWith to get numbers. Use NameLessThan: "a" then it should yield results.

 

Sent from my Nexus 7 using Tapatalk

  • Like 1
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...