diff --git a/docs/api/supervisor/endpoints.md b/docs/api/supervisor/endpoints.md index 9cbceef5..7d096991 100644 --- a/docs/api/supervisor/endpoints.md +++ b/docs/api/supervisor/endpoints.md @@ -1739,6 +1739,94 @@ Returns a dict with selected keys from other `/*/info` endpoints. +### Mounts + + +Returns information about mounts configured in Supervisor + +**Returned data:** + +| key | type | description | +| ---------------- | ---------- | -------------------------------------------------- | +| mounts | list | A list of [Mounts](api/supervisor/models.md#mount) | + +**Example response:** + +```json +{ + "mounts": [ + { + "name": "my_share", + "usage": "media", + "type": "cifs", + "server": "server.local", + "share": "media", + "state": "active" + } + ] +} +``` + + + + +Add a new mount in Supervisor and mount it + +**Payload:** + +Accepts a [Mount](api/supervisor/models.md#mount) + +Value in `name` must be unique and can only consist of letters, numbers and underscores. + +**Example payload:** + +```json +{ + "name": "my_share", + "usage": "media", + "type": "cifs", + "server": "server.local", + "share": "media", + "username": "admin", + "password": "password" +} +``` + + + + +Update an existing mount in Supervisor and remount it + +**Payload:** + +Accepts a [Mount](api/supervisor/models.md#mount). + +The `name` field should be omitted. If included the value must match the existing +name, it cannot be changed. Delete and re-add the mount to change the name. + +**Example payload:** + +```json +{ + "usage": "media", + "type": "nfs", + "server": "server.local", + "path": "/media/camera" +} +``` + + + + +Unmount and delete an existing mount from Supervisor. + + + + +Unmount and remount an existing mount in Supervisor using the same configuration. + + + ### Multicast diff --git a/docs/api/supervisor/models.md b/docs/api/supervisor/models.md index f83f972b..777c8d9e 100644 --- a/docs/api/supervisor/models.md +++ b/docs/api/supervisor/models.md @@ -266,3 +266,21 @@ The `content` key of a backup object contains the following keys: | size | int | Size of disk in bytes | | id | string | Unique ID for the disk device (either UDisks2 drive ID or device path) | | dev_path | string | Device path for the disk device | + +## Mount + +| key | type | description | request/response | +| ---------- | -------------- | ---------------------------------------------------------------------- | ---------------- | +| name | string | Name of the mount | both | +| type | string | Type of the mount (cifs or nfs) | both | +| usage | string | Usage of the mount (backup or media) | both | +| server | string | IP address or hostname of the network share server | both | +| port | int | Port to use (if not using the standard one for the mount type) | both | +| path | string | (nfs mounts only) Path to mount from the network share | both | +| share | string | (cifs mounts only) Share to mount from the network share | both | +| username | string | (cifs mounts only) Username to use for authentication | request only | +| password | string | (cifs mounts only) Password to use for authentication | request only | +| state | string | Current state of the mount (active, failed, etc.) | response only | + +Request only fields may be included in requests but will never be in responses. +Response only fields will be in responses but cannot be included in requests.