Skip to main content

ACTIVITY API Reference

Module Information

Service Files:

  • Private: service/private/activity.js

Available Services: 7 Documented Services: 7


activity.get_unread_count

Get count of unread MFS notifications for current user. Queries the mfs_ack table to calculate how many changelog entries the user hasn't read yet.

PropertyValue
ScopeHub (requires hub context)
PermissionRead (2)

Endpoint:

https://hostname/-/svc/activity.get_unread_count

Parameters

No parameters

Returns

FieldTypeDescription
typeany-
propertiesany-

Possible Errors

Error codes not documented


activity.mark_all_read

Mark all MFS notifications as read for current user. Updates the mfs_ack table with the last read changelog ID. If no last_id provided, uses the latest changelog ID from database.

PropertyValue
ScopeHub (requires hub context)
PermissionWrite (4)

Endpoint:

https://hostname/-/svc/activity.mark_all_read

Parameters

ParameterTypeRequiredDefaultDescription
last_idintegerNo0-

Returns

FieldTypeDescription
typeany-
propertiesany-

Possible Errors

Error CodeHTTP StatusDescription
DB_PROC_FAILED-Failed to mark as read

activity.get_feed

Get paginated activity feed with read/unread status. Returns MFS changelog entries with pagination (45 items per page by default). Each item includes read status based on user's mfs_ack.last_read_id.

PropertyValue
ScopeHub (requires hub context)
PermissionRead (2)

Endpoint:

https://hostname/-/svc/activity.get_feed

Parameters

ParameterTypeRequiredDefaultDescription
pageintegerNo1-

Returns

FieldTypeDescription
typeany-
descriptionany-
itemsobject-
items.idinteger-
items.actionstring-
items.nidstring-
items.file_namestring-
items.author_idstring-
items.ctimeinteger-
items.is_readinteger-

Possible Errors

Error codes not documented


activity.get_last_read

Get last read changelog ID for current user. Queries the mfs_ack table from user's database to retrieve the last changelog ID the user has marked as read.

PropertyValue
ScopeHub (requires hub context)
PermissionRead (2)

Endpoint:

https://hostname/-/svc/activity.get_last_read

Parameters

No parameters

Returns

FieldTypeDescription
typeany-
propertiesany-

Possible Errors

Error CodeHTTP StatusDescription
USER_DB_NOT_FOUND-User database not found

activity.acknowledge_file

Mark a specific file/folder as seen. Updates the mfs_ack table with the changelog ID corresponding to this file/folder. Triggers WebSocket notification to update UI. Replaces old media.mark_as_seen which used JSON metadata.

PropertyValue
ScopeHub (requires hub context)
PermissionWrite (4)

Endpoint:

https://hostname/-/svc/activity.acknowledge_file

Parameters

ParameterTypeRequiredDefaultDescription
nidstringYes--

Returns

FieldTypeDescription
typeany-
propertiesany-

Possible Errors

Error CodeHTTP StatusDescription
MISSING_NID-Parameter 'nid' is required
DB_PROC_FAILED-File not acknowledged

activity.log

Get unified activity log (contacts + MFS) with priority sorting. Contact events are shown first, followed by MFS events. Pagination: 45 items per page. This provides a comprehensive activity timeline across both contact management and file operations.

PropertyValue
ScopeHub (requires hub context)
PermissionRead (2)

Endpoint:

https://hostname/-/svc/activity.log

Parameters

ParameterTypeRequiredDefaultDescription
pageintegerNo1-

Returns

FieldTypeDescription
typeany-
descriptionany-
itemsobject-
items.idinteger-
items.event_typestring-
items.author_idstring-
items.target_idstring-
items.metadataobject-
items.ctimeinteger-
items.is_readinteger-

Possible Errors

Error codes not documented


activity.folder_log

Get activity log for a specific folder. Shows all MFS events (upload, delete, move, copy, rename, etc.) related to a specific folder/node. Useful for tracking file activity within a particular directory. Pagination: 45 items per page.

PropertyValue
ScopeHub (requires hub context)
PermissionRead (2)

Endpoint:

https://hostname/-/svc/activity.folder_log

Parameters

ParameterTypeRequiredDefaultDescription
nidstringYes--
pageintegerNo1-

Returns

FieldTypeDescription
typeany-
descriptionany-
itemsobject-
items.idinteger-
items.actionstring-
items.nidstring-
items.file_namestring-
items.author_idstring-
items.ctimeinteger-
items.is_readinteger-

Possible Errors

Error CodeHTTP StatusDescription
MISSING_NID-Parameter 'nid' is required

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