Clone a Jupyter Notebook

POST /api/v1.2/jupyter_notebooks/contents/<NewPath>

Use this API to clone a Jupyter notebook.

Note

This API is not available by default. Create a ticket with Qubole Support to enable this API on your QDS account.

Required Role

The following users can make this API call:

  • Users who belong to the system-user or system-admin group.
  • Users who belong to a group associated with a role that allows update on Jupyter Notebook and directory. See Managing Groups and Managing Roles for more information.

Path Parameters

Parameter Description
NewPath Location to save the cloned Jupyter notebook.

Parameters

The following parameters are mandatory.

Parameter Description
copy_from Entire path of the notebook to be copied including the Jupyter notebook name with extension(.ipynb).

Request API Syntax

curl -i -X POST -H "X-AUTH-TOKEN: <token>" -H "Content-Type: application/json" -H "Accept: application/json" -d '{"copy_from":"<Path>/<Name>"}'\
 "https://api.qubole.com/api/v1.2/jupyter_notebooks/contents/<NewPath>"

Note

The above syntax uses https://api.qubole.com as the endpoint. Qubole provides other endpoints to access QDS that are described in Supported Qubole Endpoints on Different Cloud Providers.

Sample API Request

curl -i -X POST -H "X-AUTH-TOKEN: $AUTH_TOKEN" -H "Content-Type: application/json" -H "Accept: application/json" -d '{"copy_from":"Users/[email protected]/note1.ipynb"}' \
"https://api.qubole.com/api/v1.2/jupyter_notebooks/contents/Users/[email protected]"