<?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 Changing many file access rights with api in Dropbox API Support &amp; Feedback</title>
    <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Changing-many-file-access-rights-with-api/m-p/749469#M32903</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;I'm looking to move a large amount of folders from directory A to directory B. For this I use fileCopyV2 with a little delay between each move to avoid too_many_request and everything works fine. However, I also need to change the access rights to these folders during the transfer. I need to make sure that the inherit rights from the new parent folder disappear, and that the new rights are applied.&amp;nbsp;To do this, I use multithreading so that I don't block my script. To remove the rights I start by sharing the folder, then I wait a few seconds for the folder to be shared. I retrieve his sharing_id and use it to remove all access to the folder. Then I add the new rights.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;My problem is that I always get the too_many_write_opérations error. With a message asking me to wait 30 seconds. I could add delays, but I have to transfer thousands of folders, so if I add enough time I'll have to run my script for days. Outside of that, it's impossible. So I wanted to know if there is an easier way to make my project a reality. Or if optimization is possible.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks in advance&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Qrab&lt;/P&gt;</description>
    <pubDate>Tue, 06 Feb 2024 15:10:49 GMT</pubDate>
    <dc:creator>Qrab</dc:creator>
    <dc:date>2024-02-06T15:10:49Z</dc:date>
    <item>
      <title>Changing many file access rights with api</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Changing-many-file-access-rights-with-api/m-p/749469#M32903</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;I'm looking to move a large amount of folders from directory A to directory B. For this I use fileCopyV2 with a little delay between each move to avoid too_many_request and everything works fine. However, I also need to change the access rights to these folders during the transfer. I need to make sure that the inherit rights from the new parent folder disappear, and that the new rights are applied.&amp;nbsp;To do this, I use multithreading so that I don't block my script. To remove the rights I start by sharing the folder, then I wait a few seconds for the folder to be shared. I retrieve his sharing_id and use it to remove all access to the folder. Then I add the new rights.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;My problem is that I always get the too_many_write_opérations error. With a message asking me to wait 30 seconds. I could add delays, but I have to transfer thousands of folders, so if I add enough time I'll have to run my script for days. Outside of that, it's impossible. So I wanted to know if there is an easier way to make my project a reality. Or if optimization is possible.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks in advance&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Qrab&lt;/P&gt;</description>
      <pubDate>Tue, 06 Feb 2024 15:10:49 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Changing-many-file-access-rights-with-api/m-p/749469#M32903</guid>
      <dc:creator>Qrab</dc:creator>
      <dc:date>2024-02-06T15:10:49Z</dc:date>
    </item>
    <item>
      <title>Re: Changing many file access rights with api</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Changing-many-file-access-rights-with-api/m-p/749493#M32904</link>
      <description>&lt;P&gt;&lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/1801618"&gt;@Qrab&lt;/a&gt;, If there are multiple changes at the same time in the same account or shared folder, you can run in to this 'too_many_write_operations' error, which is "lock contention". That's not explicit rate limiting, but rather a result of how Dropbox works on the back-end. This is a technical inability to make a modification in the account or shared folder at the time of the API call.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This applies to all account types. This error indicates that there was simultaneous activity in the account or shared/team folder preventing your app from making the state-modifying call (e.g., adding, editing, moving, copying, sharing, or deleting files/folders) it is attempting. The simultaneous activity could be coming from your app itself, or elsewhere, e.g., from the user's desktop client. It can come from the same user, or another member of a shared folder. You can find &lt;A href="https://developers.dropbox.com/dbx-performance-guide" target="_blank" rel="noopener noreferrer"&gt;more information about lock contention and optimizations you can make here&lt;/A&gt;. The app will need to be written to automatically handle this error.&lt;BR /&gt;&lt;BR /&gt;In short, to avoid this error, you should avoid making multiple concurrent state modifications and use batch endpoints where possible. That won't guarantee that you won't run in to this error though, as contention can still come from other sources, so you should also implement error handling and automatic retrying as needed. I recommend referring to the &lt;A href="https://www.dropbox.com/developers/documentation/http/documentation#error-handling" target="_blank" rel="noopener noreferrer"&gt;error documentation&lt;/A&gt; and &lt;A href="https://developers.dropbox.com/error-handling-guide" target="_blank" rel="noopener noreferrer"&gt;Error Handling Guide&lt;/A&gt; for more information.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Based on the information you have provided, you are using the&amp;nbsp;&lt;/SPAN&gt;&lt;A class="c-link" href="https://dropbox.github.io/dropbox-sdk-js/Dropbox.html#filesCopyV2__anchor" target="_blank" rel="noopener noreferrer" data-stringify-link="https://dropbox.github.io/dropbox-sdk-js/Dropbox.html#filesCopyV2__anchor" data-sk="tooltip_parent"&gt;filesCopyV2&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;method to copy individual files and folders. An alternative approach would be using the&amp;nbsp;&lt;/SPAN&gt;&lt;A class="c-link" href="https://dropbox.github.io/dropbox-sdk-js/Dropbox.html#filesCopyBatchV2__anchor" target="_blank" rel="noopener noreferrer" data-stringify-link="https://dropbox.github.io/dropbox-sdk-js/Dropbox.html#filesCopyBatchV2__anchor" data-sk="tooltip_parent"&gt;filesCopyBatchV2&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;method instead. This will allow you to copy multiple files or folders to different locations at once in the user's Dropbox. While using the&amp;nbsp;&lt;/SPAN&gt;&lt;A class="c-link" href="https://dropbox.github.io/dropbox-sdk-js/Dropbox.html#filesCopyBatchV2__anchor" target="_blank" rel="noopener noreferrer" data-stringify-link="https://dropbox.github.io/dropbox-sdk-js/Dropbox.html#filesCopyBatchV2__anchor" data-sk="tooltip_parent"&gt;filesCopyBatchV2&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;method, you can cross-check if it's completed by using the&amp;nbsp;&lt;/SPAN&gt;&lt;A class="c-link" href="https://dropbox.github.io/dropbox-sdk-js/Dropbox.html#filesCopyBatchCheckV2__anchor" target="_blank" rel="noopener noreferrer" data-stringify-link="https://dropbox.github.io/dropbox-sdk-js/Dropbox.html#filesCopyBatchCheckV2__anchor" data-sk="tooltip_parent"&gt;filesCopyBatchCheckV2&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;method.&lt;/SPAN&gt;&lt;SPAN class="c-message__edited_label" data-sk="tooltip_parent"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 06 Feb 2024 16:45:39 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Changing-many-file-access-rights-with-api/m-p/749493#M32904</guid>
      <dc:creator>iNeil</dc:creator>
      <dc:date>2024-02-06T16:45:39Z</dc:date>
    </item>
  </channel>
</rss>

