<?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 to set default lakehouse of notebook in Data Engineering</title>
    <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Rest-Api-to-set-default-lakehouse-of-notebook/m-p/4679958#M9063</link>
    <description>&lt;P&gt;&lt;SPAN data-teams="true"&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/811633"&gt;@wbeke&lt;/a&gt;&amp;nbsp;, Please let us know if your issue is solved. If it is, consider marking the answer that helped&amp;nbsp;&lt;STRONG&gt;'Accept as Solution'&lt;/STRONG&gt;, so others with similar queries can find it easily. If not, please share the details.&lt;BR /&gt;Thank you.&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 05 May 2025 10:20:15 GMT</pubDate>
    <dc:creator>v-hashadapu</dc:creator>
    <dc:date>2025-05-05T10:20:15Z</dc:date>
    <item>
      <title>Rest Api to set default lakehouse of notebook</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Rest-Api-to-set-default-lakehouse-of-notebook/m-p/4665420#M8796</link>
      <description>&lt;P&gt;Is there a way to update by powershell &amp;amp; Rest Api the default lakehouse of a notebook?&lt;BR /&gt;&lt;BR /&gt;I tried to update it by&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;workspaces/&lt;/SPAN&gt;&lt;SPAN&gt;$workspaceId&lt;/SPAN&gt;&lt;SPAN&gt;/notebooks/&lt;/SPAN&gt;&lt;SPAN&gt;$notebookId&lt;/SPAN&gt;&lt;SPAN&gt;/updateDefinition?updateMetadata=True"&lt;BR /&gt;&lt;/SPAN&gt;and then the payload :&lt;BR /&gt;&lt;BR /&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;LI-CODE lang="markup"&gt;    $payload = @{
        kernel_info = @{
            name = "synapse_pyspark"
        }
        dependencies = @{
            lakehouse = @{
                default_lakehouse = $lakehouseId
                default_lakehouse_name = $lakehouseName
                default_lakehouse_workspace_id = $workspaceId
            }
        }
    } | ConvertTo-Json -Depth 10
    
      # convert this payload to base64
    $payloadBase64 = [Convert]::ToBase64String([System.Text.Encoding]::UTF8.GetBytes($payload))​&lt;/LI-CODE&gt;&lt;P&gt;and&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;    # Construct the request body
    $body = @{
        definition = @{
            parts = @(
                        @{
                            path = ".platform"
                            payload= $payloadBase64
                            payloadType= "InlineBase64"
                        }
                    )
            } 
    } | ConvertTo-Json -Depth 10&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;but that gives me the error:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;{
  "requestId": "a4057ddd-bc63-4b2c-a620-5a22ceb206b8",
  "errorCode": "InvalidDefinitionParts",
  "moreDetails": [
    {
      "errorCode": "InvalidPlatformFile",
      "message": "Invalid platform file"
    }
  ],
  "message": "One or more definition parts missing or invalid"
}​&lt;/LI-CODE&gt;&lt;P&gt;I do not see what I am doing wrong&lt;BR /&gt;&lt;BR /&gt;Somebidy have some experience?&lt;BR /&gt;&lt;BR /&gt;thanks&lt;BR /&gt;&lt;BR /&gt;Wijnand&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 23 Apr 2025 17:14:05 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/Rest-Api-to-set-default-lakehouse-of-notebook/m-p/4665420#M8796</guid>
      <dc:creator>wbeke</dc:creator>
      <dc:date>2025-04-23T17:14:05Z</dc:date>
    </item>
    <item>
      <title>Re: Rest Api to set default lakehouse of notebook</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Rest-Api-to-set-default-lakehouse-of-notebook/m-p/4665539#M8798</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/811633"&gt;@wbeke&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;to me it looks like&amp;nbsp;Your `.platform` part is invalid because you’re only sending the lakehouse block (and a kernel_info block) – you’re not sending a complete, valid `.platform` file. The service expects the full platform JSON (including `schema`, `name`, `metadata` wrappers, existing dependencies, language, etc.), and when you omit everything else it rejects it as “Invalid platform file.”&lt;BR /&gt;In addition, the `updateDefinition` call always requires you to re‑submit all of the notebook’s parts (both the `.platform` part and the main notebook content). You can’t do an “incremental” patch of just the lakehouse settings.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 23 Apr 2025 19:26:40 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/Rest-Api-to-set-default-lakehouse-of-notebook/m-p/4665539#M8798</guid>
      <dc:creator>nilendraFabric</dc:creator>
      <dc:date>2025-04-23T19:26:40Z</dc:date>
    </item>
    <item>
      <title>Re: Rest Api to set default lakehouse of notebook</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Rest-Api-to-set-default-lakehouse-of-notebook/m-p/4666813#M8833</link>
      <description>&lt;P&gt;Thnaks forthe reposnse,&lt;BR /&gt;&lt;BR /&gt;So what is stated here (&lt;A href="https://learn.microsoft.com/en-us/rest/api/fabric/notebook/items/update-notebook-definition?tabs=HTTP" target="_blank"&gt;Items - Update Notebook Definition - REST API (Notebook) | Microsoft Learn&lt;/A&gt;) as body:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;{
  "definition": {
    "parts": [
      {
        "path": "notebook-content.py",
        "payload": "IyBGYWJyaWMgbm90ZWJv...",
        "payloadType": "InlineBase64"
      },
      {
        "path": ".platform",
        "payload": "ZG90UGxhdGZvcm1CYXNlNjRTdHJpbmc=",
        "payloadType": "InlineBase64"
      }
    ]
  }
}&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;is not correct?&lt;BR /&gt;&lt;BR /&gt;I test this exact code , indeed it failed. But what is the exact definition of the body?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 24 Apr 2025 13:02:33 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/Rest-Api-to-set-default-lakehouse-of-notebook/m-p/4666813#M8833</guid>
      <dc:creator>wbeke</dc:creator>
      <dc:date>2025-04-24T13:02:33Z</dc:date>
    </item>
    <item>
      <title>Re: Rest Api to set default lakehouse of notebook</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Rest-Api-to-set-default-lakehouse-of-notebook/m-p/4668543#M8854</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/913195"&gt;@nilendraFabric&lt;/a&gt;&amp;nbsp;,&lt;BR /&gt;&lt;BR /&gt;I was abel to get the definition of the notebook. So by sending it as is back to the rest api endpoint I thought I would not get any errors. But I did:&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;What I send:&lt;BR /&gt;&lt;SPAN&gt;&lt;A href="https://api.fabric.microsoft.com/v1/" target="_blank"&gt;https://api.fabric.microsoft.com/v1/&lt;/A&gt;&lt;/SPAN&gt;&lt;SPAN&gt;workspaces/&lt;/SPAN&gt;&lt;SPAN&gt;$workspaceId&lt;/SPAN&gt;&lt;SPAN&gt;/notebooks/&lt;/SPAN&gt;&lt;SPAN&gt;$notebookId&lt;/SPAN&gt;&lt;SPAN&gt;/updateDefinition?updateMetadata=True&lt;BR /&gt;&lt;BR /&gt;Body&amp;nbsp;:&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;{
    "displayName": "nb_correct",
    "description": "fabric rest api 101",
    "type": "Notebook",
    "definition": {
        "parts": [
            {
                "path": "notebook-content.ipynb",
                "payload": "eyJjZWxscyI6W3siY2VsbF90eXBlIjoiY29kZSIsInNvdXJjZSI6W10sIm91dHB1dHMiOltdLCJleGVjdXRpb25fY291bnQiOm51bGwsIm1ldGFkYXRhIjp7Im1pY3Jvc29mdCI6eyJsYW5ndWFnZSI6InB5dGhvbiIsImxhbmd1YWdlX2dyb3VwIjoic3luYXBzZV9weXNwYXJrIn0sImNlbGxTdGF0dXMiOiJ7XCJXaWpuYW5kIEJla2VcIjp7XCJzZXNzaW9uX3N0YXJ0X3RpbWVcIjpudWxsLFwiZXhlY3V0aW9uX3N0YXJ0X3RpbWVcIjpcIjIwMjUtMDQtMjRUMTM6NDc6NTIuODk2MzUyMVpcIixcImV4ZWN1dGlvbl9maW5pc2hfdGltZVwiOlwiMjAyNS0wNC0yNFQxMzo0Nzo1My4yMjkzMjEzWlwiLFwic3RhdGVcIjpcImZpbmlzaGVkXCIsXCJsaXZ5X3N0YXRlbWVudF9zdGF0ZVwiOlwiYXZhaWxhYmxlXCIsXCJub3JtYWxpemVkX3N0YXRlXCI6XCJmaW5pc2hlZFwifX0iLCJlZGl0YWJsZSI6dHJ1ZSwicnVuX2NvbnRyb2wiOnsiZnJvemVuIjpmYWxzZX19LCJpZCI6Ijg1MDZhNDBjLTVkNGEtNDFlNy04YTE4LTVhYzE2NjRiZGI1MCJ9XSwibWV0YWRhdGEiOnsibGFuZ3VhZ2VfaW5mbyI6eyJuYW1lIjoicHl0aG9uIn0sImtlcm5lbHNwZWMiOnsibmFtZSI6InN5bmFwc2VfcHlzcGFyayIsImxhbmd1YWdlIjoiUHl0aG9uIiwiZGlzcGxheV9uYW1lIjoiU3luYXBzZSBQeVNwYXJrIn0sImtlcm5lbF9pbmZvIjp7Im5hbWUiOiJzeW5hcHNlX3B5c3BhcmsifSwibWljcm9zb2Z0Ijp7Imxhbmd1YWdlIjoicHl0aG9uIiwibGFuZ3VhZ2VfZ3JvdXAiOiJzeW5hcHNlX3B5c3BhcmsiLCJtc19zcGVsbF9jaGVjayI6eyJtc19zcGVsbF9jaGVja19sYW5ndWFnZSI6ImVuIn19LCJudGVyYWN0Ijp7InZlcnNpb24iOiJudGVyYWN0LWZyb250LWVuZEAxLjAuMCJ9LCJzcGFya19jb21wdXRlIjp7ImNvbXB1dGVfaWQiOiIvdHJpZGVudC9kZWZhdWx0Iiwic2Vzc2lvbl9vcHRpb25zIjp7ImNvbmYiOnsic3Bhcmsuc3luYXBzZS5uYnMuc2Vzc2lvbi50aW1lb3V0IjoiMTIwMDAwMCJ9fX0sImRlcGVuZGVuY2llcyI6eyJsYWtlaG91c2UiOnt9LCJlbnZpcm9ubWVudCI6e319fSwibmJmb3JtYXQiOjQsIm5iZm9ybWF0X21pbm9yIjo1fQ==",
                "payloadType": "InlineBase64"
            },
            {
                "path": ".platform",
                "payload": "ewogICIkc2NoZW1hIjogImh0dHBzOi8vZGV2ZWxvcGVyLm1pY3Jvc29mdC5jb20vanNvbi1zY2hlbWFzL2ZhYnJpYy9naXRJbnRlZ3JhdGlvbi9wbGF0Zm9ybVByb3BlcnRpZXMvMi4wLjAvc2NoZW1hLmpzb24iLAogICJtZXRhZGF0YSI6IHsKICAgICJ0eXBlIjogIk5vdGVib29rIiwKICAgICJkaXNwbGF5TmFtZSI6ICJuYl9jb3JyZWN0IiwKICAgICJkZXNjcmlwdGlvbiI6ICJOZXcgbm90ZWJvb2siCiAgfSwKICAiY29uZmlnIjogewogICAgInZlcnNpb24iOiAiMi4wIiwKICAgICJsb2dpY2FsSWQiOiAiMDAwMDAwMDAtMDAwMC0wMDAwLTAwMDAtMDAwMDAwMDAwMDAwIgogIH0KfQ==",
                "payloadType": "InlineBase64"
            }
        ]
    },
    "updateRequest": true
}&lt;/LI-CODE&gt;&lt;P&gt;&lt;SPAN&gt;You can read this because it is an emty notebook :-). So nothing to hide.&lt;BR /&gt;&lt;BR /&gt;But the response is:&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;{
	"requestId": "116abff9-c72c-48c9-8c39-c7123559cdd8",
	"errorCode": "InvalidInput",
	"moreDetails": [
		{
			"errorCode": "InvalidParameter",
			"message": "'updateRequest' is a required parameter"
		}
	],
	"message": "The request has an invalid input"
}&lt;/LI-CODE&gt;&lt;P&gt;&lt;SPAN&gt;What am I doing wrong?&lt;BR /&gt;Thanks&lt;BR /&gt;Wijnand&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 25 Apr 2025 14:24:08 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/Rest-Api-to-set-default-lakehouse-of-notebook/m-p/4668543#M8854</guid>
      <dc:creator>wbeke</dc:creator>
      <dc:date>2025-04-25T14:24:08Z</dc:date>
    </item>
    <item>
      <title>Re: Rest Api to set default lakehouse of notebook</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Rest-Api-to-set-default-lakehouse-of-notebook/m-p/4672237#M8918</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/811633"&gt;@wbeke&lt;/a&gt;&amp;nbsp;, Thank you for reaching out to the Microsoft Community Forum.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The error you're encountering is due to the submission of an incomplete platform file. The API requires a fully defined platform configuration, which must include essential fields such as schema, name, metadata and dependencies, particularly the details related to your Lakehouse.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To avoid overwriting any existing configurations, you should first retrieve the current notebook definition. This includes both the notebook content and the platform file. You can do this by making a GET request to the API. Once you have the existing platform file, locate the dependencies.lakehouse section and update it with your new Lakehouse information. Be sure that all other required fields are still present in the file. After you've updated the platform file, you’ll need to Base64 encode both the notebook content and the platform file. Then, include these encoded components in the request body of a POST request to update the notebook.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Finally, ensure your account has the necessary permissions in Microsoft Fabric and that you're using a valid Microsoft Entra ID token to authenticate your API requests.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If this helped solve the issue, please consider marking it&amp;nbsp;'Accept as Solution' so others with similar queries may find it more easily. If not, please share the details, always happy to help.&lt;BR /&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Apr 2025 06:32:37 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/Rest-Api-to-set-default-lakehouse-of-notebook/m-p/4672237#M8918</guid>
      <dc:creator>v-hashadapu</dc:creator>
      <dc:date>2025-04-29T06:32:37Z</dc:date>
    </item>
    <item>
      <title>Re: Rest Api to set default lakehouse of notebook</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Rest-Api-to-set-default-lakehouse-of-notebook/m-p/4673563#M8944</link>
      <description>&lt;P&gt;try this too:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The API expects `updateMetadata=True` as a query parameter (in the URL), not as a body field. Remove `"updateRequest": true` from your JSON.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;The `displayName`, `description`, and `type` fields belong to the item’s metadata, not the `updateDefinition` API. This endpoint only accepts a `definition` object.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Apr 2025 22:36:07 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/Rest-Api-to-set-default-lakehouse-of-notebook/m-p/4673563#M8944</guid>
      <dc:creator>nilendraFabric</dc:creator>
      <dc:date>2025-04-29T22:36:07Z</dc:date>
    </item>
    <item>
      <title>Re: Rest Api to set default lakehouse of notebook</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Rest-Api-to-set-default-lakehouse-of-notebook/m-p/4679958#M9063</link>
      <description>&lt;P&gt;&lt;SPAN data-teams="true"&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/811633"&gt;@wbeke&lt;/a&gt;&amp;nbsp;, Please let us know if your issue is solved. If it is, consider marking the answer that helped&amp;nbsp;&lt;STRONG&gt;'Accept as Solution'&lt;/STRONG&gt;, so others with similar queries can find it easily. If not, please share the details.&lt;BR /&gt;Thank you.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 05 May 2025 10:20:15 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/Rest-Api-to-set-default-lakehouse-of-notebook/m-p/4679958#M9063</guid>
      <dc:creator>v-hashadapu</dc:creator>
      <dc:date>2025-05-05T10:20:15Z</dc:date>
    </item>
    <item>
      <title>Re: Rest Api to set default lakehouse of notebook</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Rest-Api-to-set-default-lakehouse-of-notebook/m-p/4682219#M9110</link>
      <description>&lt;P&gt;Sorry, still no luck.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;url is now without the updateMetadat=True, because I do not want to update the patform.&lt;BR /&gt;&lt;BR /&gt;the body is:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;{
	"definition": {
		"parts": [
			{
				"payloadType": "InlineBase64",
				"path": "notebook-content.ipynb",
				"payload": "ew0KICAgICJjZWxscyI6ICBbDQogICAgICAgICAgICAgICAgICB7DQogICAgICAgICAgICAgICAgICAgICAgImNlbGxfdHlwZSI6ICAiY29kZSIsDQogICAgICAgICAgICAgICAgICAgICAgInNvdXJjZSI6ICBbDQoNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF0sDQogICAgICAgICAgICAgICAgICAgICAgIm91dHB1dHMiOiAgWw0KDQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXSwNCiAgICAgICAgICAgICAgICAgICAgICAiZXhlY3V0aW9uX2NvdW50IjogIG51bGwsDQogICAgICAgICAgICAgICAgICAgICAgIm1ldGFkYXRhIjogIHsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICJtaWNyb3NvZnQiOiAgew0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgImxhbmd1YWdlIjogICJweXRob24iLA0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgImxhbmd1YWdlX2dyb3VwIjogICJzeW5hcHNlX3B5c3BhcmsiDQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sDQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAiY2VsbFN0YXR1cyI6ICAie1wiV2lqbmFuZCBCZWtlXCI6e1wic2Vzc2lvbl9zdGFydF90aW1lXCI6bnVsbCxcImV4ZWN1dGlvbl9zdGFydF90aW1lXCI6XCIyMDI1LTA0LTI0VDEzOjQ3OjUyLjg5NjM1MjFaXCIsXCJleGVjdXRpb25fZmluaXNoX3RpbWVcIjpcIjIwMjUtMDQtMjRUMTM6NDc6NTMuMjI5MzIxM1pcIixcInN0YXRlXCI6XCJmaW5pc2hlZFwiLFwibGl2eV9zdGF0ZW1lbnRfc3RhdGVcIjpcImF2YWlsYWJsZVwiLFwibm9ybWFsaXplZF9zdGF0ZVwiOlwiZmluaXNoZWRcIn19IiwNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICJlZGl0YWJsZSI6ICB0cnVlLA0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgInJ1bl9jb250cm9sIjogIHsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgImZyb3plbiI6ICBmYWxzZQ0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0NCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSwNCiAgICAgICAgICAgICAgICAgICAgICAiaWQiOiAgIjg1MDZhNDBjLTVkNGEtNDFlNy04YTE4LTVhYzE2NjRiZGI1MCINCiAgICAgICAgICAgICAgICAgIH0NCiAgICAgICAgICAgICAgXSwNCiAgICAibWV0YWRhdGEiOiAgew0KICAgICAgICAgICAgICAgICAgICAgImxhbmd1YWdlX2luZm8iOiAgew0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICJuYW1lIjogICJweXRob24iDQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LA0KICAgICAgICAgICAgICAgICAgICAgImtlcm5lbHNwZWMiOiAgew0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICJuYW1lIjogICJzeW5hcHNlX3B5c3BhcmsiLA0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICJsYW5ndWFnZSI6ICAiUHl0aG9uIiwNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAiZGlzcGxheV9uYW1lIjogICJTeW5hcHNlIFB5U3BhcmsiDQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LA0KICAgICAgICAgICAgICAgICAgICAgImtlcm5lbF9pbmZvIjogIHsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIm5hbWUiOiAgInN5bmFwc2VfcHlzcGFyayINCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LA0KICAgICAgICAgICAgICAgICAgICAgIm1pY3Jvc29mdCI6ICB7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAibGFuZ3VhZ2UiOiAgInB5dGhvbiIsDQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAibGFuZ3VhZ2VfZ3JvdXAiOiAgInN5bmFwc2VfcHlzcGFyayIsDQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAibXNfc3BlbGxfY2hlY2siOiAgew0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAibXNfc3BlbGxfY2hlY2tfbGFuZ3VhZ2UiOiAgImVuIg0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0NCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSwNCiAgICAgICAgICAgICAgICAgICAgICJudGVyYWN0IjogIHsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAidmVyc2lvbiI6ICAibnRlcmFjdC1mcm9udC1lbmRAMS4wLjAiDQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LA0KICAgICAgICAgICAgICAgICAgICAgInNwYXJrX2NvbXB1dGUiOiAgew0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICJjb21wdXRlX2lkIjogICIvdHJpZGVudC9kZWZhdWx0IiwNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAic2Vzc2lvbl9vcHRpb25zIjogIHsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAiY29uZiI6ICB7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICJzcGFyay5zeW5hcHNlLm5icy5zZXNzaW9uLnRpbWVvdXQiOiAgIjEyMDAwMDAiDQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQ0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQ0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSwNCiAgICAgICAgICAgICAgICAgICAgICJkZXBlbmRlbmNpZXMiOiAgew0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgImxha2Vob3VzZSI6ICB7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAiZGVmYXVsdF9sYWtlaG91c2VfbmFtZSI6ICAibGhfZF90ZXN0X2Zvcl9yZXN0X2FwaSIsDQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAiZGVmYXVsdF9sYWtlaG91c2UiOiAgIjEyNTBmMDFhLTc3ZDctNDhkOS1hODI0LTlkZjQ2ODFmZDdmYSIsDQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAiZGVmYXVsdF9sYWtlaG91c2Vfd29ya3NwYWNlX2lkIjogICI5YWMyZWFkMS0wNzFhLTRiNjEtYWQ0NC02MWYwOTA1NWI0MGYiDQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sDQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAiZW52aXJvbm1lbnQiOiAgew0KDQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQ0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9DQogICAgICAgICAgICAgICAgIH0sDQogICAgIm5iZm9ybWF0IjogIDQsDQogICAgIm5iZm9ybWF0X21pbm9yIjogIDUNCn0="
			}
		]
	}
}&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;This is a long LRO call so check the reposnse of the rest api call (seems to be ok)&lt;/P&gt;&lt;LI-CODE lang="markup"&gt; {
    "Headers":  {
                    "Pragma":  "no-cache",
                    "Transfer-Encoding":  "chunked",
                    "Retry-After":  "20",
                    "x-ms-operation-id":  "1a351fe7-bad7-496d-9abe-d3d1c57896d6",
                    "Strict-Transport-Security":  "max-age=31536000; includeSubDomains",
                    "X-Frame-Options":  "deny",
                    "X-Content-Type-Options":  "nosniff",
                    "RequestId":  "6274790f-d7e6-4c75-ae03-7a1bb1c92fd2",
                    "Access-Control-Expose-Headers":  "RequestId,Location,Retry-After,x-ms-operation-id",
                    "request-redirected":  "true",
                    "home-cluster-uri":  "https://wabi-north-europe-f-primary-redirect.analysis.windows.net/",
                    "Cache-Control":  "no-store, must-revalidate, no-cache",
                    "Content-Type":  "application/json; charset=utf-8",
                    "Date":  "Tue, 06 May 2025 16:08:10 GMT",
                    "Location":  "https://wabi-north-europe-f-primary-redirect.analysis.windows.net/v1/operations/1a351fe7-bad7-496d-9abe-d3d1c57896d6"
                }
}&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;But then checking the location (added with /result) I do get an error:&lt;BR /&gt;&lt;BR /&gt;Location: &lt;A href="https://wabi-north-europe-f-primary-redirect.analysis.windows.net/v1/operations/1a351fe7-bad7-496d-9abe-d3d1c57896d6/result" target="_blank"&gt;https://wabi-north-europe-f-primary-redirect.analysis.windows.net/v1/operations/1a351fe7-bad7-496d-9abe-d3d1c57896d6/result&lt;/A&gt;&lt;BR /&gt;Retrying after 20 seconds...&lt;BR /&gt;Invoke-WebRequest : The remote server returned an error: (400) Bad Request.&lt;BR /&gt;At C:\Temp\Fabric CLI private preview\mytests\fabric.ps1:478 char:21&lt;BR /&gt;+ ... $response = Invoke-WebRequest $url -Headers $fabricHeaders -Method Ge ...&lt;BR /&gt;+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~&lt;BR /&gt;+ CategoryInfo : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-WebRequest], WebException&lt;BR /&gt;+ FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeWebRequestCommand&lt;BR /&gt;&lt;BR /&gt;The default lakehouse is not updated&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Maybe you see something I miss&lt;BR /&gt;&lt;BR /&gt;Wijnand&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 06 May 2025 16:13:57 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/Rest-Api-to-set-default-lakehouse-of-notebook/m-p/4682219#M9110</guid>
      <dc:creator>wbeke</dc:creator>
      <dc:date>2025-05-06T16:13:57Z</dc:date>
    </item>
    <item>
      <title>Re: Rest Api to set default lakehouse of notebook</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Rest-Api-to-set-default-lakehouse-of-notebook/m-p/4686256#M9173</link>
      <description>&lt;P&gt;hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/811633"&gt;@wbeke&lt;/a&gt;&amp;nbsp;, May i know if you have had the chance to try my suggestions. If you did, can you please share the results. Thank you.&lt;/P&gt;</description>
      <pubDate>Fri, 09 May 2025 09:02:10 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/Rest-Api-to-set-default-lakehouse-of-notebook/m-p/4686256#M9173</guid>
      <dc:creator>v-hashadapu</dc:creator>
      <dc:date>2025-05-09T09:02:10Z</dc:date>
    </item>
    <item>
      <title>Re: Rest Api to set default lakehouse of notebook</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Rest-Api-to-set-default-lakehouse-of-notebook/m-p/4686268#M9174</link>
      <description>&lt;P&gt;I found the solution myself.&lt;BR /&gt;The problem was that the payload of the update request requires a .py file and not an ipynb file format.&lt;BR /&gt;So by contructing an .py file like :&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;# Fabric notebook source

# METADATA ********************

# META {
# META   "kernel_info": {
# META     "name": "synapse_pyspark"
# META   },
# META   "dependencies": {
# META     "lakehouse": {
# META       "default_lakehouse": "14ba2f96-9077-4ea9-895a-73d6d9251ca1",
# META       "default_lakehouse_name": "lh_silver_colorpremium",
# META       "default_lakehouse_workspace_id": "baa1eb69-b324-433e-aa10-4bbf988965a8"
# META     }
# META   }
# META }

# MARKDOWN ********************

# ### Import Utilities

# CELL ********************

%run nb-notebook-utilities

# METADATA ********************

# META {
# META   "language": "python",
# META   "language_group": "synapse_pyspark"
# META }&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;It works.&lt;BR /&gt;&lt;BR /&gt;Thank you all for the support! Solved&lt;BR /&gt;Wijnand&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 09 May 2025 09:06:52 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/Rest-Api-to-set-default-lakehouse-of-notebook/m-p/4686268#M9174</guid>
      <dc:creator>wbeke</dc:creator>
      <dc:date>2025-05-09T09:06:52Z</dc:date>
    </item>
  </channel>
</rss>

