Network disks
Shares on a file server the sandbox can hold mounted
On this page(3 sections)
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/netdiskConfigured 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 |
|---|---|
linksEvery configured disk with its live… | object[] |
idWhich disk | string |
providerWhat protocol it speaks | "smb" |
stateWhether it is mounted, resting, or… | "mounted" | "unmounted" | "unavailable" |
targetWhat it mounts, as //server/share | string |
mountPointWhere its files appear inside the… | string |
accessWhat the card asked for: read,… | "read" | "readwrite" |
writableWhether the live mount accepts writes,… | boolean |
sinceWhen it was mounted, in milliseconds | number |
autoMountWhether it mounts itself when the… | boolean |
detailWhy it is unavailable, or a… | string |
curl "$SANDBOX/netdisk" \
-H "x-intentic-control: $INTENTIC_TOKEN"import { sandbox } from "@intentic/sandbox-client";
const result = await sandbox.netdisk.list();POST/netdisk/{id}/mountMount a diskstream
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 |
|---|---|---|
idrequiredWhich 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 |
curl -N -X POST "$SANDBOX/netdisk/a1b2c3d4/mount" \
-H "x-intentic-control: $INTENTIC_TOKEN"import { sandbox } from "@intentic/sandbox-client";
const result = await sandbox.netdisk.mount({
"id": "a1b2c3d4"
});POST/netdisk/{id}/unmountUnmount 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 |
|---|---|---|
idrequiredWhich disk | string | address |
What comes back
| Field | Type |
|---|---|
okAlways true | true |
curl -X POST "$SANDBOX/netdisk/a1b2c3d4/unmount" \
-H "x-intentic-control: $INTENTIC_TOKEN"import { sandbox } from "@intentic/sandbox-client";
const result = await sandbox.netdisk.unmount({
"id": "a1b2c3d4"
});