Upload a Jupyter Notebook

PUT /api/v1.2/jupyter_notebooks/contents/<Path>/<Name>

Use this API to upload a Jupyter notebook.


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
Path Location of the Jupyter notebook.
Name Name of the Jupyter notebook including extension (.ipynb).


Parameter Description
path Location to which the Jupyter notebook has to be uploaded.
type Type of the document to be uploaded. Possible value: notebook.
name Name of the Jupyter notebook to be uploaded with extension (.ipynb).

Valid json of the notebook ipynb.


{"metadata": {"kernelspec": {"name": "sparkkernel", "display_name": "Spark", "language": ""},
"language_info": {"name": ""}}, "nbformat_minor": 4, "nbformat": 4,
"cells": [{"cell_type": "code", "source": "", "metadata": {}, "execution_count": null, "outputs": []}]}

Request API Syntax

curl -i -X PUT -H "X-AUTH-TOKEN: <token>" -H "Content-Type: application/json" -H "Accept: application/json" \
-d '{"name": "<Name>", "path": "<Path>", "type": "notebook", "content": <ValidNotebookContent>}' \


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 PUT -H "X-AUTH-TOKEN: $AUTH_TOKEN" -H "Content-Type: application/json" -H "Accept: application/json" \
-d '{"name": "note1.ipynb", "path": "Users/[email protected]/", "type": "notebook", "content": {"metadata": {"kernelspec": {"name": "sparkkernel", "display_name": "Spark", "language": ""},
"language_info": {"name": ""}}, "nbformat_minor": 4, "nbformat": 4, "cells": [{"cell_type": "code", "source": "", "metadata": {}, "execution_count": null, "outputs": []}]}}' \
"https://api.qubole.com/api/v1.2/jupyter_notebooks/contents/Users/[email protected]/note1.ipynb"