# Websocket API to access shell of containers

**URL:** <https://forums.suse.com/t/websocket-api-to-access-shell-of-containers/11519>\
**Category:** SUSE Rancher Prime\
**Created:** [August 19, 2018, 5:20pm UTC](https://forums.suse.com/t/websocket-api-to-access-shell-of-containers/11519 "2018-08-19T17:20:18Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Niranjan\_Sonachalam](https://avatars.discourse-cdn.com/v4/letter/n/ee7513/32.png) [@Niranjan\_Sonachalam](https://forums.suse.com/u/Niranjan_Sonachalam)\
**Post date:** [August 19, 2018, 5:20pm UTC](https://forums.suse.com/t/websocket-api-to-access-shell-of-containers/11519/1 "2018-08-19T17:20:19Z")

</div>

How to connect to a running container through websocket API and run commands? Is there a documentations somewhere?

---

<div class="post-metadata">

**Author:** ![vincent](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/vincent/32/7156_2.png) [@vincent](https://forums.suse.com/u/vincent)\
**Post date:** [August 19, 2018, 9:43pm UTC](https://forums.suse.com/t/websocket-api-to-access-shell-of-containers/11519/2 "2018-08-19T21:43:29Z")

</div>

There is no specific Rancher API for exec, we just use the standard k8s API in the UI.

> <https://github.com/rancher/ui/blob/master/lib/shared/addon/components/container-shell/component.js#L80-L150>
