# LitmusEdge 4.0.x API Documentation/System/External Storage - LE, LEM, LUNS API Docs

## List of Attached Storages

**GET** `{{edgeUrl}}/dm/storage`

# List of Attached Storages

Returns every external storage mount (CIFS or FTP) configured on the device along with its current connection state.

## Endpoint

```http
GET {{edgeUrl}}/dm/storage
```
## Authentication

HTTP Basic Auth. **Username** is your API token, **password** is empty. Tokens are managed under `System > Access Control > Tokens`.

## Response

`200 OK` -- `application/json`. Array of mount objects.

| Field           | Type    | Description                                                                                |
|-----------------|---------|--------------------------------------------------------------------------------------------|
| `name`          | string  | Mount name (use in path of other endpoints as `{{attached_storage_name}}`).                |
| `path`          | string  | Local path on the device (`/data/<name>`).                                                  |
| `shareURI`      | string  | Remote share URI (`cifs://...` or `ftp://...`).                                            |
| `identity`      | string  | Account used (e.g. `user@DOMAIN`).                                                         |
| `mountOnBoot`   | boolean | Auto-mount on device boot.                                                                 |
| `readOnly`      | boolean | Mounted read-only.                                                                         |
| `status`        | string  | `CONNECTING`, `CONNECTED`, `DISCONNECTED`, `ERROR`.                                         |

```json
[
  {
    "identity": "user@DOMAIN",
    "mountOnBoot": false,
    "name": "public",
    "path": "/data/public",
    "readOnly": false,
    "shareURI": "cifs://nas01.example.com/public/data",
    "status": "CONNECTING"
  }
]
```

## Errors

| HTTP status         | When it happens                                                                |
|---------------------|--------------------------------------------------------------------------------|
| `400 Bad Request`   | Missing or malformed query/body parameter.                                     |
| `401 Unauthorized`  | Missing or invalid credentials.                                                |
| `403 Forbidden`     | Token lacks permission for this operation.                                     |
| `404 Not Found`     | Target entity does not exist.                                                  |
| `5xx`               | Service is unreachable, restarting, or internally errored. Inspect device logs under `System > Support`. |

> **TLS note**: edge devices use a self-signed certificate by default. Either install the device CA in your client trust store or disable certificate verification when calling this endpoint directly.


### Response

**Status**: 200 OK

```json
[
    {
        "identity": "user@DOMAIN",
        "mountOnBoot": false,
        "name": "public",
        "path": "/data/public",
        "readOnly": false,
        "shareURI": "cifs://nas01.example.com/public/data",
        "status": "CONNECTING"
    },
    {
        "identity": "user@DOMAIN",
        "mountOnBoot": false,
        "name": "public",
        "path": "/data/public",
        "readOnly": false,
        "shareURI": "cifs://nas01.example.com/public/data",
        "status": "CONNECTING"
    }
]
```

---

## Create New CIFS Mount

**POST** `{{edgeUrl}}/dm/storage/cifs`

# Create New CIFS Mount

Creates a new CIFS (SMB) mount entry. The device attempts to connect in the background; status is visible via `List of Attached Storages`.

## Endpoint

```http
POST {{edgeUrl}}/dm/storage/cifs
```
## Authentication

HTTP Basic Auth. **Username** is your API token, **password** is empty. Tokens are managed under `System > Access Control > Tokens`.

## Request body

```json
{
  "name": "public",
  "share": "//nas01.example.com/public/data",
  "domain": "corp",
  "username": "testuser",
  "password": "************",
  "mountOnBoot": false,
  "readOnly": true
}
```

| Field         | Type    | Required | Description                                                       |
|---------------|---------|----------|-------------------------------------------------------------------|
| `name`        | string  | Yes      | Mount name. Becomes the local path `/data/<name>`.                |
| `share`       | string  | Yes      | UNC path to the SMB share.                                        |
| `username`    | string  | Yes      | SMB user.                                                         |
| `password`    | string  | Yes      | SMB password. Sent in clear text -- use HTTPS.                    |
| `domain`      | string  | No       | SMB domain (for Active Directory).                                |
| `mountOnBoot` | boolean | No       | Mount automatically on device boot.                                |
| `readOnly`    | boolean | No       | Mount read-only.                                                  |

## Errors

