<?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: REST API vs. Notebookutils Lakehouse Update Issue in Data Engineering</title>
    <link>https://community.fabric.microsoft.com/t5/Data-Engineering/REST-API-vs-Notebookutils-Lakehouse-Update-Issue/m-p/4859751#M13115</link>
    <description>&lt;P&gt;I have been working on other aspects of the project, and will post back here when the solution is tested and confirmed, thanks.&lt;/P&gt;</description>
    <pubDate>Mon, 27 Oct 2025 16:14:02 GMT</pubDate>
    <dc:creator>stuckerj</dc:creator>
    <dc:date>2025-10-27T16:14:02Z</dc:date>
    <item>
      <title>REST API vs. Notebookutils Lakehouse Update Issue</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/REST-API-vs-Notebookutils-Lakehouse-Update-Issue/m-p/4850414#M12905</link>
      <description>&lt;DIV class=""&gt;&lt;H2&gt;REST API vs. Notebookutils Lakehouse Update Issue&lt;/H2&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;H3&gt;Problem Summary&lt;/H3&gt;&lt;/DIV&gt;&lt;P&gt;I am automating notebook provisioning in Microsoft Fabric and need to programmatically set or update the default Lakehouse for a notebook. I have tried both the REST API and the built-in Fabric Python SDK (notebookutils.notebook.updateDefinition). My findings:&lt;/P&gt;&lt;HR /&gt;&lt;DIV class=""&gt;&lt;H3&gt;1. REST API (/updateDefinition)&lt;/H3&gt;&lt;/DIV&gt;&lt;P&gt;&lt;STRONG&gt;Endpoint:&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;POST https://api.fabric.microsoft.com/v1/workspaces/{workspaceId}/notebooks/{notebookId}/updateDefinition&lt;/PRE&gt;&lt;P&gt;&lt;STRONG&gt;Payload Example:&lt;/STRONG&gt;&lt;/P&gt;&lt;DIV class=""&gt;&lt;PRE&gt;{
  &lt;SPAN class=""&gt;"name"&lt;/SPAN&gt;: &lt;SPAN class=""&gt;&lt;SPAN class=""&gt;"&lt;/SPAN&gt;Notebook 1&lt;SPAN class=""&gt;"&lt;/SPAN&gt;&lt;/SPAN&gt;,
  &lt;SPAN class=""&gt;"definition"&lt;/SPAN&gt;: {
    &lt;SPAN class=""&gt;"format"&lt;/SPAN&gt;: &lt;SPAN class=""&gt;&lt;SPAN class=""&gt;"&lt;/SPAN&gt;ipynb&lt;SPAN class=""&gt;"&lt;/SPAN&gt;&lt;/SPAN&gt;,
    &lt;SPAN class=""&gt;"parts"&lt;/SPAN&gt;: [
      {
        &lt;SPAN class=""&gt;"path"&lt;/SPAN&gt;: &lt;SPAN class=""&gt;&lt;SPAN class=""&gt;"&lt;/SPAN&gt;generate_data.ipynb&lt;SPAN class=""&gt;"&lt;/SPAN&gt;&lt;/SPAN&gt;,
        &lt;SPAN class=""&gt;"payload"&lt;/SPAN&gt;: &lt;SPAN class=""&gt;&lt;SPAN class=""&gt;"&lt;/SPAN&gt;&amp;lt;BASE64&amp;gt;&lt;SPAN class=""&gt;"&lt;/SPAN&gt;&lt;/SPAN&gt;,
        &lt;SPAN class=""&gt;"payloadType"&lt;/SPAN&gt;: &lt;SPAN class=""&gt;&lt;SPAN class=""&gt;"&lt;/SPAN&gt;InlineBase64&lt;SPAN class=""&gt;"&lt;/SPAN&gt;&lt;/SPAN&gt;
      }
    ]
  },
  &lt;SPAN class=""&gt;"defaultLakehouse"&lt;/SPAN&gt;: &lt;SPAN class=""&gt;&lt;SPAN class=""&gt;"&lt;/SPAN&gt;&amp;lt;lakehouse_id&amp;gt;&lt;SPAN class=""&gt;"&lt;/SPAN&gt;&lt;/SPAN&gt;
}&lt;/PRE&gt;&lt;/DIV&gt;&lt;UL&gt;&lt;LI&gt;I have tried all combinations of optional fields (defaultLakehouseWorkspace,&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;workspaceId).&lt;/LI&gt;&lt;LI&gt;The API always returns&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;202 Accepted, never completing with&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;200 OK&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;or&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;204 No Content, even after many retries (waiting several minutes).&lt;/LI&gt;&lt;LI&gt;The notebook appears in the workspace and&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;/notebooks&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;endpoints, but the lakehouse update never finalizes.&lt;/LI&gt;&lt;LI&gt;If I omit&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;definition, I get&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;400 InvalidInput: The Definition field is required.&lt;/LI&gt;&lt;/UL&gt;&lt;HR /&gt;&lt;DIV class=""&gt;&lt;H3&gt;2. Manual UI&lt;/H3&gt;&lt;/DIV&gt;&lt;UL&gt;&lt;LI&gt;Setting the default Lakehouse for a notebook via the Fabric web portal UI works instantly and as expected.&lt;/LI&gt;&lt;/UL&gt;&lt;HR /&gt;&lt;DIV class=""&gt;&lt;H3&gt;3. Python SDK (notebookutils.notebook.updateDefinition)&lt;/H3&gt;&lt;/DIV&gt;&lt;P&gt;&lt;STRONG&gt;Code Example (executed inside a Fabric notebook):&lt;/STRONG&gt;&lt;/P&gt;&lt;DIV class=""&gt;&lt;PRE&gt;(&lt;SPAN class=""&gt;notebookutils&lt;/SPAN&gt;
    .&lt;SPAN class=""&gt;notebook&lt;/SPAN&gt;
    .&lt;SPAN class=""&gt;updateDefinition&lt;/SPAN&gt;(
        &lt;SPAN class=""&gt;name&lt;/SPAN&gt; &lt;SPAN class=""&gt;=&lt;/SPAN&gt; &lt;SPAN class=""&gt;"Notebook 1"&lt;/SPAN&gt;,
        &lt;SPAN class=""&gt;defaultLakehouse&lt;/SPAN&gt; &lt;SPAN class=""&gt;=&lt;/SPAN&gt; &lt;SPAN class=""&gt;"&amp;lt;lakehouse_id&amp;gt;"&lt;/SPAN&gt;
        &lt;SPAN class=""&gt;# workspaceId and defaultLakehouseWorkspace seem optional in SDK&lt;/SPAN&gt;
    )
)&lt;/PRE&gt;&lt;/DIV&gt;&lt;UL&gt;&lt;LI&gt;When run inside&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Notebook 2&lt;/STRONG&gt;, I can successfully set the default Lakehouse for&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Notebook 1&lt;/STRONG&gt;.&lt;/LI&gt;&lt;LI&gt;The update takes about 1 minute to propagate, but does complete.&lt;/LI&gt;&lt;LI&gt;I cannot update the default Lakehouse for the currently running notebook (Notebook 2) from inside itself—only for other notebooks.&lt;/LI&gt;&lt;/UL&gt;&lt;HR /&gt;&lt;DIV class=""&gt;&lt;H3&gt;4. Additional Findings&lt;/H3&gt;&lt;/DIV&gt;&lt;UL&gt;&lt;LI&gt;The SDK appears to use internal service calls or context not exposed to REST API users.&lt;/LI&gt;&lt;LI&gt;The REST API requires a full notebook definition, even for a simple lakehouse update.&lt;/LI&gt;&lt;LI&gt;Even with the correct payload, the REST API gets stuck in an async state and never completes.&lt;/LI&gt;&lt;/UL&gt;&lt;HR /&gt;&lt;DIV class=""&gt;&lt;H3&gt;5. Request for Support&lt;/H3&gt;&lt;/DIV&gt;&lt;UL&gt;&lt;LI&gt;Is updating a Fabric notebook’s default Lakehouse&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;officially supported via REST API&lt;/STRONG&gt;?&lt;/LI&gt;&lt;LI&gt;Is there a workaround, or plans to improve this API feature?&lt;/LI&gt;&lt;LI&gt;Can you confirm if the difference is due to internal context/session, or a limitation/bug in the public API?&lt;/LI&gt;&lt;/UL&gt;</description>
      <pubDate>Wed, 15 Oct 2025 06:51:26 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/REST-API-vs-Notebookutils-Lakehouse-Update-Issue/m-p/4850414#M12905</guid>
      <dc:creator>stuckerj</dc:creator>
      <dc:date>2025-10-15T06:51:26Z</dc:date>
    </item>
    <item>
      <title>Re: REST API vs. Notebookutils Lakehouse Update Issue</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/REST-API-vs-Notebookutils-Lakehouse-Update-Issue/m-p/4851358#M12923</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/508353"&gt;@stuckerj&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Thank you for reaching out to Microsoft Fabric Community.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you for sharing the detailed analysis, yes there is a difference between the REST API and the notebookutils behavior.&lt;/P&gt;
