cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
What’s new: end-to-end encryption, Replay and Dash updates. Find out more about these updates, new features and more here.

Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

/files/search_v2 returning files that are not in the specified 'path'

/files/search_v2 returning files that are not in the specified 'path'

bb-jacin
Explorer | Level 3

Hi, I am experiencing an issue with API requests to /files/search_v2 (and /files_search) where files are being returned that are outside of the specified 'path' option that is being sent with the API request.

 

To explain my use case:

We have a directory /output. When files appear in this directory, we use the Dropbox endpoint /files/search_v2 to locate specific files and then use /files/move_batch_v2 to move them elsewhere in the Dropbox account. These files all share similar traits in their filename, for example they may all end in '-0000.jpg'.

 

When we perform a search using /files/search_v2, we may use the query "-0000.jpg" and supply the path "/output", which will return matching files in that directory, however it will also return matching files in other directories where we have moved files to.

 

Why is it that the 'path' option is being ignored in these requests? Is it something to do with some kind of caching on Dropbox's end?

1 Reply 1

Greg-DB
Dropbox Staff

Yes, the search results are subject to delays and staleness due to indexing/caching, which can result in this behavior for moved files. This should automatically catch up after a short time.

 

For more definitive results not subject to this, you may want to use /2/files/list_folder[/continue] instead.

Need more support?
Who's talking

Top contributors to this post

  • User avatar
    Greg-DB Dropbox Staff
What do Dropbox user levels mean?