| HTTP status         | When it happens                                                                |
|---------------------|--------------------------------------------------------------------------------|
| `400 Bad Request`   | Missing or malformed query/body parameter.                                     |
| `401 Unauthorized`  | Missing or invalid credentials.                                                |
| `403 Forbidden`     | Token lacks permission for this operation.                                     |
| `404 Not Found`     | Target entity does not exist.                                                  |
| `5xx`               | Service is unreachable, restarting, or internally errored. Inspect device logs under `System > Support`. |

> **TLS note**: edge devices use a self-signed certificate by default. Either install the device CA in your client trust store or disable certificate verification when calling this endpoint directly.


### Request Body

```json
{
    "domain": "corp",
    "mountOnBoot": false,
    "name": "public",
    "password": "************",
    "readOnly": true,
    "share": "//nas01.example.com/public/data",
    "username": "testuser"
}
```

### Response

**Status**: 204 No Content

---

## Get Details of CIFS Mount

**GET** `{{edgeUrl}}/dm/storage/cifs/{{cifs_mount_name}}`

# Get Details of CIFS Mount

Returns the configuration of one named CIFS mount. The password is not returned.

## Endpoint

```http
GET {{edgeUrl}}/dm/storage/cifs/{{cifs_mount_name}}
```
## Authentication

HTTP Basic Auth. **Username** is your API token, **password** is empty. Tokens are managed under `System > Access Control > Tokens`.

## Path parameters

| Location | Name                       | Required | Description                                              |
|----------|----------------------------|----------|----------------------------------------------------------|
| Path     | `{{cifs_mount_name}}`      | Yes      | Mount name.                                              |

## Errors

| HTTP status         | When it happens                                                                |
|---------------------|--------------------------------------------------------------------------------|
| `400 Bad Request`   | Missing or malformed query/body parameter.                                     |
| `401 Unauthorized`  | Missing or invalid credentials.                                                |
| `403 Forbidden`     | Token lacks permission for this operation.                                     |
| `404 Not Found`     | Target entity does not exist.                                                  |
| `5xx`               | Service is unreachable, restarting, or internally errored. Inspect device logs under `System > Support`. |

> **TLS note**: edge devices use a self-signed certificate by default. Either install the device CA in your client trust store or disable certificate verification when calling this endpoint directly.


### Response

**Status**: 200 OK

```json
{
    "domain": "corp",
    "mountOnBoot": false,
    "name": "public",
    "path": "/data/public",
    "readOnly": true,
    "share": "//nas01.example.com/public/data",
    "username": "testuser"
}
```

---

## Update CIFS Mount

**POST** `{{edgeUrl}}/dm/storage/cifs/{{cifs_mount_name}}`

# Update CIFS Mount

Updates one CIFS mount in place. Pass the **full** configuration.

## Endpoint

```http
POST {{edgeUrl}}/dm/storage/cifs/{{cifs_mount_name}}
```
## Authentication

HTTP Basic Auth. **Username** is your API token, **password** is empty. Tokens are managed under `System > Access Control > Tokens`.

## Path parameters

| Location | Name                       | Required | Description                                              |
|----------|----------------------------|----------|----------------------------------------------------------|
| Path     | `{{cifs_mount_name}}`      | Yes      | Current mount name.                                      |

## Request body

Same shape as `Create New CIFS Mount`. The `name` field in the body can be used to rename the mount.

## Errors

| HTTP status         | When it happens                                                                |
|---------------------|--------------------------------------------------------------------------------|
| `400 Bad Request`   | Missing or malformed query/body parameter.                                     |
| `401 Unauthorized`  | Missing or invalid credentials.                                                |
| `403 Forbidden`     | Token lacks permission for this operation.                                     |
| `404 Not Found`     | Target entity does not exist.                                                  |
| `5xx`               | Service is unreachable, restarting, or internally errored. Inspect device logs under `System > Support`. |

> **TLS note**: edge devices use a self-signed certificate by default. Either install the device CA in your client trust store or disable certificate verification when calling this endpoint directly.


### Request Body

```json
{
    "domain": "corp",
    "mountOnBoot": false,
    "name": "apiTest",
    "password": "************",
    "readOnly": true,
    "share": "//nas01.example.com/public/data",
    "username": "testuser"
}
```

### Response

**Status**: 204 No Content

---

