Skip to main content

MFS_API API Reference

Module Information

Service Files:

  • Private: service/private/mfs_api.js

Available Services: 3 Documented Services: 3


mfs_api.create_token

Create a new MFS export token for sharing data across Drumee instances. Generates a secure token that allows external access to specific nodes/resources with configurable permissions and expiry. Used for Drumee-to-Drumee data import/export.

PropertyValue
ScopeHub (requires hub context)
PermissionAdmin (6)

Endpoint:

https://hostname/-/svc/mfs_api.create_token

Parameters

ParameterTypeRequiredDefaultDescription
hub_idstringYes--
nidstringYes--
expiry_hoursintegerNo24-
permissionintegerNo2-

Returns

FieldTypeDescription
typeany-
descriptionany-
propertiesany-

Possible Errors

Error CodeHTTP StatusDescription
missing_parameters-hub_id and nid are required
unauthorized-User not authenticated
invalid_expiry-expiry_hours must be between 0 and 8760 (1 year)
invalid_permission-permission must be between 1 and 63
token_creation_failed-Database procedure returned error
internal_error-Exception occurred during token creation

mfs_api.revoke

Revoke an existing MFS export token. Invalidates the token immediately, preventing further access to the associated resource. Only the token creator can revoke their own tokens.

PropertyValue
ScopeHub (requires hub context)
PermissionWrite (4)

Endpoint:

https://hostname/-/svc/mfs_api.revoke

Parameters

ParameterTypeRequiredDefaultDescription
tokenstringYes--

Returns

FieldTypeDescription
typeany-
descriptionany-
propertiesany-

Possible Errors

Error CodeHTTP StatusDescription
missing_token-token parameter is required
unauthorized-User not authenticated
revocation_failed-Token not found or user is not the creator
internal_error-Exception occurred during revocation

mfs_api.list

List all MFS export tokens created by current user. Returns all active and expired tokens with their details including resource information, permissions, and expiry status. Useful for token management and auditing.

PropertyValue
ScopeHub (requires hub context)
PermissionRead (2)

Endpoint:

https://hostname/-/svc/mfs_api.list

Parameters

No parameters

Returns

FieldTypeDescription
typeany-
descriptionany-
propertiesany-

Possible Errors

Error CodeHTTP StatusDescription
unauthorized-User not authenticated
internal_error-Exception occurred while listing tokens

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