<?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 Re: Retrieve thousands of files and folders without throttling in Dropbox API Support &amp; Feedback</title>
    <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Retrieve-thousands-of-files-and-folders-without-throttling/m-p/644327#M29598</link>
    <description>&lt;P&gt;Other types of namespaces like that aren't specific to a single team member. Shared folders have multiple members (and the owner can change over time), for instance, and team folders are owned by the team.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And that's correct, &lt;A href="https://www.dropbox.com/developers/documentation/http/documentation#sharing-list_file_members-batch" target="_blank" rel="noopener noreferrer"&gt;/2/sharing/list_file_members/batch&lt;/A&gt; does work differently than &lt;A href="https://www.dropbox.com/developers/documentation/http/documentation#sharing-list_file_members" target="_blank"&gt;/2/sharing/list_file_members&lt;/A&gt;. Refer to the documentation for more information.&lt;/P&gt;</description>
    <pubDate>Thu, 15 Dec 2022 18:26:17 GMT</pubDate>
    <dc:creator>Greg-DB</dc:creator>
    <dc:date>2022-12-15T18:26:17Z</dc:date>
    <item>
      <title>Retrieve thousands of files and folders without throttling</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Retrieve-thousands-of-files-and-folders-without-throttling/m-p/644271#M29589</link>
      <description>&lt;P&gt;I'm trying to generate a nice big array for each user that contains all the files and folders the user owns as well as the users that each file/folder is shared with (e.g. users: ["John Doe": [{"name":"DemoDoc", "type": "file", "isShared": true, "sharedWithUsers": "bob@company.com", "joe@company.com"},{"name":"DemoFolder", "type": "folder", "isShared": false},...]]). I'll need to do this for a few hundred users. How should I do this with as few calls as possible?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The following is one approach per user:&lt;/P&gt;
