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 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.
Name In Type Required Description idpath string Yes Container ID
curl -X GET https://api.hoody.com/api/v1/containers/{id}/storage/incoming \
-H " Authorization: Bearer <token> "
import { HoodyClient } from ' hoody-sdk ' ;
const client = new HoodyClient ({ baseURL : ' https://api.hoody.com ' , token : process . env . HOODY_TOKEN });
const result = await client . api . storageShares . listIncoming ( id );
console . log ( result . data );
" message " : " Incoming shares retrieved successfully " ,
" id " : " 507f1f77bcf86cd799439011 " ,
" source_container_id " : " 507f1f77bcf86cd799439022 " ,
" source_path " : " /home/app/shared-data " ,
" target_container_id " : " 507f1f77bcf86cd799439033 " ,
" target_project_id " : null ,
" target_type " : " container " ,
" expires_at " : 1735689599 ,
" 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_container_id " : null ,
" target_project_id " : " 507f1f77bcf86cd799439055 " ,
" target_type " : " project " ,
" created_by " : " 507f1f77bcf86cd799439044 " ,
" created_at " : " 2025-01-01T00:00:00.000Z " ,
" updated_at " : " 2025-01-01T00:00:00.000Z "
" message " : " Authentication token required "
" message " : " Insufficient permissions "
" message " : " Container not found "
Get every share targeting any container you own across all projects. Shows what storage you are receiving from others.
Name In Type Required Description realm_idquery string No Filter by realm ID. Alternative to using realm subdomain in URL.
curl -X GET https://api.hoody.com/api/v1/storage/incoming \
-H " Authorization: Bearer <token> "
import { HoodyClient } from ' hoody-sdk ' ;
const client = new HoodyClient ({ baseURL : ' https://api.hoody.com ' , token : process . env . HOODY_TOKEN });
const result = await client . api . storageShares . listIncomingGlobalIterator ();
console . log ( result . data );
" message " : " All incoming shares retrieved successfully " ,
" id " : " 507f1f77bcf86cd799439011 " ,
" source_container_id " : " 507f1f77bcf86cd799439022 " ,
" source_path " : " /home/app/shared-data " ,
" target_container_id " : " 507f1f77bcf86cd799439033 " ,
" target_project_id " : null ,
" target_type " : " container " ,
" expires_at " : 1735689599 ,
" created_by " : " 507f1f77bcf86cd799439044 " ,
" created_at " : " 2025-01-15T10:30:00.000Z " ,
" updated_at " : " 2025-01-15T10:30:00.000Z "
" message " : " Authentication token required "
List all shares created from a single source container. Use query parameters to narrow by target type, label, status, or enabled state.
Name In Type Required Description idpath string Yes Source container ID target_typequery string No Filter by target type. One of container, project. labelquery string No Filter by label. statusquery string No Filter by status. One of active, failed. enabledquery string No Filter by enabled status. One of true, false. include_expiredquery string No Include expired shares. One of true, false. Default: false. realm_idquery string No Filter by realm ID. Alternative to using realm subdomain in URL.
curl -X GET " https://api.hoody.com/api/v1/containers/{id}/storage/shares?target_type=container&status=active " \
-H " Authorization: Bearer <token> "
import { HoodyClient } from ' hoody-sdk ' ;
const client = new HoodyClient ({ baseURL : ' https://api.hoody.com ' , token : process . env . HOODY_TOKEN });
const result = await client . api . storageShares . listIterator ( id , { target_type : ' container ' , status : ' active ' });
console . log ( result . data );
" message " : " Storage shares retrieved successfully " ,
" id " : " 507f1f77bcf86cd799439011 " ,
" source_container_id " : " 507f1f77bcf86cd799439022 " ,
" source_path " : " /home/app/shared-data " ,
" target_container_id " : " 507f1f77bcf86cd799439033 " ,
" target_project_id " : null ,
" target_type " : " container " ,
" alias " : " prod-data-share " ,
" description " : " Shared application data directory " ,
" expires_at " : 1735689599 ,
" expiry_notified " : false ,
" created_by " : " 507f1f77bcf86cd799439044 " ,
" realm_ids " : [ " 507f1f77bcf86cd7994390aa " ],
" 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_container_id " : null ,
" target_project_id " : " 507f1f77bcf86cd799439055 " ,
" target_type " : " project " ,
" description " : " Application logs shared with project " ,
" expiry_notified " : false ,
" created_by " : " 507f1f77bcf86cd799439044 " ,
" realm_ids " : [ " 507f1f77bcf86cd7994390aa " ],
" created_at " : " 2025-01-10T08:00:00.000Z " ,
" updated_at " : " 2025-01-10T08:00:00.000Z "
" message " : " Authentication token required "
" message " : " Insufficient permissions "
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.
Name In Type Required Description realm_idquery string No Filter by realm ID. Alternative to using realm subdomain in URL.
curl -X GET https://api.hoody.com/api/v1/storage/shares \
-H " Authorization: Bearer <token> "
import { HoodyClient } from ' hoody-sdk ' ;
const client = new HoodyClient ({ baseURL : ' https://api.hoody.com ' , token : process . env . HOODY_TOKEN });
const result = await client . api . storageShares . listGlobalIterator ();
console . log ( result . data );
" message " : " All storage shares retrieved successfully " ,
" id " : " 507f1f77bcf86cd799439011 " ,
" source_container_id " : " 507f1f77bcf86cd799439022 " ,
" source_path " : " /home/app/shared-data " ,
" target_container_id " : " 507f1f77bcf86cd799439033 " ,
" target_project_id " : null ,
" target_type " : " container " ,
" alias " : " prod-data-share " ,
" description " : " Shared application data directory " ,
" expires_at " : 1735689599 ,
" expiry_notified " : false ,
" created_by " : " 507f1f77bcf86cd799439044 " ,
" realm_ids " : [ " 507f1f77bcf86cd7994390aa " ],
" created_at " : " 2025-01-15T10:30:00.000Z " ,
" updated_at " : " 2025-01-15T10:30:00.000Z "
" message " : " Authentication token required "
Retrieve details of a single storage share, identified by the source container ID and the share ID.
Name In Type Required Description idpath string Yes Source container ID shareIdpath string Yes Share ID
curl -X GET https://api.hoody.com/api/v1/containers/{id}/storage/shares/{shareId} \
-H " Authorization: Bearer <token> "
import { HoodyClient } from ' hoody-sdk ' ;
const client = new HoodyClient ({ baseURL : ' https://api.hoody.com ' , token : process . env . HOODY_TOKEN });
const result = await client . api . storageShares . get ( id , shareId );
console . log ( result . data );
" message " : " Storage share retrieved successfully " ,
" id " : " 507f1f77bcf86cd799439011 " ,
" source_container_id " : " 507f1f77bcf86cd799439022 " ,
" source_path " : " /home/app/shared-data " ,
" target_container_id " : " 507f1f77bcf86cd799439033 " ,
" target_project_id " : null ,
" target_type " : " container " ,
" alias " : " prod-data-share " ,
" description " : " Shared application data directory " ,
" expires_at " : 1735689599 ,
" expiry_notified " : false ,
" created_by " : " 507f1f77bcf86cd799439044 " ,
" realm_ids " : [ " 507f1f77bcf86cd7994390aa " ],
" created_at " : " 2025-01-15T10:30:00.000Z " ,
" updated_at " : " 2025-01-15T10:30:00.000Z "
" message " : " Authentication token required "
" message " : " Insufficient permissions "
" message " : " Storage share not found "
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).
Name In Type Required Description idpath string Yes Source container ID
Field Type Required Description source_pathstring Yes Absolute 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_idstring No Target container ID for a 1:1 share. Mutually exclusive with target_project_id. target_project_idstring No Target project ID for a project-wide share that auto-mounts on every container in the project. Mutually exclusive with target_container_id. modestring Yes Mount mode. One of readonly, readwrite. aliasstring No Optional human-friendly alias (lowercase alphanumeric, hyphens, underscores; 3-63 chars). labelstring No Optional label for grouping shares (lowercase alphanumeric, hyphens, underscores; 3-63 chars). descriptionstring No Optional description (up to 1000 chars). enabledboolean No Whether the share is enabled on creation (default: true). Disabled shares remain in the database but are not mounted. expires_atnumber No Unix timestamp (seconds) at which the share is auto-deleted. Omit for no expiry.
curl -X POST https://api.hoody.com/api/v1/containers/{id}/storage/shares \
-H " Authorization: Bearer <token> " \
-H " Content-Type: application/json " \
"source_path": "/home/shared/documents",
"target_container_id": "507f1f77bcf86cd799439033",
"label": "documentation",
"description": "Read-only access to team documentation"
import { HoodyClient } from ' hoody-sdk ' ;
const client = new HoodyClient ({ baseURL : ' https://api.hoody.com ' , token : process . env . HOODY_TOKEN });
const result = await client . api . storageShares . create ( id , {
source_path : ' /home/shared/documents ' ,
target_container_id : ' 507f1f77bcf86cd799439033 ' ,
description : ' Read-only access to team documentation '
console . log ( result . data );
" message " : " Storage share created successfully " ,
" id " : " 507f1f77bcf86cd799439020 " ,
" source_container_id " : " 507f1f77bcf86cd799439012 " ,
" source_path " : " /data/shared " ,
" target_container_id " : null ,
" target_project_id " : " 507f1f77bcf86cd799439010 " ,
" target_type " : " project " ,
" alias " : " team-shared-data " ,
" description " : " Shared project files for team collaboration " ,
" expires_at " : 1738252800 ,
" expiry_notified " : false ,
" created_by " : " 507f1f77bcf86cd799439001 " ,
" realm_ids " : [ " 507f1f77bcf86cd7994390aa " ],
" created_at " : " 2025-01-29T15:00:00.000Z " ,
" updated_at " : " 2025-01-29T15:00:00.000Z "
" error " : " VALIDATION_ERROR " ,
" message " : " Validation failed "
Error Code Title Description Resolution VALIDATION_ERRORInvalid input parameters One or more request parameters failed validation Check the error message for specific field requirements and correct your input INVALID_PATHInvalid Path The provided source or destination path is invalid. Kernel paths like /proc, /sys, /dev are not allowed Provide a valid, non-kernel path for the storage share SELF_SHARECannot Share to Self A container cannot share a directory with itself Choose a different target container or project
" message " : " Authentication token required "
Error Code Title Description Resolution MISSING_TOKENAuthentication token missing No authentication token was provided in the request Include a valid JWT token in the Authorization header as Bearer <token> INVALID_TOKENInvalid authentication token The provided authentication token is malformed or invalid Obtain a new token by logging in again or using a valid auth token
" message " : " Insufficient permissions "
Error Code Title Description Resolution INSUFFICIENT_PERMISSIONSInsufficient permissions You do not have the required permissions to perform this action Contact the resource owner or administrator to request access
" message " : " Container not found "
Error Code Title Description Resolution CONTAINER_NOT_FOUNDContainer not found The requested container does not exist or you do not have permission to access it Verify the container ID is correct and that you have access to the project it belongs to RESOURCE_NOT_FOUNDResource not found The requested resource does not exist or has been deleted Verify the resource ID and ensure it exists
" message " : " Storage share already exists. "
Error Code Title Description Resolution SHARE_ALREADY_EXISTSShare Already Exists A share with the same source path and target already exists Update the existing share or choose a different target
" error " : " Too Many Requests " ,
" message " : " Rate limit exceeded "
Error Code Title Description Resolution RATE_LIMIT_EXCEEDEDRate limit exceeded You have exceeded the rate limit for this endpoint Wait before making additional requests, or upgrade your plan for higher limits
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.
Name In Type Required Description idpath string Yes Source container ID shareIdpath string Yes Share ID
Field Type Required Description modestring No Mount mode. One of readonly, readwrite. aliasstring No Alias (3-63 chars, lowercase alphanumeric with hyphens/underscores). Use null to remove. labelstring No Label (3-63 chars, lowercase alphanumeric with hyphens/underscores). Use null to remove. descriptionstring No Description (up to 1000 chars). Use null to remove. enabledboolean No Enable or disable the share. expires_atnumber No Unix timestamp (seconds) when the share expires. Use null for no expiry.
curl -X PATCH https://api.hoody.com/api/v1/containers/{id}/storage/shares/{shareId} \
-H " Authorization: Bearer <token> " \
-H " Content-Type: application/json " \
"description": "Updated to read-write access",
import { HoodyClient } from ' hoody-sdk ' ;
const client = new HoodyClient ({ baseURL : ' https://api.hoody.com ' , token : process . env . HOODY_TOKEN });
const result = await client . api . storageShares . update ( id , shareId , {
description : ' Updated to read-write access ' ,
console . log ( result . data );
" message " : " Storage share updated successfully " ,
" id " : " 507f1f77bcf86cd799439011 " ,
" source_container_id " : " 507f1f77bcf86cd799439022 " ,
" source_path " : " /home/app/shared-data " ,
" target_container_id " : " 507f1f77bcf86cd799439033 " ,
" target_project_id " : null ,
" target_type " : " container " ,
" description " : " Updated to read-write access " ,
" expiry_notified " : false ,
" created_by " : " 507f1f77bcf86cd799439044 " ,
" realm_ids " : [ " 507f1f77bcf86cd7994390aa " ],
" created_at " : " 2025-01-15T10:30:00.000Z " ,
" updated_at " : " 2025-01-15T14:45:00.000Z "
" message " : " Validation failed "
" message " : " Authentication token required "
" message " : " Insufficient permissions "
" message " : " Storage share not found "
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.
Name In Type Required Description idpath string Yes Target container ID (the receiver container) shareIdpath string Yes Share ID to toggle
Field Type Required Description mountboolean Yes Set to true to accept and mount the share, false to reject or unmount it.
curl -X PATCH https://api.hoody.com/api/v1/containers/{id}/storage/incoming/{shareId}/mount \
-H " Authorization: Bearer <token> " \
-H " Content-Type: application/json " \
import { HoodyClient } from ' hoody-sdk ' ;
const client = new HoodyClient ({ baseURL : ' https://api.hoody.com ' , token : process . env . HOODY_TOKEN });
const result = await client . api . storageShares . toggleIncomingMount ( id , shareId , { mount : true });
console . log ( result . data );
" message " : " Share enabled for mounting successfully " ,
" id " : " 507f1f77bcf86cd799439011 " ,
" source_container_id " : " 507f1f77bcf86cd799439022 " ,
" source_path " : " /home/app/shared-data " ,
" target_container_id " : " 507f1f77bcf86cd799439033 " ,
" target_project_id " : null ,
" target_type " : " container " ,
" alias " : " prod-data-share " ,
" description " : " Shared application data directory " ,
" expires_at " : 1735689599 ,
" expiry_notified " : false ,
" created_by " : " 507f1f77bcf86cd799439044 " ,
" realm_ids " : [ " 507f1f77bcf86cd7994390aa " ],
" created_at " : " 2025-01-15T10:30:00.000Z " ,
" updated_at " : " 2025-01-15T14:45:00.000Z "
" id " : " 507f1f77bcf86cd799439099 " ,
" share_id " : " 507f1f77bcf86cd799439011 " ,
" container_id " : " 507f1f77bcf86cd799439033 " ,
" created_at " : " 2025-01-15T14:45:00.000Z " ,
" updated_at " : " 2025-01-15T14:45:00.000Z "
" error " : " VALIDATION_ERROR " ,
" message " : " This share does not target the specified container " ,
" share_id " : " 507f1f77bcf86cd799439011 " ,
" container_id " : " 507f1f77bcf86cd799439099 " ,
" target_container_id " : " 507f1f77bcf86cd799439033 " ,
" target_project_id " : null
" message " : " Authentication token required "
" message " : " Insufficient permissions "
" message " : " Share or container not found "
Delete a storage share by its globally unique share ID. The container ID is not required. The share is automatically unmounted from all targets.
Name In Type Required Description shareIdpath string Yes Share ID (globally unique, no container ID needed)
curl -X DELETE https://api.hoody.com/api/v1/storage/shares/{shareId} \
-H " Authorization: Bearer <token> "
import { HoodyClient } from ' hoody-sdk ' ;
const client = new HoodyClient ({ baseURL : ' https://api.hoody.com ' , token : process . env . HOODY_TOKEN });
await client . api . storageShares . delete ( shareId );
" message " : " Storage share deleted successfully "
" message " : " Authentication token required "
" message " : " Insufficient permissions "
" message " : " Storage share not found "