<?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: Automating Purging of All Notebook Revision in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/automating-purging-of-all-notebook-revision/m-p/117413#M45492</link>
    <description>&lt;P&gt;Here are some things to consider:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV class="paragraph"&gt;Automating the purging of notebook revision history in Databricks is not currently a directly supported feature, and there are some challenges in achieving this:&lt;/DIV&gt;
&lt;OL start="1"&gt;
&lt;LI&gt;
&lt;DIV class="paragraph"&gt;&lt;STRONG&gt;Available Methods&lt;/STRONG&gt;:&lt;BR /&gt;Currently, Databricks provides manual options to purge notebook revision history:
&lt;UL&gt;
&lt;LI&gt;Deleting revision history for individual notebooks.&lt;/LI&gt;
&lt;LI&gt;Using the "Permanently purge all revision history" option accessible via &lt;STRONG&gt;Settings &amp;gt; Advanced&lt;/STRONG&gt;, allowing bulk purging for all notebooks.&lt;/LI&gt;
&lt;/UL&gt;
&lt;/DIV&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV class="paragraph"&gt;&lt;STRONG&gt;Testing Internal API Endpoints&lt;/STRONG&gt;:&lt;BR /&gt;The undocumented endpoints you mentioned:
&lt;UL&gt;
&lt;LI&gt;&lt;CODE&gt;{workspace_url}/dataretention/purgehistorybefore/{purge_before_ms}&lt;/CODE&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;CODE&gt;{workspace_url}/notebook/{notebook_id}/history/clearall&lt;/CODE&gt; While you have tested these endpoints and received HTTP 200 responses, the issue seems to be that the purging is not actually executed. This behavior could be due to the experimental or deprecated status of these endpoints, making them unreliable.&lt;/LI&gt;
&lt;/UL&gt;
&lt;/DIV&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV class="paragraph"&gt;&lt;STRONG&gt;Alternative Automation Strategies&lt;/STRONG&gt;:&lt;BR /&gt;Based on context from related tooling and approaches:
&lt;UL&gt;
&lt;LI&gt;To script bulk revision purging, programmatic access through Databricks APIs (where available) remains the best option. However, for undocumented endpoints or limited API support, you might consider using workarounds such as invoking browser automation tools (like Selenium) to mimic the manual process of purging notebooks in the UI.&lt;/LI&gt;
&lt;LI&gt;Ensure that Databricks' internal API logs or audit logs are checked for specific operation timings or errors related to purge attempts to diagnose why purging did not succeed.&lt;/LI&gt;
&lt;/UL&gt;
&lt;/DIV&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV class="paragraph"&gt;&lt;STRONG&gt;Documentation and Guidance&lt;/STRONG&gt;:&lt;BR /&gt;The official Databricks documentation provides steps for manual purging but does not yet describe any backend API methods for automation. For updates on this functionality, regularly refer to the relevant Databricks documentation &lt;A href="https://docs.databricks.com/gcp/en/admin/workspace-settings/storage" target="_blank"&gt;Purge workspace storage&lt;/A&gt;.&lt;/DIV&gt;
&lt;/LI&gt;
&lt;/OL&gt;
&lt;DIV class="paragraph"&gt;Recommendations: - &lt;STRONG&gt;Reach Out to Databricks Support&lt;/STRONG&gt;: Given the nature of these undocumented APIs, it is recommended to consult Databricks Support to understand their status and intended use. - &lt;STRONG&gt;Feature Request&lt;/STRONG&gt;: If automating this process is critical for your use case, consider engaging with your Databricks representative to raise an official feature request for exposing reliable, supported API endpoints for notebook revision purging.&lt;/DIV&gt;
&lt;DIV class="paragraph"&gt;&amp;nbsp;&lt;/DIV&gt;</description>
    <pubDate>Thu, 01 May 2025 16:01:26 GMT</pubDate>
    <dc:creator>Louis_Frolio</dc:creator>
    <dc:date>2025-05-01T16:01:26Z</dc:date>
    <item>
      <title>Automating Purging of All Notebook Revision</title>
      <link>https://community.databricks.com/t5/data-engineering/automating-purging-of-all-notebook-revision/m-p/116982#M45407</link>
      <description>&lt;P class=""&gt;Hi everyone,&lt;/P&gt;&lt;P class=""&gt;We work with sensitive data in Databricks, so it's crucial from both security and regulatory perspectives to purge all data saved in notebook revisions.&lt;/P&gt;&lt;P class=""&gt;Currently, there are two manual methods:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;&lt;P class=""&gt;Delete all history from each notebook individually.&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P class=""&gt;Permanently purge all revision history via &lt;STRONG&gt;Settings -&amp;gt; Advanced&lt;/STRONG&gt; for all notebooks.&lt;/P&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P class=""&gt;Is there any way to automate this process?&lt;/P&gt;&lt;P class=""&gt;I noticed that the API endpoints used for this are not documented:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;P class=""&gt;{workspace_url}/dataretention/purgehistorybefore/{purge_before_ms}&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P class=""&gt;{workspace_url}/notebook/{notebook_id}/history/clearall&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P class=""&gt;I've tested calling these endpoints; although I receive an HTTP 200 response, the history does not actually get purged.&lt;/P&gt;&lt;P class=""&gt;Has anyone managed to automate notebook revision purging successfully?&lt;BR /&gt;Any guidance would be greatly appreciated!&lt;/P&gt;</description>
      <pubDate>Tue, 29 Apr 2025 14:19:42 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/automating-purging-of-all-notebook-revision/m-p/116982#M45407</guid>
      <dc:creator>sergecom</dc:creator>
      <dc:date>2025-04-29T14:19:42Z</dc:date>
    </item>
    <item>
      <title>Re: Automating Purging of All Notebook Revision</title>
      <link>https://community.databricks.com/t5/data-engineering/automating-purging-of-all-notebook-revision/m-p/117413#M45492</link>
      <description>&lt;P&gt;Here are some things to consider:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV class="paragraph"&gt;Automating the purging of notebook revision history in Databricks is not currently a directly supported feature, and there are some challenges in achieving this:&lt;/DIV&gt;
