Curious about A, B, C, and D drives? Learn what they mean and how to use them effectively with Dropbox in this handy guide! - check it out now!

Forum Discussion

Jon B.1's avatar
Jon B.1
Collaborator | Level 9
4 years ago
Solved

SearchV2 cursor update

Just a quick question about the /search and /search/continue endpoints...

 

I want to search for all files with a particular extension, and get notified of any updates.  Do the cursors returned by /search and /search/continue behave the same as the /list_folder/continue cursors, in that they will continue to return new additions which satisfy the search?  And do those updates include DeletedMetadata on previous search results which have since been deleted?

  • No, the cursors returned by the search endpoints are meant for pagination and do not promise to track changes over time. Also, the search endpoints require some query, so they don't support just searching for all files of a particular file type anyway, but I'll pass this along as a feature request. I can't promise if or when that might be implemented though.

     

    That being the case, it sounds like for your use case you should use the /2/files/list_folder[/continue] functionality to list/track entries and filter the results as desired client-side.

  • Jon B.1's avatar
    Jon B.1
    Collaborator | Level 9

    Footnote:  for the record, I mean search V2, not V1!

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

    No, the cursors returned by the search endpoints are meant for pagination and do not promise to track changes over time. Also, the search endpoints require some query, so they don't support just searching for all files of a particular file type anyway, but I'll pass this along as a feature request. I can't promise if or when that might be implemented though.

     

    That being the case, it sounds like for your use case you should use the /2/files/list_folder[/continue] functionality to list/track entries and filter the results as desired client-side.

    • Jon B.1's avatar
      Jon B.1
      Collaborator | Level 9

      So do a complete recursive directory listing at the same time as the initial find, and then just track the updates and filter them for files which match...  yeah, that's doable!  Thanks.