You might see that the Dropbox Community team have been busy working on some major updates to the Community itself! So, here is some info on what’s changed, what’s staying the same and what you can expect from the Dropbox Community overall.

Forum Discussion

demiurg's avatar
demiurg
Explorer | Level 3
3 months ago

Strange work of API method /files/search_v2

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?

  • 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.

  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Staff rankDropbox Staff

    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.