Skip to content
Hoody.com

Storage shares let a source container expose a directory to a target container (1:1) or to every container in a target project (project-wide). The source container controls what is shared (the path), while the server infrastructure determines where the path is mounted inside the target. All share paths are absolute and restricted to a character whitelist (a-z A-Z 0-9 / - _ .); system paths (/proc, /sys, /dev, /boot, /run, /var/run) and traversal sequences (..) are rejected.

Use these endpoints to create, inspect, update, and delete shares; list shares a container is exporting; list shares a container is receiving; and let a target container accept or reject incoming mounts.

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

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

List all shares originating from the specified source container. Use query parameters to narrow results.

NameInTypeRequiredDescription
idpathstringYesSource container ID
target_typequerystringNoFilter by target type. Allowed values: container, project
labelquerystringNoFilter by label
statusquerystringNoFilter by status. Allowed values: active, failed
enabledquerystringNoFilter by enabled status. Allowed values: true, false
include_expiredquerystringNoInclude expired shares. Allowed values: true, false. Default: false
realm_idquerystringNoFilter by realm ID. Alternative to using realm subdomain in URL
{
"statusCode": 200,
"message": "Storage shares retrieved successfully",
"data": [
{
"id": "507f1f77bcf86cd799439011",
"source_container_id": "507f1f77bcf86cd799439022",
"source_path": "/home/app/shared-data",
"target_container_id": "507f1f77bcf86cd799439033",
"target_project_id": null,
"target_type": "container",
"mode": "readonly",
"alias": "prod-data-share",
"label": "production",
"description": "Shared application data directory",
"enabled": true,
"status": "active",
"status_message": null,
"expires_at": 1735689599,
"expiry_notified": false,
"created_by": "507f1f77bcf86cd799439044",
"created_at": "2025-01-15T10:30:00.000Z",
"updated_at": "2025-01-15T10:30:00.000Z"
},
{
"id": "507f1f77bcf86cd799439066",
"source_container_id": "507f1f77bcf86cd799439022",
"source_path": "/var/log/app",
"target_project_id": "507f1f77bcf86cd799439055",
"target_container_id": null,
"target_type": "project",
"mode": "readwrite",
"alias": null,
"label": "logs",
"description": "Application logs shared with project",
"enabled": true,
"status": "active",
"status_message": null,
"expires_at": null,
"expiry_notified": false,
"created_by": "507f1f77bcf86cd799439044",
"created_at": "2025-01-10T08:00:00.000Z",
"updated_at": "2025-01-10T08:00:00.000Z"
}
]
}
// List all shares from the source container
await client.api.storageShares.listIterator(id)
// Filter by target type and status
await client.api.storageShares.listIterator(id, {
target_type: 'container',
status: 'active',
enabled: 'true'
})
Terminal window
curl -X GET "https://api.hoody.icu/api/v1/containers/507f1f77bcf86cd799439022/storage/shares?status=active&enabled=true" \
-H "Authorization: Bearer <token>"

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

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

List all shares targeting this container, including both direct (1:1) shares and project-level shares. Results are deduplicated so that a direct share takes priority over a project share for the same source path. Self-shares and expired shares are filtered out.

NameInTypeRequiredDescription
idpathstringYesContainer ID
{
"statusCode": 200,
"message": "Incoming shares retrieved successfully",
"data": [
{
"id": "507f1f77bcf86cd799439011",
"source_container_id": "507f1f77bcf86cd799439022",
"source_path": "/etc/app/config",
"target_container_id": "507f1f77bcf86cd799439033",
"target_project_id": null,
"target_type": "container",
"mode": "readonly",
"enabled": true,
"status": "active",
"status_message": null,
"expires_at": null,
"created_by": "507f1f77bcf86cd799439044",
"created_at": "2025-01-15T10:30:00.000Z",
"updated_at": "2025-01-15T10:30:00.000Z"
},
{
"id": "507f1f77bcf86cd799439077",
"source_container_id": "507f1f77bcf86cd799439088",
"source_path": "/opt/shared-libs",
"target_project_id": "507f1f77bcf86cd799439055",
"target_container_id": null,
"target_type": "project",
"mode": "readonly",
"enabled": true,
"status": "active",
"status_message": null,
"expires_at": null,
"created_by": "507f1f77bcf86cd799439044",
"created_at": "2025-01-01T00:00:00.000Z",
"updated_at": "2025-01-01T00:00:00.000Z"
}
]
}
await client.api.storageShares.listIncoming(id)
Terminal window
curl -X GET "https://api.hoody.icu/api/v1/containers/507f1f77bcf86cd799439033/storage/incoming" \
-H "Authorization: Bearer <token>"

List every storage share you have created across all your containers. Use this to audit what you are sharing with others.

