Jupyterlab Notebook APIs for accessing cell within a notebook

Hello Team,

Please help in finding Jupyterlab APIs for accessing Notebook cell and various operations over cell and at notebook level. Like creating cell in a notebook, writing code in the cell, running a cell and get output of a Cell etc.

If you haven’t already, you may want to work through some of the examples here: GitHub - jupyterlab/extension-examples: JupyterLab Extensions by Examples

This code shows a simple example where we are iterating over the cells in a notebook: etc-jupyterlab-cell-iterate-run/index.ts at cfa483b168c04ce3f10e0b8d0f7d1ced7074048b · educational-technology-collective/etc-jupyterlab-cell-iterate-run · GitHub

Once you have a reference to a cell, then you can obtain its model where you can get the content of the cell input and output.

If you need help, and if you can push your project to GitHub, please send me a link to the repository and I will try to help if I can.

Thanks for your reply Adpatter. Is there any way to get rest API to control notebook and cell level operations? I want to access jupyter lab notebook and cells using RET API call sfrom java Spring boot

I’m sorry. I was unable to understand what you are trying to achieve. If you would like to give a more detailed explanation, I might be able to help.

I need REST endpoints (via http verbs like GET, POST, PUT) for jupyter notebook creation, cell creation, code writing and updating with in the cell, running individual cell, fetching output of a cell etc.
Requirement: Rest endpoint url, request and response format for above functionality, to integrate jupyter as backend IDE.

I think I’m still not clear on what you are trying to achieve.

Sure adpatter.
I can be reached at mittaldivya01@gmail.com.
Can we schedule this in between IST 6am to 10pm.
Or let me know your convenient time.

Hi @mittaldivya02 , i am looking for a similar functionality as well, could you please share if you made any progress on this? I dont know of a way of initiating commands from server extensions (which are the REST handlers).