You can share a notebook you've created in the same way as any other item. By default, your notebook is only accessible to you; it does not appear in other users' search results and is not part of any group. Depending on your sharing privileges, you can share it.
Note:
When you share a notebook, other users can open and run the notebook. However, any changes they make to the notebook will be saved as a new copy that they will own. The changes they make are not saved to your notebook.
You have the following options for sharing notebooks:
- Everyone—Sharing with everyone makes your notebook public; anybody who has access to the organization website can find and use it, and group owners can include it in their group content.
- Your organization—To ensure only members (named users) of your portal have access to your notebook, you can share it with only named users in your organization.
- Groups—If you are a member of a group, you can share your notebook with that group. Sharing with specific groups restricts access to a smaller, focused set of people. This is the best option for sharing securely.
- Everyone and a group—If you want to share your notebook with a subset of users or organize your content into a collection of items, but you also want everyone to have access to your item, you can share an item with a group and with everyone. This is appropriate for focused group work in which all members benefit from specific content they can use for collaboration and exchange.
- Groups and your organization or everyone—You can share a notebook with a larger audience (everyone or your organization) and also share it with a specific group. This allows you to categorize your notebook as relevant to a particular group while still making it available to others in your organization.
Prepare your notebook to be shared
Before you share a notebook, ensure the notebook can be opened and run successfully by others while preserving the integrity, security, and accessibility of your notebook.
- Avoid storing usernames, passwords, credentials, or any other personal information in a notebook. Sharing a notebook with this content will expose it to others. If you need to connect to a GIS with a username and password, it is recommended that you only include the username in the code and wait to be prompted for the password on the interactive dialog box. To learn more about options for connecting to your GIS without a password, see Working with different authentication schemes.
- Any item you have added to your notebook must also be shared with a member for that member to be able to view and use it in the notebook. Check the sharing properties for each item in your notebook before sharing the notebook.
- You can use files from your user workspace in your notebooks. However, if you intend to share a notebook with others in your organization, upload the files to My Content, then add those items to your notebook. Share them with the members who will be viewing your notebook.
- If your notebook uses the Advanced Notebook runtime, only users with the Advanced Notebook privilege can open and run the notebook when it is shared with them. See Specify the runtime of a notebook for steps on how to change the runtime.
Share a notebook from the notebook editor
You can share a notebook directly from the notebook editor.
- On the top ribbon of the notebook editor, click Share.
The Share Notebook pane appears, displaying the notebook's current sharing settings.
- Click Share in the pane to open the share window.
- In the Share window, select the sharing level, and click Save.
Your new sharing settings are shown in the pane.
You can update a notebook's sharing settings from the Content page or from the notebook editor itself. Both open the Share dialog box for the item, where you set and save sharing options.
Share code snippets
You can share code snippets by sharing the notebook code snippet libraries in which the snippets are stored, the same way you would other items you own. Sharing code snippet libraries allows you to share snippets of code that others can insert into their notebooks. Sharing a snippet library does not share the entire notebook and snippets in the library cannot be edited by others.
Code snippets in a library are not automatically shared when the library is shared. To make snippets shared in the library, the snippet must be set to inherit the library's sharing level.
To share a code snippet library from the notebook editor, do the following:
- On the top ribbon of the notebook editor, click Code snippets.
- In the Code snippets pane, click More options, and click Manage library items.
- Click the Share button for the code snippet library you want to share.
- In the Share window, choose the sharing level for the code snippet library, and click Save.
- Click Done.
You can also update a code snippet library's sharing settings from its item details page.
Work on a shared notebook
When a notebook that has been shared is opened, a copy of that notebook is created and opened. The member with whom the notebook was shared is the owner of the new notebook copy; it runs in their own container and uses their own processing resources. Any changes they make to the notebook are only made in the new notebook copy.
You can search your organization's content to find a shared notebook, or access the notebook item from the group with which it is shared. Preview the notebook to view its content, and open the notebook from its item details page.
Ensure you only open shared notebooks from sources you trust. Any code you run in a shared notebook is run on your behalf, using your credentials. It's a best practice to review all cells in a shared notebook individually before running them, and to not use the Run All option when first opening a shared notebook.
Notebooks shared with you may reference files you do not have access to—they may be from items that haven't been shared with you, or may reside in the author's own user workspace. Contact the author if you receive such errors.