cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Musicians, convert your MuseScore files to PDF to play music on the go! Learn 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: 

Strange work of API method /files/search_v2

Strange work of API method /files/search_v2

demiurg
Explorer | Level 3
Go to solution

I want to search for files by name in the path `/first/folder/print` using the API `/files/search_v2`, but the API returns files from another folder `/first/folder/print-source`. Is this a bug or a feature?

1 Accepted Solution

Accepted Solutions

Greg-DB
Dropbox Staff
Go to solution

The Dropbox API /2/files/search_v2 endpoint provides an options.path parameter which can be used to request that Dropbox restrict the search to a particular path, though there is a delay for recent changes. While Dropbox will restrict the search to a path if supplied, if a file (or parent folder) was recently moved out of that path but the search call takes place before the search index is updated, the search results may still include the file. The returned results would show the updated metadata however as the current metadata is retrieved when the result is returned.

View solution in original post

1 Reply 1

Greg-DB
Dropbox Staff
Go to solution

The Dropbox API /2/files/search_v2 endpoint provides an options.path parameter which can be used to request that Dropbox restrict the search to a particular path, though there is a delay for recent changes. While Dropbox will restrict the search to a path if supplied, if a file (or parent folder) was recently moved out of that path but the search call takes place before the search index is updated, the search results may still include the file. The returned results would show the updated metadata however as the current metadata is retrieved when the result is returned.

Need more support?
Who's talking

Top contributors to this post

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