One month down in 2025: How are your resolutions coming along? Check out how to get back on track here.
Forum Discussion
minamiSasaki
6 years agoExplorer | Level 3
"has_more = true" was returned even though "files / list_folder" was less than "limit".
I tried to get information about all files and folders in my account.
I restricted the number of acquisitions by "limit".So I tried to get the rest by " / list_folder / continue", when I cannot get all.
However, "has_more=true" was returned returned, despite being less than the "limit".
Is this a bug in Dropbox?
Response example (42 items in total)
{
"entries": [
{
".tag": "folder",
"name": "test",
"path_lower": "/test",
"path_display": "/test",
"id": "id:dummy_id_aaaaa"
},
{
".tag": "folder",
"name": "test_folder",
"path_lower": "/test_folder",
"path_display": "test_folder",
"id": "id:dummy_id_bbbbb"
}
],
"cursor": "dummy_cursol_ccccc",
"has_more": true
}
- Greg-DB
Dropbox Staff
Thanks for the report. This sort of thing can happen when using /2/files/list_folder[/continue], and while it's not a bug, we do understand it's not ideal.
The
limit
the client supplies is only a guideline, and the API may not always be able to actually follow it. Because of how the Dropbox filesystem works on the backend, sometimes the API may return less than thelimit
, and sometimes it may actually return a little more.There's some information about this in the docs for the param:
limit
UInt32(min=1, max=2000)?
The maximum number of results to return per request. Note: This is an approximate number and there can be slightly more entries returned in some cases.That's to point out that the value is only meant as a maximum, so the API can still return less than the specified value (but also sometimes more).
So, all of that being the case, the client always needs to check the
has_more
value and call back to /2/files/list_folder/continue if it's true.- minamiSasakiExplorer | Level 3
thank you for your answer.
I understanded that it may return less than "limit".
Even if / 2 / files / list_folder is used at the first acquisition, the same phenomenon occurs. Is this the same reason?- Greg-DB
Dropbox Staff
Yes, this
limit
behavior applies to using both /2/files/list_folder and /2/files/list_folder/continue at any time.
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.5,950 PostsLatest Activity: 11 hours ago
If you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X or Facebook.
For more info on available support options for your Dropbox plan, see this article.
If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!