&lt;P&gt;At present, updating a notebook’s default Lakehouse is not fully supported through the public REST API. When an .ipynb payload is sent, the API accepts it, returns 202 Accepted but never completes the async update, this is a known product limitation.&lt;/P&gt;
&lt;P&gt;The supported and working method is using notebookutils.notebook.updateDefinition from another notebook. It runs inside fabric with the correct context. If REST must be used then it requires a full .py notebook definition and still may not complete fully.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks and regards,&lt;/P&gt;
&lt;P&gt;Anjan Kumar Chippa&lt;/P&gt;</description>
      <pubDate>Thu, 16 Oct 2025 05:28:56 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/REST-API-vs-Notebookutils-Lakehouse-Update-Issue/m-p/4851358#M12923</guid>
      <dc:creator>v-achippa</dc:creator>
      <dc:date>2025-10-16T05:28:56Z</dc:date>
    </item>
    <item>
      <title>Re: REST API vs. Notebookutils Lakehouse Update Issue</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/REST-API-vs-Notebookutils-Lakehouse-Update-Issue/m-p/4851875#M12937</link>
      <description>&lt;P&gt;Thank you for confirming the limitation.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;As a workaround, I was thinking about creating another Notebook programmatically, for the purpose of setting data connections for other Notebooks in the pipeline.&amp;nbsp; It sounds like that's a solid option.&lt;/P&gt;</description>
      <pubDate>Thu, 16 Oct 2025 12:18:14 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/REST-API-vs-Notebookutils-Lakehouse-Update-Issue/m-p/4851875#M12937</guid>
      <dc:creator>stuckerj</dc:creator>
      <dc:date>2025-10-16T12:18:14Z</dc:date>
    </item>
    <item>
      <title>Re: REST API vs. Notebookutils Lakehouse Update Issue</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/REST-API-vs-Notebookutils-Lakehouse-Update-Issue/m-p/4854682#M12994</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/508353"&gt;@stuckerj&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Yes, that’s exactly the right approach. Creating a separate notebook to programmatically configure or update other notebooks is a solid and supported workaround.&amp;nbsp;It works because the command runs inside the fabric and has the right access to update lakehouse settings properly.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks and regards,&lt;/P&gt;
