<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Search files in folder based on file tags python sdk in Dropbox API Support &amp; Feedback</title>
    <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Search-files-in-folder-based-on-file-tags-python-sdk/m-p/730077#M32280</link>
    <description>&lt;P&gt;I'm trying to search files in a folder based on file tag, python SDK, yet encountering an error when trying to use my folder path:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;from dropbox.files import SearchOptions

# search_op = SearchOptions() # this works but gives me everything from master folder
search_op = SearchOptions(path="/Thang Nguyen/Nano/Photos/Appurtenances/", max_results=10)

dm = dbx.files_search_v2(query="significant", options=search_op)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt; raise BadInputError(request_id, res.text)
dropbox.exceptions.BadInputError: BadInputError('58ddfa8a32824ea9b8e80882f2ef3a59', 'Error in call to API function "files/search_v2": invalid_argument')&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Also, right now I'm passing in "query" and I'm assuming that would retrieve all files associate with "significant" keyword. How do I specify to search by tags only? Any code example would be a great help.&lt;BR /&gt;&lt;BR /&gt;I also need to implement this function in Java.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 16 Nov 2023 06:39:35 GMT</pubDate>
    <dc:creator>Thang2000</dc:creator>
    <dc:date>2023-11-16T06:39:35Z</dc:date>
    <item>
      <title>Search files in folder based on file tags python sdk</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Search-files-in-folder-based-on-file-tags-python-sdk/m-p/730077#M32280</link>
      <description>&lt;P&gt;I'm trying to search files in a folder based on file tag, python SDK, yet encountering an error when trying to use my folder path:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;from dropbox.files import SearchOptions

# search_op = SearchOptions() # this works but gives me everything from master folder
search_op = SearchOptions(path="/Thang Nguyen/Nano/Photos/Appurtenances/", max_results=10)

dm = dbx.files_search_v2(query="significant", options=search_op)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt; raise BadInputError(request_id, res.text)
dropbox.exceptions.BadInputError: BadInputError('58ddfa8a32824ea9b8e80882f2ef3a59', 'Error in call to API function "files/search_v2": invalid_argument')&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Also, right now I'm passing in "query" and I'm assuming that would retrieve all files associate with "significant" keyword. How do I specify to search by tags only? Any code example would be a great help.&lt;BR /&gt;&lt;BR /&gt;I also need to implement this function in Java.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Nov 2023 06:39:35 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Search-files-in-folder-based-on-file-tags-python-sdk/m-p/730077#M32280</guid>
      <dc:creator>Thang2000</dc:creator>
      <dc:date>2023-11-16T06:39:35Z</dc:date>
    </item>
    <item>
      <title>Re: Search files in folder based on file tags python sdk</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Search-files-in-folder-based-on-file-tags-python-sdk/m-p/730092#M32282</link>
      <description>&lt;P&gt;&lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/1710958"&gt;@Thang2000&lt;/a&gt;, you're getting that error because you have passed invalid argument - path in Dropbox (to either file or folder) cannot end in slash! That's it.&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;</description>
      <pubDate>Thu, 16 Nov 2023 09:00:02 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Search-files-in-folder-based-on-file-tags-python-sdk/m-p/730092#M32282</guid>
      <dc:creator>Здравко</dc:creator>
      <dc:date>2023-11-16T09:00:02Z</dc:date>
    </item>
    <item>
      <title>Re: Search files in folder based on file tags python sdk</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Search-files-in-folder-based-on-file-tags-python-sdk/m-p/730216#M32288</link>
      <description>&lt;P&gt;&lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/1710958"&gt;@Thang2000&lt;/a&gt; As Здравко said, the error you're getting is because of the extra "/" you have at the end of your "path" value. Remove that extra slash to get that to work.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The &lt;A href="https://github.com/dropbox/dropbox-sdk-java" target="_blank"&gt;Dropbox Java SDK&lt;/A&gt; offers the same &lt;A href="https://dropbox.github.io/dropbox-sdk-java/api-docs/v5.4.3/com/dropbox/core/v2/files/DbxUserFilesRequests.html#searchV2(java.lang.String)" target="_self"&gt;search functionality&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As for searching by tags only, unfortunately the Dropbox API (regardless of which SDK you're using, if any) doesn't currently offer an option for restricting the search to&amp;nbsp;match tag values only, but I'll pass this along as a feature request. I can't promise if or when that might be implemented though.&lt;/P&gt;</description>
      <pubDate>Thu, 16 Nov 2023 15:28:40 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Search-files-in-folder-based-on-file-tags-python-sdk/m-p/730216#M32288</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2023-11-16T15:28:40Z</dc:date>
    </item>
  </channel>
</rss>

