cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Share your feedback on the Document Scanning Experience in the Dropbox App right 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: 

Re: Wildcard search

Wildcard search

RobFearnside
New member | Level 2
Go to solution

I'm writing an app where I'd like to be able to search for all video/image files in a particular folder.  For example, for the root I was imagining that I'd be able to post something like this to files/search_v2 :

 

{
   "options" : 
{ "file_categories": ["video", "image"] } }

 

but that fails because I haven't supplied a 'query' parameter.  If I supply this :

 

{
   "query" : "*",
   "options" : 
   {
      "file_categories": ["video", "image"]
   }
}

then there are no matches (presumbly because I have no files with an asterisk in the name).

 

Is it possible to search for files (or folders) without having to specify a 'query' (in order to find all files which match the supplied 'options' criteria)? 

 

 

1 Accepted Solution

Accepted Solutions

Greg-DB
Dropbox Staff
Go to solution

No, unfortunately, the Dropbox API doesn't offer the ability to do a wildcard search like this, but I'll pass this along as a feature request. I can't promise if or when that might be implemented though. 

 

While not ideal, as a workaround, you could list the full contents of the folder using /2/files/list_folder[/continue] and filter based on the file extension.

View solution in original post

5 Replies 5

Greg-DB
Dropbox Staff
Go to solution

No, unfortunately, the Dropbox API doesn't offer the ability to do a wildcard search like this, but I'll pass this along as a feature request. I can't promise if or when that might be implemented though. 

 

While not ideal, as a workaround, you could list the full contents of the folder using /2/files/list_folder[/continue] and filter based on the file extension.

George g.
New member | Level 2
Go to solution

Isn't this the proposed solution for getting all files that have changed since a given date? I'm unclear how we can do that without being able to supply a wildcard. Is there another recommendation for achieving that?

Greg-DB
Dropbox Staff
Go to solution

The /2/files/list_folder and /2/files/list_folder/continue endpoints do not restrict you to listing files that have changed since a certain date (nor do they offer date filters exactly). They can be used to list the full contents under any path, such as a specific folder or the root folder (identified by the empty string "').

 

The /2/files/list_folder/continue endpoint can also be used to keep track of further changes over time.

 

I recommend reading the File Access Guide and Detecting Changes Guide for more information.

HippoJens
New member | Level 2
Go to solution

Any news on this ?

Also in the User Frontend ?

Greg-DB
Dropbox Staff
Go to solution

@HippoJens No, I don't have any news on this feature request.

Need more support?