Forum Discussion
REST API vs. Notebookutils Lakehouse Update Issue
- 10 months ago
Hi stuckerj,
Thank you for reaching out to Microsoft Fabric Community.
Thank you for sharing the detailed analysis, yes there is a difference between the REST API and the notebookutils behavior.
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.
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.
Thanks and regards,
Anjan Kumar Chippa
- 10 months ago
Hi stuckerj,
Yes, that’s exactly the right approach. Creating a separate notebook to programmatically configure or update other notebooks is a solid and supported workaround. It works because the command runs inside the fabric and has the right access to update lakehouse settings properly.
Thanks and regards,
Anjan Kumar Chippa
Hi stuckerj,
Thank you for reaching out to Microsoft Fabric Community.
Thank you for sharing the detailed analysis, yes there is a difference between the REST API and the notebookutils behavior.
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.
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.
Thanks and regards,
Anjan Kumar Chippa
- stuckerj10 months agoHelper I
Thank you for confirming the limitation.
As a workaround, I was thinking about creating another Notebook programmatically, for the purpose of setting data connections for other Notebooks in the pipeline. It sounds like that's a solid option.- v-achippa10 months agoCommunity Support
Hi stuckerj,
Yes, that’s exactly the right approach. Creating a separate notebook to programmatically configure or update other notebooks is a solid and supported workaround. It works because the command runs inside the fabric and has the right access to update lakehouse settings properly.
Thanks and regards,
Anjan Kumar Chippa