&lt;P&gt;1) Get Dropbox users (POST request): &amp;nbsp;&amp;nbsp;&lt;A title="https://api.dropboxapi.com/2/team/members/list" href="https://api.dropboxapi.com/2/team/members/list" target="_blank" rel="noopener noreferrer"&gt;https://api.dropboxapi.com/2/team/members/list&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;2) Loop through each member and grab their team_member_id&lt;/P&gt;
&lt;P&gt;3) For each member (currently 364 members) get all their folders and files recursively:&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A title="https://api.dropboxapi.com/2/files/list_folder" href="https://api.dropboxapi.com/2/files/list_folder" target="_blank" rel="noopener noreferrer"&gt;https://api.dropboxapi.com/2/files/list_folder&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;4) For each member folder, if it's shared get the members and add folder to user object if user is the owner of shared folder:&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A title="https://api.dropboxapi.com/2/sharing/list_folder_members" href="https://api.dropboxapi.com/2/sharing/list_folder_members" target="_blank" rel="noopener noreferrer"&gt;https://api.dropboxapi.com/2/sharing/list_folder_members&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;5) If folder isn't shared then add folder to user object&lt;/P&gt;
&lt;P&gt;6) If file check to see if user is owner of file:&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A title="https://api.dropboxapi.com/2/sharing/list_file_members" href="https://api.dropboxapi.com/2/sharing/list_file_members" target="_blank" rel="noopener noreferrer"&gt;https://api.dropboxapi.com/2/sharing/list_file_members&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;7) If owner of file add file to user object&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This approach could be thousands of http calls just for one user, which leads me to think this could be a very time expensive approach as well as the possibility of throttling.&lt;/P&gt;</description>
      <pubDate>Thu, 15 Dec 2022 19:00:25 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Retrieve-thousands-of-files-and-folders-without-throttling/m-p/644271#M29589</guid>
      <dc:creator>journeymigration</dc:creator>
      <dc:date>2022-12-15T19:00:25Z</dc:date>
    </item>
    <item>
      <title>Re: Retrieve thousands of files and folders without throttling</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Retrieve-thousands-of-files-and-folders-without-throttling/m-p/644294#M29590</link>
      <description>&lt;P&gt;[Cross-linking for reference: &lt;A href="https://stackoverflow.com/questions/74813769/retrieve-thousands-of-files-and-folders-without-throttling" target="_blank"&gt;https://stackoverflow.com/questions/74813769/retrieve-thousands-of-files-and-folders-without-throttling&lt;/A&gt; ]&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It sounds like you have the right idea here, though be sure to use batch options/endpoints whenever possible. For instance, use recursive:true on &lt;A href="https://www.dropbox.com/developers/documentation/http/documentation#files-list_folder" target="_blank"&gt;/2/files/list_folder&lt;/A&gt; and then page through with &lt;A href="https://www.dropbox.com/developers/documentation/http/documentation#files-list_folder-continue" target="_blank"&gt;/2/files/list_folder/continue&lt;/A&gt; instead of recursing for each folder yourself. Also, you can use &lt;A href="https://www.dropbox.com/developers/documentation/http/documentation#sharing-list_file_members-batch" target="_blank"&gt;/2/sharing/list_file_members/batch&lt;/A&gt; to get the members of multiple files at once.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also, you may want to start from &lt;A href="https://www.dropbox.com/developers/documentation/http/teams#team-namespaces-list" target="_blank"&gt;/2/team/namespaces/list&lt;/A&gt; and &lt;A href="https://www.dropbox.com/developers/documentation/http/teams#team-namespaces-list-continue" target="_blank"&gt;/2/team/namespaces/list/continue&lt;/A&gt; to iterate over and list unique namespaces (such as team member folders, shared folders, etc.) as that may be more efficient than working from the member list.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And for reference, the Dropbox API does have a rate limiting system, but if/when you do hit it, the back-off period is generally only on the scale of seconds/minutes, so that hopefully wouldn't be too disruptive if you do run in to that. You can find more information in the &lt;A href="https://www.dropbox.com/developers/documentation/http/documentation#error-handling" target="_blank"&gt;error documentation&lt;/A&gt; and &lt;A href="https://developers.dropbox.com/error-handling-guide" target="_blank"&gt;Error Handling Guide&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Thu, 15 Dec 2022 16:30:27 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Retrieve-thousands-of-files-and-folders-without-throttling/m-p/644294#M29590</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2022-12-15T16:30:27Z</dc:date>
    </item>
    <item>
      <title>Re: Retrieve thousands of files and folders without throttling</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Retrieve-thousands-of-files-and-folders-without-throttling/m-p/644308#M29591</link>
      <description>&lt;P&gt;If I used the&amp;nbsp;&lt;A href="https://www.dropbox.com/developers/documentation/http/teams#team-namespaces-list" target="_blank" rel="noopener noreferrer"&gt;/2/team/namespaces/list&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;and&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://www.dropbox.com/developers/documentation/http/teams#team-namespaces-list-continue" target="_blank" rel="noopener noreferrer"&gt;/2/team/namespaces/list/continue&lt;/A&gt;&amp;nbsp;endpoints how would I know who owns the folder and the files within the folder (and their owners)?&lt;/P&gt;</description>
      <pubDate>Thu, 15 Dec 2022 17:00:56 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Retrieve-thousands-of-files-and-folders-without-throttling/m-p/644308#M29591</guid>
      <dc:creator>journeymigration</dc:creator>
      <dc:date>2022-12-15T17:00:56Z</dc:date>
    </item>
    <item>
      <title>Re: Retrieve thousands of files and folders without throttling</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Retrieve-thousands-of-files-and-folders-without-throttling/m-p/644310#M29592</link>
      <description>&lt;P&gt;For team member folders, the &lt;A href="https://www.dropbox.com/developers/documentation/http/teams#team-namespaces-list" target="_blank" rel="noopener noreferrer"&gt;/2/team/namespaces/list&lt;/A&gt; and &lt;A href="https://www.dropbox.com/developers/documentation/http/teams#team-namespaces-list-continue" target="_blank" rel="noopener noreferrer"&gt;/2/team/namespaces/list/continue&lt;/A&gt; results include the relevant team_member_id in the NamespaceMetadata object.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For shared folders, you can still use &lt;A href="https://www.dropbox.com/developers/documentation/http/documentation#sharing-list_folder_members" target="_blank"&gt;/2/sharing/list_folder_members&lt;/A&gt; and &lt;A href="https://www.dropbox.com/developers/documentation/http/documentation#sharing-list_folder_members-continue" target="_blank"&gt;/2/sharing/list_folder_members/continue&lt;/A&gt; to list the shared folder's members and owner. (And content within a shared folder that isn't itself specifically shared doesn't have an owner distinct from its parent shared folder.)&lt;/P&gt;</description>
      <pubDate>Thu, 15 Dec 2022 17:08:33 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Retrieve-thousands-of-files-and-folders-without-throttling/m-p/644310#M29592</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2022-12-15T17:08:33Z</dc:date>
    </item>
    <item>
      <title>Re: Retrieve thousands of files and folders without throttling</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Retrieve-thousands-of-files-and-folders-without-throttling/m-p/644315#M29594</link>
      <description>&lt;P&gt;On initial glance, the namespaces array is returning objects like the following:&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;"name"&lt;/SPAN&gt;&lt;SPAN&gt;: &lt;/SPAN&gt;&lt;SPAN&gt;"*****"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DI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N&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;The exception is when "name": "Root". Is there a reason the other objects don't include the team_member_id?&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 15 Dec 2022 17:15:58 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Retrieve-thousands-of-files-and-folders-without-throttling/m-p/644315#M29594</guid>
      <dc:creator>journeymigration</dc:creator>
      <dc:date>2022-12-15T17:15:58Z</dc:date>
    </item>
    <item>
      <title>Re: Retrieve thousands of files and folders without throttling</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Retrieve-thousands-of-files-and-folders-without-throttling/m-p/644324#M29596</link>
      <description>&lt;P&gt;Also for&amp;nbsp;&lt;A href="https://www.dropbox.com/developers/documentation/http/documentation#sharing-list_file_members-batch" target="_blank" rel="noopener noreferrer"&gt;/2/sharing/list_file_members/batch&lt;/A&gt;, if I understand correctly this will only list members that are different from the inherited sharing of the parent folder. If I call the batch endpoint I'm getting an array of empty results, like so:&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;"file"&lt;/SPAN&gt;&lt;SPAN&gt;: &lt;/SPAN&gt;&lt;SPAN&gt;"id:****"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;"result"&lt;/SPAN&gt;&lt;SPAN&gt;: {&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;".tag"&lt;/SPAN&gt;&lt;SPAN&gt;: &lt;/SPAN&gt;&lt;SPAN&gt;"result"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;"members"&lt;/SPAN&gt;&lt;SPAN&gt;: {&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;"users"&lt;/SPAN&gt;&lt;SPAN&gt;: [],&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;"groups"&lt;/SPAN&gt;&lt;SPAN&gt;: [],&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;"invitees"&lt;/SPAN&gt;&lt;SPAN&gt;: []&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;},&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;"member_count"&lt;/SPAN&gt;&lt;SPAN&gt;: &lt;/SPAN&gt;&lt;SPAN&gt;0&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;However, if I call the&amp;nbsp;&lt;A href="https://www.dropbox.com/developers/documentation/http/documentation#sharing-list_file_members-batch" target="_blank" rel="noopener noreferrer"&gt;/2/sharing/list_file_members&lt;/A&gt;&amp;nbsp; endpoint&amp;nbsp;(using just one file id, of course) I get each member and their access type. The problem with the batch approach is how do I know who are the members and owner of each file then?&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 15 Dec 2022 18:31:32 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Retrieve-thousands-of-files-and-folders-without-throttling/m-p/644324#M29596</guid>
      <dc:creator>journeymigration</dc:creator>
      <dc:date>2022-12-15T18:31:32Z</dc:date>
    </item>
    <item>
      <title>Re: Retrieve thousands of files and folders without throttling</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Retrieve-thousands-of-files-and-folders-without-throttling/m-p/644327#M29598</link>
      <description>&lt;P&gt;Other types of namespaces like that aren't specific to a single team member. Shared folders have multiple members (and the owner can change over time), for instance, and team folders are owned by the team.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And that's correct, &lt;A href="https://www.dropbox.com/developers/documentation/http/documentation#sharing-list_file_members-batch" target="_blank" rel="noopener noreferrer"&gt;/2/sharing/list_file_members/batch&lt;/A&gt; does work differently than &lt;A href="https://www.dropbox.com/developers/documentation/http/documentation#sharing-list_file_members" target="_blank"&gt;/2/sharing/list_file_members&lt;/A&gt;. Refer to the documentation for more information.&lt;/P&gt;</description>
      <pubDate>Thu, 15 Dec 2022 18:26:17 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Retrieve-thousands-of-files-and-folders-without-throttling/m-p/644327#M29598</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2022-12-15T18:26:17Z</dc:date>
    </item>
    <item>
      <title>Re: Retrieve thousands of files and folders without throttling</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Retrieve-thousands-of-files-and-folders-without-throttling/m-p/644329#M29599</link>
      <description>&lt;P&gt;Thanks Greg,&lt;/P&gt;&lt;P&gt;Seems like the only way to get info on who the owner of each file is to call the&amp;nbsp;&lt;A href="https://api.dropboxapi.com/2/sharing/list_file_members" target="_blank"&gt;https://api.dropboxapi.com/2/sharing/list_file_members&lt;/A&gt;&amp;nbsp;endpoint then. Batching only tells me if members are different than the inherited parent folder, and&amp;nbsp;&lt;A href="https://api.dropboxapi.com/2/files/list_folder" target="_blank"&gt;https://api.dropboxapi.com/2/files/list_folder&lt;/A&gt;&amp;nbsp;doesn't give me that information.&lt;/P&gt;</description>
      <pubDate>Thu, 15 Dec 2022 18:35:40 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Retrieve-thousands-of-files-and-folders-without-throttling/m-p/644329#M29599</guid>
      <dc:creator>journeymigration</dc:creator>
      <dc:date>2022-12-15T18:35:40Z</dc:date>
    </item>
  </channel>
</rss>

