Update a share
PATCH/shares/:name
Required role: admin. Only an account or token with the admin role can call this operation.
Example request
curl --request PATCH \
--header "Authorization: Bearer $HOSERVA_TOKEN" \
--header "Content-Type: application/json" \
--data @body.json \
"https://$HOSERVA_HOST:8008/api/v1/shares/{name}"
Updates cache mode, create policy and SMB options, then regenerates the per-share mount and smb.conf. Does not relocate existing files. Refused with 409 maintenance_mode while the array is stopped: update would mkdir and remount under bare disk mountpoints on the root filesystem. While an Unraid import is pending its point of no return it creates no directory on any adopted disk, and a cache mode that needs a cache is refused because none exists yet; choosing a cache mode here replaces the one the import recorded as the share's target.
Request
Responses
- 200
- default
The updated share.
An error response.