# Jupyter

> Manage Jupyter Server notebooks, files, kernels and sessions.

App · 20 actions. Web page: https://docs.lodol.com/docs/integrations/jupyter

## Actions

### Create contents

Create contents.

**Inputs**

- Path (`path`, text, required): Path.
- Content type (`content_type`, text): Content type. One of: `notebook`, `file`, `directory`.
- Extension (`extension`, text): Extension.
- Copy from (`copy_from`, text): Copy from.

**Outputs**

- `data` (object): Service response.

**Example output**

```json
{
  "data": {
    "content": {},
    "format": "example",
    "last_modified": "example",
    "name": "example",
    "path": "example",
    "type": "example"
  }
}
```

### Create session

Create session.

**Inputs**

- Path (`path`, text, required): Path.
- Name (`name`, text): Name.
- Session type (`session_type`, text, required): Session type. One of: `notebook`, `console`, `file`.
- Kernel name (`kernel_name`, text): Kernel name.

**Outputs**

- `data` (object): Service response.

**Example output**

```json
{
  "data": {
    "id": "example",
    "kernel": {
      "execution_state": "example",
      "id": "example",
      "name": "example"
    },
    "name": "example",
    "path": "example",
    "type": "example"
  }
}
```

### Delete contents

Delete contents.

**Inputs**

- Path (`path`, text, required): file path

**Outputs**

- `data` (object): Service response.

**Example output**

```json
{
  "data": {}
}
```

### Delete session

Delete session.

**Inputs**

- Session (`session_id`, text, required): session uuid

**Outputs**

- `data` (object): Service response.

**Example output**

```json
{
  "data": {}
}
```

### Get contents

Get contents.

**Inputs**

- Path (`path`, text, required): file path
- Type (`type`, text): File type ('file', 'directory'). One of: `notebook`, `file`, `directory`.
- Format (`format`, text): How file content should be returned ('text', 'base64'). One of: `json`, `text`, `base64`.
- Content (`content`, number): Return content (0 for no content, 1 for return content)
- Hash (`hash`, number): May return hash hexdigest string of content and the hash algorithm (0 for no hash - default, 1 for return hash). It may be ignored by the content manager.

**Outputs**

- `data` (object): Service response.

**Example output**

```json
{
  "data": {
    "content": {},
    "format": "example",
    "last_modified": "example",
    "name": "example",
    "path": "example",
    "type": "example"
  }
}
```

### Get kernel

Get kernel.

**Inputs**

- Kernel (`kernel_id`, text, required): kernel uuid

**Outputs**

- `data` (object): Service response.

**Example output**

```json
{
  "data": {
    "execution_state": "example",
    "id": "example",
    "name": "example"
  }
}
```

### Get session

Get session.

**Inputs**

- Session (`session_id`, text, required): session uuid

**Outputs**

- `data` (object): Service response.

**Example output**

```json
{
  "data": {
    "id": "example",
    "kernel": {
      "execution_state": "example",
      "id": "example",
      "name": "example"
    },
    "name": "example",
    "path": "example",
    "type": "example"
  }
}
```

### Get status

Get status.

**Inputs**: None.

**Outputs**

- `data` (object): Service response.

**Example output**

```json
{
  "data": {}
}
```

### Interrupt kernel

Interrupt kernel.

**Inputs**

- Kernel (`kernel_id`, text, required): kernel uuid

**Outputs**

- `data` (object): Service response.

**Example output**

```json
{
  "data": {}
}
```

### List checkpoints

List checkpoints. Returns one page; use the continuation fields for more results.

**Inputs**

- Path (`path`, text, required): file path

**Outputs**

- `data` (list): Service response.

**Example output**

```json
{
  "data": []
}
```

### List kernel specs

List kernel specs. Returns one page; use the continuation fields for more results.

**Inputs**: None.

**Outputs**

- `data` (object): Service response.

**Example output**

```json
{
  "data": {}
}
```

### List kernels

List kernels. Returns one page; use the continuation fields for more results.

**Inputs**: None.

**Outputs**

- `data` (list): Service response.

**Example output**

```json
{
  "data": []
}
```

### List sessions

List sessions. Returns one page; use the continuation fields for more results.

**Inputs**: None.

**Outputs**

- `data` (list): Service response.

**Example output**

```json
{
  "data": []
}
```

### Rename contents

Rename contents.

**Inputs**

- Path (`path`, text, required): Path.
- New path (`new_path`, text, required): New path.

**Outputs**

- `data` (object): Service response.

**Example output**

```json
{
  "data": {
    "content": {},
    "format": "example",
    "last_modified": "example",
    "name": "example",
    "path": "example",
    "type": "example"
  }
}
```

### Restart kernel

Restart kernel.

**Inputs**

- Kernel (`kernel_id`, text, required): kernel uuid

**Outputs**

- `data` (object): Service response.

**Example output**

```json
{
  "data": {
    "execution_state": "example",
    "id": "example",
    "name": "example"
  }
}
```

### Save file

Save file.

**Inputs**

- Path (`path`, text, required): Path.
- Content (`content`, text, required): The complete file text. Replaces all existing file content.

**Outputs**

- `data` (object): Service response.

**Example output**

```json
{
  "data": {
    "content": {},
    "format": "example",
    "last_modified": "example",
    "name": "example",
    "path": "example",
    "type": "example"
  }
}
```

### Save notebook

Save the complete notebook JSON. Replaces all existing notebook content.

**Inputs**

- Path (`path`, text, required): Path.
- Content (`content`, object, required): Complete nbformat notebook object, including cells and metadata.

**Outputs**

- `data` (object): Service response.

**Example output**

```json
{
  "data": {
    "content": {},
    "format": "example",
    "last_modified": "example",
    "name": "example",
    "path": "example",
    "type": "example"
  }
}
```

### Shutdown kernel

Shutdown kernel.

**Inputs**

- Kernel (`kernel_id`, text, required): kernel uuid

**Outputs**

- `data` (object): Service response.

**Example output**

```json
{
  "data": {}
}
```

### Start kernel

Start kernel.

**Inputs**

- Name (`name`, text): Name.
- Path (`path`, text): Path.

**Outputs**

- `data` (object): Service response.

**Example output**

```json
{
  "data": {
    "execution_state": "example",
    "id": "example",
    "name": "example"
  }
}
```

### Update session

Update session.

**Inputs**

- Session (`session_id`, text, required): Session id.
- Path (`path`, text): Path.
- Name (`name`, text): Name.
- Session type (`session_type`, text): Session type. One of: `notebook`, `console`, `file`.

**Outputs**

- `data` (object): Service response.

**Example output**

```json
{
  "data": {
    "id": "example",
    "kernel": {
      "execution_state": "example",
      "id": "example",
      "name": "example"
    },
    "name": "example",
    "path": "example",
    "type": "example"
  }
}
```
