Skip to main content

MFS API Reference

Module Information

Service Files:

  • Private: service/mfs.js
  • Public: service/mfs.js

Available Services: 3 Documented Services: 3


mfs.server_export

Export files/folders to server filesystem for cross-Drumee transfer or backup

PropertyValue
ScopeDomain (requires authentication)
Permissiondelete

Endpoint:

https://hostname/-/svc/mfs.server_export

Parameters

ParameterTypeRequiredDefaultDescription
socket_idstringYes-WebSocket ID for progress notifications
destinationstringYes-Server filesystem destination path
transactionidstringYes-Unique transaction identifier for tracking
nodesarray<object>Yes-Array of node objects with nid and hub_id

Returns

FieldTypeDescription
grantedarray<object>Array of granted node objects
granted[].nidstringNode ID
granted[].hub_idstringHub ID
dest_pathstringDestination path on server
uidstringUser ID executing export
socket_idstringWebSocket ID for progress updates
transactionidstringTransaction identifier

Possible Errors

Error CodeHTTP StatusDescription
PERMISSION_DENIED403User does not have permission to export these nodes
INVALID_DESTINATION400Destination path is invalid or not writable
NODE_NOT_FOUND404One or more nodes do not exist

mfs.server_import

Import files/folders from server filesystem into MFS

PropertyValue
ScopeDomain (requires authentication)
Permissiondelete

Endpoint:

https://hostname/-/svc/mfs.server_import

Parameters

ParameterTypeRequiredDefaultDescription
socket_idstringYes-WebSocket ID for progress notifications
source_listarray<string>No["/data/sample-1/"]Array of server filesystem source paths
transactionidstringYes-Unique transaction identifier for tracking
pidstringNo"0"Parent node ID where files will be imported (0 for root)
recipient_idstringNo-Target hub ID (defaults to current hub)

Returns

FieldTypeDescription
pidstringParent node ID
recipient_idstringTarget hub ID
source_listarray<string>Source paths being imported
uidstringUser ID executing import
socket_idstringWebSocket ID for progress updates
transactionidstringTransaction identifier

Possible Errors

Error CodeHTTP StatusDescription
PERMISSION_DENIED403User does not have write permission on target location
INVALID_SOURCE400Source path does not exist or is not readable
PARENT_NOT_FOUND404Parent node does not exist
INSUFFICIENT_STORAGE507Not enough storage quota available

mfs.node_summary

Get comprehensive node/folder information including file count, members, total size, and timestamps

PropertyValue
ScopeHub (requires hub context)
PermissionRead (2)

Endpoint:

https://hostname/-/svc/mfs.node_summary

Parameters

ParameterTypeRequiredDefaultDescription
hub_idstring (pattern: ^[a-z0-9]{16}$)Yes-Hub ID containing the node
nidstring (pattern: ^[a-z0-9]{16}$)Yes-Node ID (file or folder)

Returns

FieldTypeDescription
file_countnumberTotal number of files (recursive for folders)
membersarray<object>Array of users with permission on this node
members[].entity_idstringUser ID
members[].permissionnumberPermission level (0=none, 2=read, 4=write, 6=admin, 7=owner)
total_sizenumberTotal size in bytes (recursive for folders)
ctimenumberCreation timestamp (upload_time)
mtimenumberMost recent modification timestamp (publish_time)

Possible Errors

Error CodeHTTP StatusDescription
NODE_NOT_FOUND404Node does not exist
PERMISSION_DENIED403User does not have read permission on this node
INVALID_HUB_ID400Hub ID format is invalid

  • ACL System - Permission model
  • Service Routing - URL patterns
  • Error Handling - Error codes