If you don't find an answer, please click here to post your question.

API Query not working with a K query error

0 Kudos
Started ‎01-08-2014 by
Modified ‎01-08-2014 by

API Query not working with a K query error

by Ooyalan on ‎01-08-2014 07:30 AM (730 Views)

TS-00265 API

API Query not working with a K query error

 

You are not able to make a  API request using the Query /v2/assets?limit=500, this generates an error .When using the query /v2/assets?limit=400 or 300 or 200 or 100, you are receiving the response as expected with next page tokens, but when you use limit=500, you will not receive a response.

 

ERROR MESSAGE

HTTP Error (400), Response: {"message":"Cannot perform top k query for this many assets."}.

ENVIRONMENT

Device Compatibility

iOS, Android, Flash

Operative System

Mac OSX  version 10.7.2

Browser

Firefox 6.0.1 and above

Troubleshooting tools

http://se.ooyala.com/playertest/

Other

Other

CAUSE

We do not support sorted queries for more than 1000 assets using API V2.

WORKAROUND

If you need to get results for more than 1000 assets, you must specify the parameter "order_by=none" in the call, which will allow to page through all unordered results. If the parameter is missed, then the call will not work.

HOW TO RESOLVE

RESOLUTION 1

The query used should be as given below:

/v2/assets?limit=400&order_by=none


REFERENCES