Skip to content

notebook

Manage notebooks

Authentication scope: fabric

List notebooks in a workspace

Terminal window
fabio notebook list --workspace <value>
Flag Type Required Description
--workspace string Yes Workspace ID

Output fields: id, displayName, description

Read-only · Returns list

Show details of a notebook

Terminal window
fabio notebook show --workspace <value> --id <value>
Flag Type Required Description
--workspace string Yes Workspace ID
--id string Yes Notebook ID

Output fields: id, displayName, description

Read-only · Returns object

Create a new notebook

Terminal window
fabio notebook create --workspace <value> --name <value>
Flag Type Required Description
--workspace string Yes Workspace ID
--name string Yes Notebook display name
--content string No Notebook content (Python/PySpark code inline)
--file string No Path to .py or .ipynb file (auto-detected: .py is wrapped into ipynb; .ipynb is sent directly)
--lakehouse string No Default lakehouse ID (binds the notebook so relative paths like Files/ and Tables/ work)
--sensitivity-label string No Sensitivity label ID to apply on creation

Examples

Terminal window
fabio notebook create --workspace $WS --name "ETL-Pipeline" --lakehouse $LH --source etl_notebook.py

Output fields: id, displayName

Mutates state · Returns object

Update notebook properties (name and/or description)

Terminal window
fabio notebook update --workspace <value> --id <value>
Flag Type Required Description
--workspace string Yes Workspace ID
--id string Yes Notebook ID
--name string No New display name
--description string No New description

Mutates state · Returns object

Get the definition (source code) of a notebook

Terminal window
fabio notebook get-definition --workspace <value> --id <value>
Flag Type Required Description
--workspace string Yes Workspace ID
--id string Yes Notebook ID
--strip-output bool No Strip cell outputs and execution counts (useful for version control)
--decode bool No Decode base64 payloads inline (adds decodedPayload field)

Examples

Terminal window
fabio notebook get-definition --workspace $WS --id $NB --strip-output

Read-only · Returns object

Update the definition (source code) of a notebook

Terminal window
fabio notebook update-definition --workspace <value> --id <value>
Flag Type Required Description
--workspace string Yes Workspace ID
--id string Yes Notebook ID
--content string No Python/PySpark code content (replaces entire notebook)
--file string No Path to .ipynb or .py file

Examples

Terminal window
fabio notebook update-definition --workspace $WS --id $NB --source updated_etl.py

Mutates state · Long-running operation · Returns void

Delete a notebook

Terminal window
fabio notebook delete --workspace <value> --id <value>
Flag Type Required Description
--workspace string Yes Workspace ID
--id string Yes Notebook ID
--hard-delete bool No Permanently delete (cannot be recovered)

Mutates state · Destructive · Returns void

Run a notebook

Terminal window
fabio notebook run --workspace <value> --id <value>
Flag Type Required Description
--workspace string Yes Workspace ID
--id string Yes Notebook ID
--parameters string No Notebook parameters as JSON array (e.g., ‘[{“name”:“p1”,“value”:“v1”,“type”:“Text”}]’)
--compute-type string No Compute type: Spark (default), Jupyter, or DataWarehouse
--execution-data string No Full execution data as JSON (advanced; overrides –compute-type). Supports @file.json or @- for stdin
--wait bool No Wait for the notebook run to complete (polls until finished)
--timeout integer No Maximum time to wait in seconds (default: 600) Default: 600.
--cancel-on-timeout bool No Cancel the notebook run if timeout is reached

Examples

Terminal window
fabio notebook run --workspace $WS --id $NB --wait
Terminal window
fabio notebook run --workspace $WS --id $NB --wait --parameters '[{"name":"start_date","value":"2024-01-01","type":"Text"}]'
Terminal window
fabio notebook run --workspace $WS --id $NB --wait --timeout 1800

Mutates state · Long-running operation · Returns object

Check the status of a notebook run

Terminal window
fabio notebook status --workspace <value> --id <value> --job-id <value>
Flag Type Required Description
--workspace string Yes Workspace ID
--id string Yes Notebook ID
--job-id string Yes Job instance ID

Examples

Terminal window
fabio notebook status --workspace $WS --id $NB

Read-only · Returns object

Get details of a specific job instance

Terminal window
fabio notebook get-job-instance --workspace <value> --id <value> --job-instance-id <value>
Flag Type Required Description
--workspace string Yes Workspace ID
--id string Yes Notebook ID
--job-instance-id string Yes Job instance ID

Read-only · Returns object

Stop a running notebook

Terminal window
fabio notebook stop --workspace <value> --id <value> --job-id <value>
Flag Type Required Description
--workspace string Yes Workspace ID
--id string Yes Notebook ID
--job-id string Yes Job instance ID

Examples

Terminal window
fabio notebook stop --workspace $WS --id $NB

Mutates state · Returns void

List Livy sessions for a notebook

Terminal window
fabio notebook list-livy-sessions --workspace <value> --id <value>
Flag Type Required Description
--workspace string Yes Workspace ID
--id string Yes Notebook ID

Read-only · Returns list

Get details of a Livy session

Terminal window
fabio notebook get-livy-session --workspace <value> --id <value> --livy-id <value>
Flag Type Required Description
--workspace string Yes Workspace ID
--id string Yes Notebook ID
--livy-id string Yes Livy session ID

Read-only · Returns object