We are aware of the issue with the badge emails resending to everyone, we apologise for the inconvenience - learn more here.

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.