Skip to content
Hoody.com

Storage shares let one container expose a directory to another container or to every container in a project. Use these endpoints to create, inspect, update, and remove shares, and to let receiving containers accept or reject the shares that target them.

GET /api/v1/containers/{id}/storage/incoming

Section titled “GET /api/v1/containers/{id}/storage/incoming”

Get all shares targeting this container, including direct container shares and project-wide shares. The response deduplicates overlapping shares (direct shares take priority over project shares) and excludes self-shares and expired shares.

NameInTypeRequiredDescription
idpathstringYesContainer ID
Terminal window
curl -X GET https://api.hoody.com/api/v1/containers/{id}/storage/incoming \
-H "Authorization: Bearer <token>"

Get every share targeting any container you own across all projects. Shows what storage you are receiving from others.

NameInTypeRequiredDescription
realm_idquerystringNoFilter by realm ID. Alternative to using realm subdomain in URL.
Terminal window
curl -X GET https://api.hoody.com/api/v1/storage/incoming \
-H "Authorization: Bearer <token>"

GET /api/v1/containers/{id}/storage/shares

Section titled “GET /api/v1/containers/{id}/storage/shares”

List all shares created from a single source container. Use query parameters to narrow by target type, label, status, or enabled state.

NameInTypeRequiredDescription
idpathstringYesSource container ID
target_typequerystringNoFilter by target type. One of container, project.
labelquerystringNoFilter by label.
statusquerystringNoFilter by status. One of active, failed.
enabledquerystringNoFilter by enabled status. One of true, false.
include_expiredquerystringNoInclude expired shares. One of true, false. Default: false.
realm_idquerystringNoFilter by realm ID. Alternative to using realm subdomain in URL.
Terminal window
curl -X GET "https://api.hoody.com/api/v1/containers/{id}/storage/shares?target_type=container&status=active" \
-H "Authorization: Bearer <token>"

List every storage share you have created across all your containers. Returns the share from the creator’s perspective, including alias, label, description, and realm membership.

NameInTypeRequiredDescription
realm_idquerystringNoFilter by realm ID. Alternative to using realm subdomain in URL.
Terminal window
curl -X GET https://api.hoody.com/api/v1/storage/shares \
-H "Authorization: Bearer <token>"

GET /api/v1/containers/{id}/storage/shares/{shareId}

Section titled “GET /api/v1/containers/{id}/storage/shares/{shareId}”

Retrieve details of a single storage share, identified by the source container ID and the share ID.

NameInTypeRequiredDescription
idpathstringYesSource container ID
shareIdpathstringYesShare ID
Terminal window
curl -X GET https://api.hoody.com/api/v1/containers/{id}/storage/shares/{shareId} \
-H "Authorization: Bearer <token>"

POST /api/v1/containers/{id}/storage/shares

Section titled “POST /api/v1/containers/{id}/storage/shares”

Share a directory from a source container to either a specific target container or to an entire project. The share is created and automatically mounted on the target(s).

NameInTypeRequiredDescription
idpathstringYesSource container ID
FieldTypeRequiredDescription
source_pathstringYesAbsolute path inside the source container. Character whitelist: a-z A-Z 0-9 / - _. Path normalization is applied; .., null bytes, and system paths (/proc/*, /sys/*, /dev/*, /boot/*, /run/*, /var/run/*) are rejected.
target_container_idstringNoTarget container ID for a 1:1 share. Mutually exclusive with target_project_id.
target_project_idstringNoTarget project ID for a project-wide share that auto-mounts on every container in the project. Mutually exclusive with target_container_id.
modestringYesMount mode. One of readonly, readwrite.
aliasstringNoOptional human-friendly alias (lowercase alphanumeric, hyphens, underscores; 3-63 chars).
labelstringNoOptional label for grouping shares (lowercase alphanumeric, hyphens, underscores; 3-63 chars).
descriptionstringNoOptional description (up to 1000 chars).
enabledbooleanNoWhether the share is enabled on creation (default: true). Disabled shares remain in the database but are not mounted.
expires_atnumberNoUnix timestamp (seconds) at which the share is auto-deleted. Omit for no expiry.
Terminal window
curl -X POST https://api.hoody.com/api/v1/containers/{id}/storage/shares \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"source_path": "/home/shared/documents",
"target_container_id": "507f1f77bcf86cd799439033",
"mode": "readonly",
"alias": "shared-docs",
"label": "documentation",
"description": "Read-only access to team documentation"
}'

PATCH /api/v1/containers/{id}/storage/shares/{shareId}

Section titled “PATCH /api/v1/containers/{id}/storage/shares/{shareId}”

Update properties of an existing storage share. Only the fields you include are changed. Pass null for alias, label, description, or expires_at to clear them.

NameInTypeRequiredDescription
idpathstringYesSource container ID
shareIdpathstringYesShare ID
FieldTypeRequiredDescription
modestringNoMount mode. One of readonly, readwrite.
aliasstringNoAlias (3-63 chars, lowercase alphanumeric with hyphens/underscores). Use null to remove.
labelstringNoLabel (3-63 chars, lowercase alphanumeric with hyphens/underscores). Use null to remove.
descriptionstringNoDescription (up to 1000 chars). Use null to remove.
enabledbooleanNoEnable or disable the share.
expires_atnumberNoUnix timestamp (seconds) when the share expires. Use null for no expiry.
Terminal window
curl -X PATCH https://api.hoody.com/api/v1/containers/{id}/storage/shares/{shareId} \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"mode": "readwrite",
"alias": "prod-data-rw",
"description": "Updated to read-write access",
"expires_at": null
}'

PATCH /api/v1/containers/{id}/storage/incoming/{shareId}/mount

Section titled “PATCH /api/v1/containers/{id}/storage/incoming/{shareId}/mount”

Let the receiving container accept or reject an incoming share. The creator’s enabled flag and the receiver’s mount flag must both be true for the share to actually be mounted.

NameInTypeRequiredDescription
idpathstringYesTarget container ID (the receiver container)
shareIdpathstringYesShare ID to toggle
FieldTypeRequiredDescription
mountbooleanYesSet to true to accept and mount the share, false to reject or unmount it.
Terminal window
curl -X PATCH https://api.hoody.com/api/v1/containers/{id}/storage/incoming/{shareId}/mount \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{ "mount": true }'

Delete a storage share by its globally unique share ID. The container ID is not required. The share is automatically unmounted from all targets.

NameInTypeRequiredDescription
shareIdpathstringYesShare ID (globally unique, no container ID needed)
Terminal window
curl -X DELETE https://api.hoody.com/api/v1/storage/shares/{shareId} \
-H "Authorization: Bearer <token>"