JupyterLab URLs
JupyterLab provides a way for users to copy URLs that open a specific notebook or file. Additionally, JupyterLab URLs are an advanced part of the user interface that allows for managing workspaces. These two functions – file paths and workspaces – can be combined in URLs that open a specific file in a specific workspace.
In order to use these URLs you will need to open the JupyterLAB URL directly copying the following
URL in your browser and substituting <username> and <notebook-name>:
https://darkroom.ast.cam.ac.uk/user/<username>/<notebook-name>/labFile Navigation with /tree
JupyterLab’s file navigation URLs adopts
the nomenclature of the classic notebook; these URLs are /tree and URLs:
http(s)://<server:port>/<lab-location>/lab/tree/path/to/notebook.ipynbEntering this URL will open the notebook in JupyterLab in
single-document mode.
Managing Workspaces
JupyterLab sessions always reside in a workspace. Workspaces contain the state of JupyterLab: the files that are currently open, the layout of the application areas and tabs, etc. When the page is refreshed, the workspace is restored.
The default workspace is not named and only saves its state on the user’s local browser:
http(s)://<server:port>/<lab-location>/labNamed workspaces save their state on the server and can be shared between multiple users (or browsers) as long as they have access to the same server:
http(s)://<server:port>/<lab-location>/lab/workspaces/fooA workspace should only be open in a single browser tab at a time. If JupyterLab detects that a workspace is being opened multiple times simultaneously, it will prompt for a new workspace name. Opening a document in two different browser tabs simultaneously is also not supported.
Cloning Workspaces
You can copy the contents of a workspace into another workspace with the clone url parameter.
To copy the contents of the workspace foo into the workspace bar:
http(s)://<server:port>/<lab-location>/lab/workspaces/bar?clone=fooTo copy the contents of the default workspace into the workspace foo:
http(s)://<server:port>/<lab-location>/lab/workspaces/foo?cloneTo copy the contents of the workspace foo into the default workspace:
http(s)://<server:port>/<lab-location>/lab?clone=fooResetting a Workspace
Use the reset url parameter to clear a workspace of its contents.
To reset the contents of the workspace foo:
http(s)://<server:port>/<lab-location>/lab/workspaces/foo?resetTo reset the contents of the default workspace:
http(s)://<server:port>/<lab-location>/lab/workspaces/lab?resetCombining URL Functions
These URL functions can be used separately, as above, or in combination.
To reset the workspace foo and load a specific notebook afterward:
http(s)://<server:port>/<lab-location>/lab/workspaces/foo/tree/path/to/notebook.ipynb?resetTo clone the contents of the workspace bar into the workspace foo and
load a notebook afterwards:
http(s)://<server:port>/<lab-location>/lab/workspaces/foo/tree/path/to/notebook.ipynb?clone=barTo reset the contents of the default workspace and load a notebook:
http(s)://<server:port>/<lab-location>/lab/tree/path/to/notebook.ipynb?reset