<?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 get_metadata endpoint cannot find valid namespace IDs in Dropbox API Support &amp; Feedback</title>
    <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/get-metadata-endpoint-cannot-find-valid-namespace-IDs/m-p/335285#M19554</link>
    <description>&lt;P&gt;I am currently iterating over a list of all namespace IDs from a given teamroom.&lt;/P&gt;&lt;P&gt;When i supply these namespace IDs to the &lt;STRONG&gt;files/list_folder&lt;/STRONG&gt; endpoint, I recieve a valid response of all files found within that namespace, so the namespace ID is valid. However when i supply the same namespace ID to the &lt;STRONG&gt;files/get_metadata&lt;/STRONG&gt; endpoint, I receive a 409 response with the following message:&lt;/P&gt;&lt;PRE&gt;'{"error_summary": "path/not_found/.", "error": {".tag": "path", "path":{".tag": "not_found"}}}&lt;/PRE&gt;&lt;P&gt;Why can the &lt;STRONG&gt;files/listfolder&lt;/STRONG&gt;&amp;nbsp;successfully find the folder using the namespace id as a path, but the&amp;nbsp;&lt;STRONG&gt;files/get_metadata&amp;nbsp;&lt;/STRONG&gt;endpoint cannot? The documentation states that namespace IDs should be valid paths when supplied to the get_metadata endpoint:&lt;/P&gt;&lt;PRE&gt;path String(pattern="(/(.|[\r\n])*|id:.* )|(rev:[0-9a-f]{9,})|(ns:[0-9]+(/.* )?)") The path of a file or folder on Dropbox.&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 29 May 2019 09:07:15 GMT</pubDate>
    <dc:creator>joshuacole</dc:creator>
    <dc:date>2019-05-29T09:07:15Z</dc:date>
    <item>
      <title>get_metadata endpoint cannot find valid namespace IDs</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/get-metadata-endpoint-cannot-find-valid-namespace-IDs/m-p/335285#M19554</link>
      <description>&lt;P&gt;I am currently iterating over a list of all namespace IDs from a given teamroom.&lt;/P&gt;&lt;P&gt;When i supply these namespace IDs to the &lt;STRONG&gt;files/list_folder&lt;/STRONG&gt; endpoint, I recieve a valid response of all files found within that namespace, so the namespace ID is valid. However when i supply the same namespace ID to the &lt;STRONG&gt;files/get_metadata&lt;/STRONG&gt; endpoint, I receive a 409 response with the following message:&lt;/P&gt;&lt;PRE&gt;'{"error_summary": "path/not_found/.", "error": {".tag": "path", "path":{".tag": "not_found"}}}&lt;/PRE&gt;&lt;P&gt;Why can the &lt;STRONG&gt;files/listfolder&lt;/STRONG&gt;&amp;nbsp;successfully find the folder using the namespace id as a path, but the&amp;nbsp;&lt;STRONG&gt;files/get_metadata&amp;nbsp;&lt;/STRONG&gt;endpoint cannot? The documentation states that namespace IDs should be valid paths when supplied to the get_metadata endpoint:&lt;/P&gt;&lt;PRE&gt;path String(pattern="(/(.|[\r\n])*|id:.* )|(rev:[0-9a-f]{9,})|(ns:[0-9]+(/.* )?)") The path of a file or folder on Dropbox.&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 29 May 2019 09:07:15 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/get-metadata-endpoint-cannot-find-valid-namespace-IDs/m-p/335285#M19554</guid>
      <dc:creator>joshuacole</dc:creator>
      <dc:date>2019-05-29T09:07:15Z</dc:date>
    </item>
    <item>
      <title>Re: get_metadata endpoint cannot find valid namespace IDs</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/get-metadata-endpoint-cannot-find-valid-namespace-IDs/m-p/335318#M19555</link>
      <description>&lt;P&gt;Are the namespace IDs for the team members' home folders?&lt;/P&gt;
&lt;P&gt;By default, API calls operate using the member's home folder as the "root", but you can't retrieve the metadata for"root". So, while the folders have contents that can be listed, you can't retrieve the metadata for the folder itself.&lt;/P&gt;
&lt;P&gt;For teams using the team space though, you can optionally set the "root" for an API call to be the team space's root, in which case you can retrieve the metadata for the user's folder under that team space root. You can find information on how to do so in &lt;A href="https://www.dropbox.com/developers/reference/namespace-guide" target="_self"&gt;the Namespace Guide here&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;As a concrete example:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;# given a user who is a member of a team with the "team space configuration", with these values:
#     "root_namespace_id": "1990815600",
#     "home_namespace_id": "1990696960",

curl -X POST https://api.dropboxapi.com/2/files/get_metadata \
    --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" \
    --data "{\"path\": \"ns:1990696960\"}"

# ^ this one doesn't work, since you're trying to get the metadata for the current "root"

curl -X POST https://api.dropboxapi.com/2/files/get_metadata \
    --header "Authorization: Bearer &amp;lt;ACCESS_TOKEN&amp;gt;" \
    --header "Dropbox-API-Select-User: &amp;lt;MEMBER_ID&amp;gt;" \
    --header 'Dropbox-API-Path-Root: {".tag": "root", "root": "1990815600"}' \
    --header "Content-Type: application/json" \
    --data "{\"path\": \"ns:1990696960\"}"

# ^ this one does work and returns the metadata for the member's folder under the team space root&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 22 Mar 2019 16:01:59 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/get-metadata-endpoint-cannot-find-valid-namespace-IDs/m-p/335318#M19555</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2019-03-22T16:01:59Z</dc:date>
    </item>
  </channel>
</rss>