## Create FTP Mount Point

**POST** `{{edgeUrl}}/dm/storage/ftp`

# Create FTP Mount Point

Creates a new FTP mount entry. Same operational semantics as `Create New CIFS Mount`; the URL prefix is `/dm/storage/ftp` instead.

## Endpoint

```http
POST {{edgeUrl}}/dm/storage/ftp
```
## Authentication

HTTP Basic Auth. **Username** is your API token, **password** is empty. Tokens are managed under `System > Access Control > Tokens`.

## Request body

```json
{
  "name": "public",
  "share": "//nas01.example.com/public/data",
  "username": "testuser",
  "password": "************",
  "mountOnBoot": false,
  "readOnly": true
}
```

## Errors

| HTTP status         | When it happens                                                                |
|---------------------|--------------------------------------------------------------------------------|
| `400 Bad Request`   | Missing or malformed query/body parameter.                                     |
| `401 Unauthorized`  | Missing or invalid credentials.                                                |
| `403 Forbidden`     | Token lacks permission for this operation.                                     |
| `404 Not Found`     | Target entity does not exist.                                                  |
| `5xx`               | Service is unreachable, restarting, or internally errored. Inspect device logs under `System > Support`. |

> **TLS note**: edge devices use a self-signed certificate by default. Either install the device CA in your client trust store or disable certificate verification when calling this endpoint directly.


### Request Body

```json
{
    "mountOnBoot": false,
    "name": "public",
    "password": "************",
    "readOnly": true,
    "share": "//nas01.example.com/public/data",
    "username": "testuser"
}
```

### Response

**Status**: 204 No Content

---

## Get Details of FTP Mount

**GET** `{{edgeUrl}}/dm/storage/ftp/{{ftp_mount_name}}`

# Get Details of FTP Mount

Returns the configuration of one named FTP mount.

## Endpoint

```http
GET {{edgeUrl}}/dm/storage/ftp/{{ftp_mount_name}}
```
## Authentication

HTTP Basic Auth. **Username** is your API token, **password** is empty. Tokens are managed under `System > Access Control > Tokens`.

## Path parameters

| Location | Name                      | Required | Description                                              |
|----------|---------------------------|----------|----------------------------------------------------------|
| Path     | `{{ftp_mount_name}}`      | Yes      | Mount name.                                              |

## Errors

| HTTP status         | When it happens                                                                |
|---------------------|--------------------------------------------------------------------------------|
| `400 Bad Request`   | Missing or malformed query/body parameter.                                     |
| `401 Unauthorized`  | Missing or invalid credentials.                                                |
| `403 Forbidden`     | Token lacks permission for this operation.                                     |
| `404 Not Found`     | Target entity does not exist.                                                  |
| `5xx`               | Service is unreachable, restarting, or internally errored. Inspect device logs under `System > Support`. |

> **TLS note**: edge devices use a self-signed certificate by default. Either install the device CA in your client trust store or disable certificate verification when calling this endpoint directly.


### Response

**Status**: 200 OK

```json
{
    "mountOnBoot": false,
    "name": "public",
    "path": "/data/public",
    "readOnly": true,
    "share": "//nas01.example.com/public/data",
    "username": "testuser"
}
```

---

## Update FTP Mount Point

**POST** `{{edgeUrl}}/dm/storage/ftp/{{ftp_mount_name}}`

# Update FTP Mount Point

Updates one FTP mount in place. Same shape as `Create FTP Mount Point`.

## Endpoint

```http
POST {{edgeUrl}}/dm/storage/ftp/{{ftp_mount_name}}
```
## Authentication

HTTP Basic Auth. **Username** is your API token, **password** is empty. Tokens are managed under `System > Access Control > Tokens`.

## Path parameters

| Location | Name                      | Required | Description                                              |
|----------|---------------------------|----------|----------------------------------------------------------|
| Path     | `{{ftp_mount_name}}`      | Yes      | Current mount name.                                      |

## Errors

| HTTP status         | When it happens                                                                |
|---------------------|--------------------------------------------------------------------------------|
| `400 Bad Request`   | Missing or malformed query/body parameter.                                     |
| `401 Unauthorized`  | Missing or invalid credentials.                                                |
| `403 Forbidden`     | Token lacks permission for this operation.                                     |
| `404 Not Found`     | Target entity does not exist.                                                  |
| `5xx`               | Service is unreachable, restarting, or internally errored. Inspect device logs under `System > Support`. |