&lt;OL start="1"&gt;
&lt;LI&gt;
&lt;DIV class="paragraph"&gt;&lt;STRONG&gt;Available Methods&lt;/STRONG&gt;:&lt;BR /&gt;Currently, Databricks provides manual options to purge notebook revision history:
&lt;UL&gt;
&lt;LI&gt;Deleting revision history for individual notebooks.&lt;/LI&gt;
&lt;LI&gt;Using the "Permanently purge all revision history" option accessible via &lt;STRONG&gt;Settings &amp;gt; Advanced&lt;/STRONG&gt;, allowing bulk purging for all notebooks.&lt;/LI&gt;
&lt;/UL&gt;
&lt;/DIV&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV class="paragraph"&gt;&lt;STRONG&gt;Testing Internal API Endpoints&lt;/STRONG&gt;:&lt;BR /&gt;The undocumented endpoints you mentioned:
&lt;UL&gt;
&lt;LI&gt;&lt;CODE&gt;{workspace_url}/dataretention/purgehistorybefore/{purge_before_ms}&lt;/CODE&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;CODE&gt;{workspace_url}/notebook/{notebook_id}/history/clearall&lt;/CODE&gt; While you have tested these endpoints and received HTTP 200 responses, the issue seems to be that the purging is not actually executed. This behavior could be due to the experimental or deprecated status of these endpoints, making them unreliable.&lt;/LI&gt;
&lt;/UL&gt;
&lt;/DIV&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV class="paragraph"&gt;&lt;STRONG&gt;Alternative Automation Strategies&lt;/STRONG&gt;:&lt;BR /&gt;Based on context from related tooling and approaches:
&lt;UL&gt;
&lt;LI&gt;To script bulk revision purging, programmatic access through Databricks APIs (where available) remains the best option. However, for undocumented endpoints or limited API support, you might consider using workarounds such as invoking browser automation tools (like Selenium) to mimic the manual process of purging notebooks in the UI.&lt;/LI&gt;
&lt;LI&gt;Ensure that Databricks' internal API logs or audit logs are checked for specific operation timings or errors related to purge attempts to diagnose why purging did not succeed.&lt;/LI&gt;
&lt;/UL&gt;
&lt;/DIV&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV class="paragraph"&gt;&lt;STRONG&gt;Documentation and Guidance&lt;/STRONG&gt;:&lt;BR /&gt;The official Databricks documentation provides steps for manual purging but does not yet describe any backend API methods for automation. For updates on this functionality, regularly refer to the relevant Databricks documentation &lt;A href="https://docs.databricks.com/gcp/en/admin/workspace-settings/storage" target="_blank"&gt;Purge workspace storage&lt;/A&gt;.&lt;/DIV&gt;
&lt;/LI&gt;
&lt;/OL&gt;
&lt;DIV class="paragraph"&gt;Recommendations: - &lt;STRONG&gt;Reach Out to Databricks Support&lt;/STRONG&gt;: Given the nature of these undocumented APIs, it is recommended to consult Databricks Support to understand their status and intended use. - &lt;STRONG&gt;Feature Request&lt;/STRONG&gt;: If automating this process is critical for your use case, consider engaging with your Databricks representative to raise an official feature request for exposing reliable, supported API endpoints for notebook revision purging.&lt;/DIV&gt;
&lt;DIV class="paragraph"&gt;&amp;nbsp;&lt;/DIV&gt;</description>
      <pubDate>Thu, 01 May 2025 16:01:26 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/automating-purging-of-all-notebook-revision/m-p/117413#M45492</guid>
      <dc:creator>Louis_Frolio</dc:creator>
      <dc:date>2025-05-01T16:01:26Z</dc:date>
    </item>
  </channel>
</rss>

