FabricTools v0.33.0 Public Preview

Get-FabricNotebookDefinition

Retrieves the definition of a notebook from a specific workspace in Microsoft Fabric.

Syntax

Get-FabricNotebookDefinition [-WorkspaceId] <guid> [[-NotebookId] <guid>]
 [[-NotebookFormat] <string>] [<CommonParameters>]

Description

This function fetches the notebook's content or metadata from a workspace. It supports retrieving notebook definitions in the Jupyter Notebook (ipynb) format. Handles both synchronous and asynchronous operations, with detailed logging and error handling.

Examples

Example 1

Retrieves the definition of the notebook with ID 67890 from the workspace with ID 12345 in the ipynb format.

Get-FabricNotebookDefinition -WorkspaceId "12345" -NotebookId "67890"

Example 2

Retrieves the definitions of all notebooks in the workspace with ID 12345 in the ipynb format.

Get-FabricNotebookDefinition -WorkspaceId "12345"

Parameters

NameTypeReq.Pos.PipelineDescription
-WorkspaceId guid ✓Required 0 –

(Mandatory) The unique identifier of the workspace from which the notebook definition is to be retrieved.

-NotebookFormat string 2 –

Specifies the format of the notebook definition. Currently, only 'ipynb' is supported. Default: 'ipynb'.

Default: ipynb
-NotebookId guid 1 –

(Optional)The unique identifier of the notebook whose definition needs to be retrieved.

This cmdlet also supports the common parameters, such as -Verbose and -ErrorAction. See about_CommonParameters.

Notes

  • Requires $FabricConfig global configuration, including BaseUrl and FabricHeaders.
  • Calls Confirm-TokenState to ensure token validity before making the API request.
  • Handles long-running operations asynchronously.

Author: Tiago Balabuch, Kamil Nowinski