cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
What’s new: end-to-end encryption, Replay and Dash updates. Find out more about these updates, new features and 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: 

File search method returns no match

File search method returns no match

g-eleftheriou
New member | Level 2
Go to solution

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.

1 Accepted Solution

Accepted Solutions

Greg-DB
Dropbox Staff
Go to solution

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.

View solution in original post

4 Replies 4

Greg-DB
Dropbox Staff
Go to solution

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
New member | Level 2
Go to solution

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
Dropbox Staff
Go to solution
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.

g-eleftheriou
New member | Level 2
Go to solution

I understand. I will try to make use of get_metadata method so i will not have problems like this again. Anyway thank you very much for your quick response and help :D.

Need more support?
Who's talking

Top contributors to this post

  • User avatar
    g-eleftheriou New member | Level 2
  • User avatar
    Greg-DB Dropbox Staff
What do Dropbox user levels mean?