The Community is undergoing an upgrade and some features may be unavailable. Find out more here.
Forum Discussion
adityadsq
3 years agoExplorer | Level 3
search with file tags api
i am trying to get the list of files based on tags using search api. when i search file name it return the data but not with the tags. please help
Greg-DB
Dropbox Staff
Just to confirm exactly what functionality you are referring to, are you applying the tags you mentioned by using the Dropbox web site or /2/files/tags/add, or something else?
Also, note that you should only be using the options and fields documented for /2/files/search_v2 here, which does not include "search_tags", "image_content_search", or "reverse_order".
amilcarvalho
2 years agoExplorer | Level 3
Hello,
I'm getting the same issue. I have a file with tags added by website and by the api endpoint 2/files/tags/add.
When I make the request only works with file name.
Hope you can help me
- Здравко2 years agoLegendary | Level 20
Hi amilcarvalho,
I checked it and everything works. Yes, it's inconvenient since not option to direct the search to tags only and many unrelated result entries may appear. In spite all tags get in the result in correct way.
What's the exact call your performed? Did you restrict the search operation in a way that can exclude some tagged entry (or all of them)? For instance, limiting search to filenames will exclude any tags. Inappropriate extensions and/or categories would reflect to ability of find all (or some) tags!
Let's hope this feature will be improved by Dropbox.
Till then, I hope this gives workaround direction.
- amilcarvalho2 years agoExplorer | Level 3
Hello,
Thanks for you answer. I post to the endpoint "/2/files/search_v2". With just {"query":"tag1"} on body.
I want to retrieve content that contains the tag1. Is this possible?
curl -X POST https://api.dropboxapi.com/2/files/search_v2 \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data '{"query":"tag1"}'- Greg-DB2 years agoDropbox Staff
amilcarvalho Thanks for the report. If you have a file with a tag "tag1" in the connected account, that /2/files/search_v2 call should return that file, so it sounds like something may not be working properly. We'll look into it.
- amilcarvalho2 years agoExplorer | Level 3
Hello,
Thanks for you answer. I post to the endpoint "/2/files/search_v2". With just {"query":"tag1"} on body.
I want to retrieve content that contains the tag1. Is this possible?
curl -X POST https://api.dropboxapi.com/2/files/search_v2 \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data '{"query":"tag1"}'- Здравко2 years agoLegendary | Level 20
amilcarvalho wrote:...
Thanks for you answer. I post to the endpoint "/2/files/search_v2". With just {"query":"tag1"} on body.
I want to retrieve content that contains the tag1. Is this possible?...
In such a way you will receive all entries metadata matching to the query. Matching are all entries (files and folders) containing in their names, tags, or content the query value - tag1. If you want to receive content of particular entry, you need to read it accordingly! Tags themself don't have any content, they're... just tags! Clarify to yourself what content you're looking for.
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
5,874 PostsLatest Activity: 9 hours agoIf 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!