Azure / Azure/azure-rest-api-specs
[Synapse] Create/Update Notebook Doesn't Work
- Dominant language
- TypeSpec
- Stars
- 3.1k
- Forks
- 5.9k
- Avg merge
- 2d 22h
- Merged PRs (30d)
- 444
Description
Using the [Create of Update Notebook](https://docs.microsoft.com/en-us/rest/api/synapse/data-plane/notebook/createorupdatenotebook) API call returns a successful state of "Creating" or "Updating" but no notebooks are actually created.
Using the code from the [Notebooks_Create](https://docs.microsoft.com/en-us/rest/api/synapse/data-plane/notebook/createorupdatenotebook#notebooks_create) example:
First API Call:
```
$headers = @{'accept'='application/json';'Authorization'=$token}
$body = Get-Content -Path .\exampleNotebook.json
$uri = 'https://{workspaceName}.dev.azuresynapse.net/notebooks/exampleNotebook/?api-version=2019-06-01-preview'
Invoke-RestMethod -Method Put -Uri $uri -Body $body -Headers $headers
```
Returns:
```
id : /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Synapse/workspaces/{workspaceName}/notebooks/exampleNotebook
recordId : 262342
state : Creating
created : 2021-05-06 3:55:42 PM
changed : 2021-05-06 3:55:42 PM
type : Notebook
name : exampleNotebook
operationId : e53ab9da-e76d-4fe6-b391-fbc9c5121b89
artifactId : 41f59ca6-e682-4625-a4c9-edbd0b01e84f
```
Rerunning the same call again returns:
```
id : /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Synapse/workspaces/{workspaceName}/notebooks/exampleNotebook
recordId : 262342
state : Updating
created : 2021-05-06 3:55:42 PM
changed : 2021-05-06 4:01:24 PM
type : Notebook
name : exampleNotebook
operationId : 5ae69921-ac4e-4ff9-9cd5-0974f60dd0a3
artifactId : 41f59ca6-e682-4625-a4c9-edbd0b01e84f
```
Which would lead me to believe they completed successfully but no notebooks appear in the Azure Synapse workspace.
Running [Get-AzSynapseNotebook](https://docs.microsoft.com/en-us/powershell/module/az.synapse/get-azsynapsenotebook?view=azps-5.9.0) returns no results.
Running the [Get Notebook](https://docs.microsoft.com/en-us/rest/api/synapse/data-plane/notebook/getnotebook) or [Get Notebooks By Workspace](https://docs.microsoft.com/en-us/rest/api/synapse/data-plane/notebook/getnotebooksbyworkspace) also return no results.
Contributor guide
Research direction
Start by reproducing the Create or Update Notebook REST call with the documented Notebooks_Create example, then compare its response with Get Notebook, Get Notebooks By Workspace, and Get-AzSynapseNotebook. Done means the created notebook appears through the documented GET and PowerShell operations, but the issue does not identify a repository file or implementation change.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure, powershell
- Domain
- api, cloud
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100