We're making changes to the Community, so you may have received some notifications - thanks for your patience and welcome back. Learn more here.

Forum Discussion

g-eleftheriou's avatar
g-eleftheriou
New member | Level 2
7 years ago

File search method returns no match

Hi, i am using the dropbox api long time and didn't have any problems, expect of this one. In one of my tests i uploaded some files through the api and one of them i can't find it afterwards through the search method. The list_revisions method for the same path and filename returns two entries, but the search nothing. Why this is happening? I am using the search method as a confirmation that all my files where uploaded correctly (so i can try again later to upload). If you need more details about which specific path and file has the problem please tell me.

 

Thank you in advance for any help.

  • The /2/files/search endpoint is subject to a delay due to indexing, so newly uploaded files won't be immediately returned. That being the case, I don't recommend using this to verify newly uploaded files.

     

    You don't need to call back to check that anyway though, as you can just check the response from the upload call itself to see if it succeeded or failed. If you want to though, using /2/files/get_metadata or /2/files/list_folder[/continue] would be better as they're not subject to the delay.

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

    The /2/files/search endpoint is subject to a delay due to indexing, so newly uploaded files won't be immediately returned. That being the case, I don't recommend using this to verify newly uploaded files.

     

    You don't need to call back to check that anyway though, as you can just check the response from the upload call itself to see if it succeeded or failed. If you want to though, using /2/files/get_metadata or /2/files/list_folder[/continue] would be better as they're not subject to the delay.

    • g-eleftheriou's avatar
      g-eleftheriou
      New member | Level 2

      Thank you very much for your answer and your suggestions. I know that the search method can not be accurate cause of delay for indexing and i will reconsider my implementation, but still i don't believe it needs hours. Right now i checked again and still gives me no match while i can see this file entry correctly from the list_folder method.

      • Greg-DB's avatar
        Greg-DB
        Icon for Dropbox Staff rankDropbox Staff
        It generally will only be on the scale of seconds to minutes, and not hours, but it can vary and be longer across different accounts and over time due to several factors, such as the amount of activity in the account, any server issues on our side, etc.

About Dropbox API Support & Feedback

Node avatar for Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

5,875 PostsLatest Activity: 2 months ago
325 Following

If you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X or Facebook.

For more info on available support options for your Dropbox plan, see this article.

If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!