1.8 API GET /library duration fileSize

I believe that GET /library duration and fileSize are not working correctly. I have observed the following in postman.

if I set duration to “=” - works
if I set duration to “<=” - returns all media that is equal to but not less than (Or Greater)
if I set duration to “>=” - returns all media that is equal to but not greater than (Or Less)

if I set fileSize to “=” - works
if I set fileSize to “<=” - returns everything
if I set fileSize to “>=” - returns only media that is equal to but not greater than (Or Less)

Can someone please confirm that “<=” means that the returned results should be less than or equal to the provided parameter?

Edit: As a note I do realize that the entire parameter should be in the format of “<=|10”

It seems that neither one of these filter options work properly, very odd :blush:

I’ve created a bug:

I’ve started looking at this and it appears to be a misunderstanding rather than an issue.

The correct syntax is described in the API doc:

Filter by Duration - a number or less-than,greater-than,less-than-equal or great-than-equal followed by a | followed by a number

e.g. ?fileSize=less-than|1000000

Ahhh. I see thank you! :thumbsup:

Well with the syntax straightened out, I can get filesize to work exactly how it should. However, on duration, I still do not get the desired results.

less-than and, less-than-equal returns nothing
greater-than, and great-than-equal returns everything

I am using seconds for the duration.

?fileSize=less-than-equal|5000000&duration=less-than-equal|10

Not sure what else I could be missing…??

There does appear to be an issue with duration after all - i’ve reopened the issue
Thanks