---
title: "Network disks · intentic sandbox API"
description: "Shares on a file server the sandbox can hold mounted. Every route in the network disks group of the intentic sandbox API."
url: "https://intentic.dev/api/netdisk/"
---

Connected systems

# Network disks

Shares on a file server the sandbox can hold mounted

**On this page (3 sections)**

- [Configured disks and which are mounted](#netdisk-list)
- [Mount a disk](#netdisk-mount)
- [Unmount a disk](#netdisk-unmount)

What is configured, mounting and unmounting one. Mount state is read back from the kernel's mount table, not from memory, and a disk added as read-only is mounted read-only.

**GET`/netdisk` Configured disks and which are mounted**

Every stored network disk with its live mount state, read back from the kernel's mount table rather than from memory, so a disk unmounted from a shell and one unmounted from a screen look the same here.

### What you send

Nothing. Call it as it is.

### What comes back

| Field | Type |
| --- | --- |
| `links` Every configured disk with its live… | object[] |
| `id` Which disk | string |
| `provider` What protocol it speaks | "smb" |
| `state` Whether it is mounted, resting, or… | "mounted" | "unmounted" | "unavailable" |
| `target` What it mounts, as //server/share | string |
| `mountPoint` Where its files appear inside the… | string |
| `access` What the card asked for: read,… | "read" | "readwrite" |
| `writable` Whether the live mount accepts writes,… | boolean |
| `since` When it was mounted, in milliseconds | number |
| `autoMount` Whether it mounts itself when the… | boolean |
| `detail` Why it is unavailable, or a… | string |

Try it answered in this tab

curl

```bash
curl "$SANDBOX/netdisk" \
 -H "x-intentic-control: $INTENTIC_TOKEN"
```

TypeScript

```typescript
import { sandbox } from "@intentic/sandbox-client";

const result = await sandbox.netdisk.list();
```

**POST`/netdisk/{id}/mount` Mount a disk stream**

Mounts a stored disk at its place under /mnt/netdisk, streaming progress. Mounting one that is already mounted simply says so. A read-only disk is mounted read-only; the kernel refuses writes to it.

### What you send

| Field | Type | Where |
| --- | --- | --- |
| `id` required Which disk | string | address |

### What comes back

| Field | Type |
| --- | --- |
| `when event is "message"` | shape |
| `data` | object |
| `kind` | string |
| `id` | string |
| `retry` | number |
| `when event is "done"` | shape |
| `data` | unknown |
| `id` | string |
| `retry` | number |
| `when event is "error"` | shape |
| `data` | unknown |
| `id` | string |
| `retry` | number |

Try it answered in this tab

curl

```bash
curl -N -X POST "$SANDBOX/netdisk/a1b2c3d4/mount" \
 -H "x-intentic-control: $INTENTIC_TOKEN"
```

TypeScript

```typescript
import { sandbox } from "@intentic/sandbox-client";

const result = await sandbox.netdisk.mount({
 "id": "a1b2c3d4"
});
```

**POST`/netdisk/{id}/unmount` Unmount a disk**

Takes the disk down. One that was already unmounted is fine: the promise is that it is not mounted afterwards.

### What you send

| Field | Type | Where |
| --- | --- | --- |
| `id` required Which disk | string | address |

### What comes back

| Field | Type |
| --- | --- |
| `ok` Always true | true |

Try it answered in this tab

curl

```bash
curl -X POST "$SANDBOX/netdisk/a1b2c3d4/unmount" \
 -H "x-intentic-control: $INTENTIC_TOKEN"
```

TypeScript

```typescript
import { sandbox } from "@intentic/sandbox-client";

const result = await sandbox.netdisk.unmount({
 "id": "a1b2c3d4"
});
```

More in Connected systems

[Previous ← VPN](https://intentic.dev/api/vpn/)[Next Exit locations →](https://intentic.dev/api/exit/)
