# Is it possible to get access to exist session from extension, execute some code there and get response?

**URL:** <https://discourse.jupyter.org/t/is-it-possible-to-get-access-to-exist-session-from-extension-execute-some-code-there-and-get-response/9888>\
**Category:** extensions\
**Tags:** how-to, help-wanted\
**Created:** [July 7, 2021, 4:22pm UTC](https://discourse.jupyter.org/t/is-it-possible-to-get-access-to-exist-session-from-extension-execute-some-code-there-and-get-response/9888 "2021-07-07T16:22:57Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![dagapov](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/dagapov/32/4733_2.png) [@dagapov](https://discourse.jupyter.org/u/dagapov)\
**Post date:** [July 7, 2021, 4:22pm UTC](https://discourse.jupyter.org/t/is-it-possible-to-get-access-to-exist-session-from-extension-execute-some-code-there-and-get-response/9888/1 "2021-07-07T16:22:57Z")

</div>

I found that I can get list of running session using `const sessions = await SessionAPI.listRunning();`  
But how to create session object based on those data?  
Can I get exists object of this session that was create in jupyter lab?  
And execute some code e.g. `num = 10` and get access to it from jupyter lab?
