0

I am using google Account having approx 5K files for exploring Google drive SDK API Explorer.Where I am getting getting empty result with next page link.

To overcome it I have to make continuous call to google drive API until I didn't result,these calls are upto 50 to 80 in some cases,this is making my server response slower.

How to over come it?Am i missing something?

Below is my query-

(( fullText contains 'NEW_CT_3527 OR NEW_CT_3584'  or title contains '"plain"' ) and trashed=false)

I am getting following response from drive API-

{
 "kind": "drive#fileList",
 "etag": "\"LUxk1DXE_0fd4yeJDIgpecr5uPA/GmDYv3ms0p6y6lZKIj1ujNHSEnw\"",
 "selfLink": "https://www.googleapis.com/drive/v2/files?pageToken=EAIapgELEgBSnQEKiwEKaf8Av9T5Hhgk0sD__vj0BN__stMyQ29zbW8udXNlcigwMDAwMDA0MDhlNDUyMmE4VSkuZGlyX2VudHJ5KDI3NzI2NDgwMjQ3MlwuNDdcLjM4NjQwMzU3MjM1NTpHMzlZOHo5SGhqcykAARBkIWVuyUIw2MhrUABaCwlr4a9wfPyDuRACYKzdkPsGIAEyBgi41prJBfCElXwBDEAAIgsJqCJFjkAAAAAgBg&q=(+fullText+contains+'NEW_CT_3527'++or+title+contains+'%22plain%22'+)+and+trashed%3Dfalse",
 "nextPageToken": "EAIapwELEgBSngEKjAEKaf8Av9T3hCoz5jr__vj0BID_ss_OQ29zbW8udXNlcigwMDAwMDA0MDhlNDUyMmE4VSkuZGlyX2VudHJ5KDI3NzI2NDgwMjQ3MlwuNDdcLjM4NjQwMzU3MjM1NTpTdm15MDN0U29JWSkAARDIASFlbslCMNjIa1AAWgsJa-GvcHz8g7kQAmCs3ZD7BiABMgYIuNaayQXwhJV8AQxAACILCagiRY5AAAAAIAY",
 "nextLink": "https://www.googleapis.com/drive/v2/files?pageToken=EAIapwELEgBSngEKjAEKaf8Av9T3hCoz5jr__vj0BID_ss_OQ29zbW8udXNlcigwMDAwMDA0MDhlNDUyMmE4VSkuZGlyX2VudHJ5KDI3NzI2NDgwMjQ3MlwuNDdcLjM4NjQwMzU3MjM1NTpTdm15MDN0U29JWSkAARDIASFlbslCMNjIa1AAWgsJa-GvcHz8g7kQAmCs3ZD7BiABMgYIuNaayQXwhJV8AQxAACILCagiRY5AAAAAIAY&q=(+fullText+contains+'NEW_CT_3527'++or+title+contains+'%22plain%22'+)+and+trashed%3Dfalse",
 "incompleteSearch": false,
 "items": []
}
  • I found a similar issue . https://stackoverflow.com/questions/24873228/drive-api-files-list-returning-nextpagetoken-with-empty-item-results –  May 25 '17 at 10:09
  • Possible duplicate of [Drive API files.list returning nextPageToken with empty item results](https://stackoverflow.com/questions/24873228/drive-api-files-list-returning-nextpagetoken-with-empty-item-results) – pinoyyid May 25 '17 at 20:06
  • The answer you linked to is still the answer. "How to overcome it?" - you can't. "Am i missing something?" - no you're not. You might be able to reduce the number of requests (but not the elapsed time) by introducing a delay between each page request, – pinoyyid May 25 '17 at 20:08

0 Answers0