NameInTypeRequiredDescription
realm_idquerystringNoFilter by realm ID. Alternative to using realm subdomain in URL
{
"statusCode": 200,
"message": "All storage shares retrieved successfully",
"data": [
{
"id": "507f1f77bcf86cd799439011",
"source_container_id": "507f1f77bcf86cd799439022",
"source_path": "/home/app/shared-data",
"target_container_id": "507f1f77bcf86cd799439033",
"target_project_id": null,
"target_type": "container",
"mode": "readonly",
"alias": "prod-data-share",
"label": "production",
"description": "Shared application data directory",
"enabled": true,
"status": "active",
"status_message": null,
"expires_at": 1735689599,
"expiry_notified": false,
"created_by": "507f1f77bcf86cd799439044",
"created_at": "2025-01-15T10:30:00.000Z",
"updated_at": "2025-01-15T10:30:00.000Z"
}
]
}
await client.api.storageShares.listGlobalIterator()
// Or scoped to a realm
await client.api.storageShares.listGlobalIterator({ realm_id: '507f1f77bcf86cd799439055' })
Terminal window
curl -X GET "https://api.hoody.icu/api/v1/storage/shares" \
-H "Authorization: Bearer <token>"

List all incoming shares targeting your containers across all projects. Shows everything you are receiving from other source containers.

NameInTypeRequiredDescription
realm_idquerystringNoFilter by realm ID. Alternative to using realm subdomain in URL
{
"statusCode": 200,
"message": "All incoming shares retrieved successfully",
"data": [
{
"id": "507f1f77bcf86cd799439011",
"source_container_id": "507f1f77bcf86cd799439022",
"source_path": "/home/app/shared-data",
"target_container_id": "507f1f77bcf86cd799439033",
"target_project_id": null,
"target_type": "container",
"mode": "readonly",
"enabled": true,
"status": "active",
"status_message": null,
"expires_at": 1735689599,
"created_by": "507f1f77bcf86cd799439044",
"created_at": "2025-01-15T10:30:00.000Z",
"updated_at": "2025-01-15T10:30:00.000Z"
}
]
}
await client.api.storageShares.listIncomingGlobalIterator()
Terminal window
curl -X GET "https://api.hoody.icu/api/v1/storage/incoming" \
-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 by its ID.

NameInTypeRequiredDescription
idpathstringYesSource container ID
shareIdpathstringYesShare ID
{
"statusCode": 200,
"message": "Storage share retrieved successfully",
"data": {
"id": "507f1f77bcf86cd799439011",
"source_container_id": "507f1f77bcf86cd799439022",
"source_path": "/home/app/shared-data",
"target_container_id": "507f1f77bcf86cd799439033",
"target_project_id": null,
"target_type": "container",
"mode": "readonly",
"alias": "prod-data-share",
"label": "production",
"description": "Shared application data directory",
"enabled": true,
"status": "active",
"status_message": null,
"expires_at": 1735689599,
"expiry_notified": false,
"created_by": "507f1f77bcf86cd799439044",
"created_at": "2025-01-15T10:30:00.000Z",
"updated_at": "2025-01-15T10:30:00.000Z"
}
}
await client.api.storageShares.get(id, shareId)
Terminal window
curl -X GET "https://api.hoody.icu/api/v1/containers/507f1f77bcf86cd799439022/storage/shares/507f1f77bcf86cd799439011" \
-H "Authorization: Bearer <token>"

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

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

Create a new share. Share a directory from the source container with a specific target container (target_container_id) or with every container in a target project (target_project_id). Only one of those two targets may be supplied. The share is mounted automatically when created.

NameInTypeRequiredDescription
idpathstringYesSource container ID
FieldTypeRequiredDescription
source_pathstringYesAbsolute path inside the source container to share. Character whitelist: a-z A-Z 0-9 / - _ .. System paths (/proc, /sys, /dev, /boot, /run, /var/run) and .. traversal are rejected.
modestringYesMount mode. Allowed values: readonly, readwrite
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 (auto-mounts on all containers in the project). Mutually exclusive with target_container_id.
aliasstringNoOptional human-friendly alias (lowercase alphanumeric with hyphens/underscores, 3-63 chars).
labelstringNoOptional grouping label (lowercase alphanumeric with hyphens/underscores, 3-63 chars).
descriptionstringNoOptional free-form description (max 1000 chars).
enabledbooleanNoWhether the share is mounted. Default: true. Disabled shares remain in the database but are not mounted.
expires_atnumberNoUnix timestamp (seconds) at which the share should auto-expire.
{
"statusCode": 201,
"message": "Storage share created successfully",
"data": {
"id": "507f1f77bcf86cd799439020",
"source_container_id": "507f1f77bcf86cd799439012",
"source_path": "/data/shared",
"target_project_id": "507f1f77bcf86cd799439010",
"target_container_id": null,
"target_type": "project",
"mode": "readonly",
"alias": "team-shared-data",
"label": "production",
"description": "Shared project files for team collaboration",
"enabled": true,
"status": "active",
"status_message": null,
"expires_at": 1738252800,
"expiry_notified": false,
"created_by": "507f1f77bcf86cd799439001",
"created_at": "2025-01-29T15:00:00.000Z",
"updated_at": "2025-01-29T15:00:00.000Z"
}
}
// 1:1 share with a specific target container
await client.api.storageShares.create(id, {
source_path: '/home/shared/documents',
target_container_id: '507f1f77bcf86cd799439033',
mode: 'readonly',
alias: 'shared-docs',
label: 'documentation',
description: 'Read-only access to team documentation'
})
// Project-wide share with expiration
await client.api.storageShares.create(id, {
source_path: '/opt/config',
target_project_id: '507f1f77bcf86cd799439010',
mode: 'readonly',
alias: 'app-config',
label: 'config',
expires_at: 1738252800
})
Terminal window
curl -X POST "https://api.hoody.icu/api/v1/containers/507f1f77bcf86cd799439012/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 share. Only the fields you include in the body are modified. To clear an optional field, pass null.

