# List Kernel JSON Response Explanation

**URL:** https://discourse.jupyter.org/t/list-kernel-json-response-explanation/18021
**Category:** Kernels
**Tags:** help-wanted
**Created:** [February 16, 2023, 9:27pm UTC](https://discourse.jupyter.org/t/list-kernel-json-response-explanation/18021 "2023-02-16T21:27:51Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![bloomsa](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/bloomsa/32/7574_2.png) [@bloomsa](https://discourse.jupyter.org/u/bloomsa)
#### Post date: [February 16, 2023, 9:27pm UTC](https://discourse.jupyter.org/t/list-kernel-json-response-explanation/18021/1 "2023-02-16T21:27:51Z")

</div>

Hi, I have an Enterprise Gateway setup for running kernels and was wondering about the specifics of the JSON response body for the [GET api/kernels endpoint](https://jupyter-enterprise-gateway.readthedocs.io/en/latest/developers/rest-api.html#get--api-kernels). Most of the fields are self explanatory, but I want to know what the `connections` field is reporting. For example I have attached a redacted version of my own Gateway’s response from that call.

```auto
[
	{
		"id": "69c86a03-4166-4961-b6ef-044b71a0a468",
		"name": "test-kernel-name",
		"last_activity": "2023-02-15T16:44:44.537596Z",
		"execution_state": "idle",
		"connections": 4039
	},
	{
		"id": "fdde574e-3c7b-40a3-bc39-e76a7f5ddc82",
		"name": "test-kernel-name",
		"last_activity": "2023-02-15T14:38:57.269689Z",
		"execution_state": "idle",
		"connections": 5469
	},
	{
		"id": "8335c579-6daf-4c35-a96d-2ce77b04bbca",
		"name": "test-kernel-name",
		"last_activity": "2023-02-16T16:17:44.483224Z",
		"execution_state": "idle",
		"connections": 5018
	},
	{
		"id": "65ee49d6-4051-41aa-a4fb-382a28401baa",
		"name": "test-kernel-name",
		"last_activity": "2023-02-16T16:17:55.101247Z",
		"execution_state": "idle",
		"connections": 5058
	},
	{
		"id": "6a968222-f9da-400c-88c4-a7d9dd1a2ceb",
		"name": "test-kernel-name",
		"last_activity": "2023-02-16T16:52:08.671040Z",
		"execution_state": "busy",
		"connections": 257
	},
	{
		"id": "f05d65d3-6c45-49a5-85f0-c46b6fef5d31",
		"name": "test-kernel-name",
		"last_activity": "2023-02-16T16:23:25.586443Z",
		"execution_state": "starting",
		"connections": 1884
	}
]

```

I ran into an issue ` zmq.error.ZMQError: Too many open files` which I’m guessing has some relation to the `connections` above but I was having a hard time finding a description of this key.

---

<div class="post-metadata">

### Author: ![bollwyvl](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/bollwyvl/32/904_2.png) [@bollwyvl](https://discourse.jupyter.org/u/bollwyvl)
#### Post date: [February 16, 2023, 11:17pm UTC](https://discourse.jupyter.org/t/list-kernel-json-response-explanation/18021/2 "2023-02-16T23:17:39Z")

</div>

Here’s the openapi spec:

> <https://github.com/jupyter-server/jupyter_server/blob/83f03e3fa21efedd485dee4dd878f08affa22820/jupyter_server/services/api/api.yaml#L435>

This can be loaded into some downstream tooling, as well:  
[https://editor.swagger.io/](https://editor.swagger.io/)

use the _File → Load from URL_ with the [raw url](https://raw.githubusercontent.com/jupyter-server/jupyter_server/83f03e3fa21efedd485dee4dd878f08affa22820/jupyter_server/services/api/api.yaml):

---

<div class="post-metadata">

### Author: ![bloomsa](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/bloomsa/32/7574_2.png) [@bloomsa](https://discourse.jupyter.org/u/bloomsa)
#### Post date: [February 16, 2023, 11:42pm UTC](https://discourse.jupyter.org/t/list-kernel-json-response-explanation/18021/3 "2023-02-16T23:42:11Z")

</div>

thanks! @kevin-bates Do you think it makes sense for me to add the models (such as [kernel](https://github.com/jupyter-server/jupyter_server/blob/83f03e3fa21efedd485dee4dd878f08affa22820/jupyter_server/services/api/api.yaml#L823)) to the EG docs page?

---

<div class="post-metadata">

### Author: ![kevin-bates](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/kevin-bates/32/234_2.png) [@kevin-bates](https://discourse.jupyter.org/u/kevin-bates)
#### Post date: [February 17, 2023, 12:21am UTC](https://discourse.jupyter.org/t/list-kernel-json-response-explanation/18021/4 "2023-02-17T00:21:03Z")

</div>

To which “EG docs page” are you referring? We already provide the [`OpenAPI`](https://jupyter-enterprise-gateway.readthedocs.io/en/latest/developers/rest-api.html#openapi-specification) information, as well as an [“interactive” mode where the model can be displayed](https://petstore.swagger.io/?url=https://raw.githubusercontent.com/jupyter-server/enterprise_gateway/main/enterprise_gateway/services/api/swagger.yaml#/kernels/get_api_kernels).

---

<div class="post-metadata">

### Author: ![bloomsa](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/bloomsa/32/7574_2.png) [@bloomsa](https://discourse.jupyter.org/u/bloomsa)
#### Post date: [February 17, 2023, 2:45am UTC](https://discourse.jupyter.org/t/list-kernel-json-response-explanation/18021/5 "2023-02-17T02:45:03Z")

</div>

Oh I see. I was thinking the bottom of the Rest API page, similar to how it is in the interactive mode. Directly embedding it on there rather than within the interactive model. I suppose it would be hard to manage model changes in that situation though.

---

<div class="post-metadata">

### Author: ![kevin-bates](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/kevin-bates/32/234_2.png) [@kevin-bates](https://discourse.jupyter.org/u/kevin-bates)
#### Post date: [February 17, 2023, 3:46pm UTC](https://discourse.jupyter.org/t/list-kernel-json-response-explanation/18021/6 "2023-02-17T15:46:06Z")

</div>

Hi @bloomsa - Given these (models) are some of the more stable artifacts we have, I’m game for any UX improvements we can make in our docs. If you’re still interested, please open a PR in EG and we can take a look. Thank you!