> **TLS note**: edge devices use a self-signed certificate by default. Either install the device CA in your client trust store or disable certificate verification when calling this endpoint directly.


### Request Body

```json
{
    "mountOnBoot": false,
    "name": "public1",
    "password": "************",
    "readOnly": true,
    "share": "//nas01.example.com/public/data",
    "username": "testuser"
}
```

### Response

**Status**: 204 No Content

---

## Delete Mount Point

**DELETE** `{{edgeUrl}}/dm/storage/{{attached_storage_name}}`

# Delete Mount Point

Removes any external storage mount (CIFS or FTP) by name. The mount is unmounted (if currently mounted) and its entry deleted.

## Endpoint

```http
DELETE {{edgeUrl}}/dm/storage/{{attached_storage_name}}
```
## Authentication

HTTP Basic Auth. **Username** is your API token, **password** is empty. Tokens are managed under `System > Access Control > Tokens`.

## Path parameters

| Location | Name                              | Required | Description                                              |
|----------|-----------------------------------|----------|----------------------------------------------------------|
| Path     | `{{attached_storage_name}}`       | Yes      | Mount name.                                              |

## Errors

| HTTP status         | When it happens                                                                |
|---------------------|--------------------------------------------------------------------------------|
| `400 Bad Request`   | Missing or malformed query/body parameter.                                     |
| `401 Unauthorized`  | Missing or invalid credentials.                                                |
| `403 Forbidden`     | Token lacks permission for this operation.                                     |
| `404 Not Found`     | Target entity does not exist.                                                  |
| `5xx`               | Service is unreachable, restarting, or internally errored. Inspect device logs under `System > Support`. |

> **TLS note**: edge devices use a self-signed certificate by default. Either install the device CA in your client trust store or disable certificate verification when calling this endpoint directly.


### Response

**Status**: 204 No Content

---

## Mount the Share

**PUT** `{{edgeUrl}}/dm/storage/{{attached_storage_name}}/mount`

# Mount the Share

Mounts a previously-created (but currently unmounted) storage entry. Idempotent for already-mounted shares.

## Endpoint

```http
PUT {{edgeUrl}}/dm/storage/{{attached_storage_name}}/mount
```
## Authentication

HTTP Basic Auth. **Username** is your API token, **password** is empty. Tokens are managed under `System > Access Control > Tokens`.

## Errors

| HTTP status         | When it happens                                                                |
|---------------------|--------------------------------------------------------------------------------|
| `400 Bad Request`   | Missing or malformed query/body parameter.                                     |
| `401 Unauthorized`  | Missing or invalid credentials.                                                |
| `403 Forbidden`     | Token lacks permission for this operation.                                     |
| `404 Not Found`     | Target entity does not exist.                                                  |
| `5xx`               | Service is unreachable, restarting, or internally errored. Inspect device logs under `System > Support`. |

> **TLS note**: edge devices use a self-signed certificate by default. Either install the device CA in your client trust store or disable certificate verification when calling this endpoint directly.


---

## Unmount the Share

**PUT** `{{edgeUrl}}/dm/storage/{{attached_storage_name}}/unmount`

# Unmount the Share

Unmounts a currently-mounted storage entry without removing the configuration. Use `Mount the Share` to remount.

## Endpoint

```http
PUT {{edgeUrl}}/dm/storage/{{attached_storage_name}}/unmount
```
## Authentication

HTTP Basic Auth. **Username** is your API token, **password** is empty. Tokens are managed under `System > Access Control > Tokens`.

## Errors

| HTTP status         | When it happens                                                                |
|---------------------|--------------------------------------------------------------------------------|
| `400 Bad Request`   | Missing or malformed query/body parameter.                                     |
| `401 Unauthorized`  | Missing or invalid credentials.                                                |
| `403 Forbidden`     | Token lacks permission for this operation.                                     |
| `404 Not Found`     | Target entity does not exist.                                                  |
| `5xx`               | Service is unreachable, restarting, or internally errored. Inspect device logs under `System > Support`. |

> **TLS note**: edge devices use a self-signed certificate by default. Either install the device CA in your client trust store or disable certificate verification when calling this endpoint directly.


---