NameInTypeRequiredDescription
idpathstringYesSource container ID
shareIdpathstringYesShare ID
FieldTypeRequiredDescription
modestringNoMount mode. Allowed values: readonly, readwrite
aliasstringNoAlias (lowercase alphanumeric with hyphens/underscores, 3-63 chars). Pass null to remove.
labelstringNoLabel (lowercase alphanumeric with hyphens/underscores, 3-63 chars). Pass null to remove.
descriptionstringNoDescription (max 1000 chars). Pass null to remove.
enabledbooleanNoEnable or disable the share. Disabled shares remain in the database but are not mounted.
expires_atnumberNoUnix timestamp (seconds) at which the share expires. Pass null to never expire.
{
"statusCode": 200,
"message": "Storage share updated successfully",
"data": {
"id": "507f1f77bcf86cd799439011",
"source_container_id": "507f1f77bcf86cd799439022",
"source_path": "/home/app/shared-data",
"target_container_id": "507f1f77bcf86cd799439033",
"target_project_id": null,
"target_type": "container",
"mode": "readwrite",
"alias": "prod-data-rw",
"label": "production",
"description": "Updated to read-write access",
"enabled": true,
"status": "active",
"status_message": null,
"expires_at": null,
"expiry_notified": false,
"created_by": "507f1f77bcf86cd799439044",
"created_at": "2025-01-15T10:30:00.000Z",
"updated_at": "2025-01-15T14:45:00.000Z"
}
}
await client.api.storageShares.update(id, shareId, {
mode: 'readwrite',
alias: 'prod-data-rw',
description: 'Updated to read-write access',
expires_at: null
})
Terminal window
curl -X PATCH "https://api.hoody.icu/api/v1/containers/507f1f77bcf86cd799439022/storage/shares/507f1f77bcf86cd799439011" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"mode": "readwrite",
"description": "Updated to read-write access"
}'

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

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

Enable or disable mounting of an incoming share on a specific target container. This allows the receiving container owner to accept or reject an incoming share. A share appears in the target container’s /proc/mounts only when both the creator’s enabled flag and the receiver’s mount override are true.

NameInTypeRequiredDescription
idpathstringYesTarget container ID (receiver container)
shareIdpathstringYesShare ID to toggle
FieldTypeRequiredDescription
mountbooleanYestrue to accept and mount the share; false to reject or unmount it
{
"statusCode": 200,
"message": "Share enabled for mounting successfully",
"data": {
"share": {
"id": "507f1f77bcf86cd799439011",
"source_container_id": "507f1f77bcf86cd799439022",
"source_path": "/home/app/shared-data",
"target_container_id": "507f1f77bcf86cd799439033",
"target_project_id": null,
"target_type": "container",
"mode": "readonly",
"alias": "prod-data-share",
"label": "production",
"description": "Shared application data directory",
"enabled": true,
"status": "active",
"status_message": null,
"expires_at": 1735689599,
"expiry_notified": false,
"created_by": "507f1f77bcf86cd799439044",
"created_at": "2025-01-15T10:30:00.000Z",
"updated_at": "2025-01-15T14:45:00.000Z"
},
"override": {
"id": "507f1f77bcf86cd799439099",
"share_id": "507f1f77bcf86cd799439011",
"container_id": "507f1f77bcf86cd799439033",
"mount": true,
"created_at": "2025-01-15T14:45:00.000Z",
"updated_at": "2025-01-15T14:45:00.000Z"
}
}
}
// Accept an incoming share
await client.api.storageShares.toggleIncomingMount(id, shareId, { mount: true })
// Reject an incoming share
await client.api.storageShares.toggleIncomingMount(id, shareId, { mount: false })
Terminal window
curl -X PATCH "https://api.hoody.icu/api/v1/containers/507f1f77bcf86cd799439033/storage/incoming/507f1f77bcf86cd799439011/mount" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{ "mount": true }'

Remove a storage share by ID. Share IDs are globally unique so the source container ID is not required. The share is automatically unmounted from its targets.

NameInTypeRequiredDescription
shareIdpathstringYesShare ID (globally unique, no container ID needed)
{
"statusCode": 200,
"message": "Storage share deleted successfully"
}
await client.api.storageShares.delete(shareId)
Terminal window
curl -X DELETE "https://api.hoody.icu/api/v1/storage/shares/507f1f77bcf86cd799439011" \
-H "Authorization: Bearer <token>"