&lt;P&gt;Anjan Kumar Chippa&lt;/P&gt;</description>
      <pubDate>Tue, 21 Oct 2025 09:43:34 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/REST-API-vs-Notebookutils-Lakehouse-Update-Issue/m-p/4854682#M12994</guid>
      <dc:creator>v-achippa</dc:creator>
      <dc:date>2025-10-21T09:43:34Z</dc:date>
    </item>
    <item>
      <title>Re: REST API vs. Notebookutils Lakehouse Update Issue</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/REST-API-vs-Notebookutils-Lakehouse-Update-Issue/m-p/4858989#M13107</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/508353"&gt;@stuckerj&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;As we haven’t heard back from you, we wanted to kindly follow up to&amp;nbsp;check if the solution I have provided for the issue worked? Is your isue resolved? or let us know if you need any further assistance.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks and regards,&lt;/P&gt;
&lt;P&gt;Anjan Kumar Chippa&lt;/P&gt;</description>
      <pubDate>Mon, 27 Oct 2025 06:24:26 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/REST-API-vs-Notebookutils-Lakehouse-Update-Issue/m-p/4858989#M13107</guid>
      <dc:creator>v-achippa</dc:creator>
      <dc:date>2025-10-27T06:24:26Z</dc:date>
    </item>
    <item>
      <title>Re: REST API vs. Notebookutils Lakehouse Update Issue</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/REST-API-vs-Notebookutils-Lakehouse-Update-Issue/m-p/4859751#M13115</link>
      <description>&lt;P&gt;I have been working on other aspects of the project, and will post back here when the solution is tested and confirmed, thanks.&lt;/P&gt;</description>
      <pubDate>Mon, 27 Oct 2025 16:14:02 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/REST-API-vs-Notebookutils-Lakehouse-Update-Issue/m-p/4859751#M13115</guid>
      <dc:creator>stuckerj</dc:creator>
      <dc:date>2025-10-27T16:14:02Z</dc:date>
    </item>
    <item>
      <title>Re: REST API vs. Notebookutils Lakehouse Update Issue</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/REST-API-vs-Notebookutils-Lakehouse-Update-Issue/m-p/4864991#M13213</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/508353"&gt;@stuckerj&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;As we haven’t heard back from you, we wanted to kindly follow up to&amp;nbsp;check if you have got time to look into the solution? Is your issue resolved?&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks and regards,&lt;/P&gt;
&lt;P&gt;Anjan Kumar Chippa&lt;/P&gt;</description>
      <pubDate>Mon, 03 Nov 2025 12:00:56 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/REST-API-vs-Notebookutils-Lakehouse-Update-Issue/m-p/4864991#M13213</guid>
      <dc:creator>v-achippa</dc:creator>
      <dc:date>2025-11-03T12:00:56Z</dc:date>
    </item>
  </channel>
</rss>

