<?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 How to get relative path of file in team folder? in Dropbox API Support &amp; Feedback</title>
    <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-get-relative-path-of-file-in-team-folder/m-p/273864#M16299</link>
    <description>&lt;P&gt;My app tracks the files and keeps the metadata&amp;nbsp;in my db and I do it by frequently calling list_folder/continue&lt;BR /&gt;I recently added support to team folders&lt;BR /&gt;I&amp;nbsp;so I use path: "ns:&amp;lt;namespace_id&amp;gt;" to get the content&lt;BR /&gt;When I get the&amp;nbsp;metadata of the file I get no path&amp;nbsp;in the response, only the parent_shared_folder_id&lt;BR /&gt;The problem is when I have a&amp;nbsp;sub-folder inside the team folder&lt;BR /&gt;for ex: /Marketing/Sub-folder/file.txt&lt;BR /&gt;I still get the&amp;nbsp;&lt;SPAN&gt;parent_shared_folder_id of Marketing, so I can't know it is in a sub folder&lt;BR /&gt;&lt;/SPAN&gt;I tried using get_metadata with the file's id but still no path&lt;BR /&gt;&lt;BR /&gt;I actually need it to run delete operations, so if there is a way to use the id&amp;nbsp;it will also be fine&lt;BR /&gt;This is the only way I was able to delete a file in a team folder using this path&lt;BR /&gt;{"path":"ns:2464786112/Sub_Marketing/file25042018_1555.pdf"}&lt;BR /&gt;(&lt;SPAN&gt;ns:2464786112 is Marketing namespace id)&lt;BR /&gt;&lt;BR /&gt;I was able to delete files with only id in the path but only files that are in the user's account and not files in a team folder.&lt;BR /&gt;I'm using a team token and tried all variations with&amp;nbsp;Dropbox-Api-Select-Admin header and&amp;nbsp;Dropbox-Api-Select-User header and wasn't able to delete&lt;BR /&gt;I keep getting&amp;nbsp;path_lookup/not_found/&lt;BR /&gt;&lt;BR /&gt;So either getting the relative path or deleting by id will be good for me. (If I can do both I would like to know also)&lt;BR /&gt;Thanks&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 29 May 2019 09:13:45 GMT</pubDate>
    <dc:creator>dochdl</dc:creator>
    <dc:date>2019-05-29T09:13:45Z</dc:date>
    <item>
      <title>How to get relative path of file in team folder?</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-get-relative-path-of-file-in-team-folder/m-p/273864#M16299</link>
      <description>&lt;P&gt;My app tracks the files and keeps the metadata&amp;nbsp;in my db and I do it by frequently calling list_folder/continue&lt;BR /&gt;I recently added support to team folders&lt;BR /&gt;I&amp;nbsp;so I use path: "ns:&amp;lt;namespace_id&amp;gt;" to get the content&lt;BR /&gt;When I get the&amp;nbsp;metadata of the file I get no path&amp;nbsp;in the response, only the parent_shared_folder_id&lt;BR /&gt;The problem is when I have a&amp;nbsp;sub-folder inside the team folder&lt;BR /&gt;for ex: /Marketing/Sub-folder/file.txt&lt;BR /&gt;I still get the&amp;nbsp;&lt;SPAN&gt;parent_shared_folder_id of Marketing, so I can't know it is in a sub folder&lt;BR /&gt;&lt;/SPAN&gt;I tried using get_metadata with the file's id but still no path&lt;BR /&gt;&lt;BR /&gt;I actually need it to run delete operations, so if there is a way to use the id&amp;nbsp;it will also be fine&lt;BR /&gt;This is the only way I was able to delete a file in a team folder using this path&lt;BR /&gt;{"path":"ns:2464786112/Sub_Marketing/file25042018_1555.pdf"}&lt;BR /&gt;(&lt;SPAN&gt;ns:2464786112 is Marketing namespace id)&lt;BR /&gt;&lt;BR /&gt;I was able to delete files with only id in the path but only files that are in the user's account and not files in a team folder.&lt;BR /&gt;I'm using a team token and tried all variations with&amp;nbsp;Dropbox-Api-Select-Admin header and&amp;nbsp;Dropbox-Api-Select-User header and wasn't able to delete&lt;BR /&gt;I keep getting&amp;nbsp;path_lookup/not_found/&lt;BR /&gt;&lt;BR /&gt;So either getting the relative path or deleting by id will be good for me. (If I can do both I would like to know also)&lt;BR /&gt;Thanks&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 29 May 2019 09:13:45 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-get-relative-path-of-file-in-team-folder/m-p/273864#M16299</guid>
      <dc:creator>dochdl</dc:creator>
      <dc:date>2019-05-29T09:13:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to get relative path of file in team folder?</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-get-relative-path-of-file-in-team-folder/m-p/273899#M16301</link>
      <description>&lt;P&gt;To get the relative paths for items in the team space, you should use the "Dropbox-API-Path-Root" to set the root for the API call to that team space. You can find more information in the namespace guide:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://www.dropbox.com/developers/reference/namespace-guide" target="_blank"&gt;https://www.dropbox.com/developers/reference/namespace-guide&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For example, that would look like this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;curl -X POST https://api.dropboxapi.com/2/files/list_folder \
    --header 'Authorization: Bearer &amp;lt;ACCESS_TOKEN&amp;gt;' \
    --header 'Dropbox-API-Select-User: &amp;lt;MEMBER_ID&amp;gt;' \
    --header 'Content-Type: application/json' \
    --header 'Dropbox-API-Path-Root: {".tag": "root", "root": "&amp;lt;NS_ID&amp;gt;"}' \
    --data "{\"path\": \"\"}"&lt;/PRE&gt;
&lt;P&gt;Also, using that, you can delete either via path or id.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 25 Apr 2018 19:27:40 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-get-relative-path-of-file-in-team-folder/m-p/273899#M16301</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2018-04-25T19:27:40Z</dc:date>
    </item>
  </channel>
</rss>

