Skip to main content

ACTIVITY API Reference

Module Information

Service Files:

  • Private: service/private/activity.js

Available Services: 14 Documented Services: 14


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 (8)

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 (8)

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

activity.dismiss

Dismiss a single activity notification so it no longer appears in the feed.

PropertyValue
ScopeHub (requires hub context)
PermissionWrite (8)

Endpoint:

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

Parameters

ParameterTypeRequiredDefaultDescription
changelog_idintegerYes--

Returns

FieldTypeDescription
typeany-
propertiesany-

activity.dismiss_contact_event

Dismiss a single contact_activity row (hub invite, contact invite, etc.) so it no longer appears in the activity feed. Stamps yp.contact_activity.dismissed_at without deleting the underlying audit row.

PropertyValue
ScopeHub (requires hub context)
PermissionWrite (8)

Endpoint:

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

Parameters

ParameterTypeRequiredDefaultDescription
activity_idintegerYes--

Returns

FieldTypeDescription
typeany-
propertiesany-

activity.list

Single-call notification feed combining notification_center rollups + standalone hub-invite rows. Returns a flat array; client renders by category (chat | contact | media | teamchat | ticket | hub_invite).

PropertyValue
ScopeHub (requires hub context)
PermissionRead (2)

Endpoint:

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

Parameters

No parameters

Returns

FieldTypeDescription
typeany-
itemsobject-
items.categorystring-
items.key_idstring-
items.hub_idstring-
items.last_idinteger-
items.cntinteger-
items.ctimeinteger-

activity.dismiss_rollup

Alias of notification_dismiss under the consolidated activity.* API. Hides a rollup row from the feed. Allowed to all mebers

PropertyValue
ScopeHub (requires hub context)
PermissionRead (2)

Endpoint:

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

Parameters

ParameterTypeRequiredDefaultDescription
categorystringYes--
key_idstringYes--
hub_idstringNo--
last_idintegerNo0-

Returns

FieldTypeDescription
typeany-

activity.read

Mark a rollup as read (advance read pointer) without hiding it. For chat/teamchat/ticket this is identical to dismiss; for media we only advance mfs_ack; for contact this is a no-op (use dismiss to hide).

PropertyValue
ScopeHub (requires hub context)
PermissionWrite (8)

Endpoint:

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

Parameters

ParameterTypeRequiredDefaultDescription
categorystringYes--
key_idstringYes--
hub_idstringNo--
last_idintegerNo0-

Returns

FieldTypeDescription
typeany-

activity.create

Publish a new notification via the activity.* namespace. Routes by category to the underlying table (mfs_changelog for media, contact_activity for invites). chat/teamchat/ticket are not supported here — use the domain endpoint (chat.post / channel.post / ticket.post).

PropertyValue
ScopeHub (requires hub context)
PermissionWrite (8)

Endpoint:

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

Parameters

ParameterTypeRequiredDefaultDescription
categorystringYes--
key_idstringYes--
hub_idstringNo--
payloadobjectNo--

Returns

FieldTypeDescription
typeany-

activity.notification_dismiss

Unified dismiss for any rollup returned by drumate.notification_center. Routes by category to the right read-pointer/status update (chat → p2p_read, contact → contact.dismissed_at, media → mfs_dismissed, teamchat → <hub>.read_channel, ticket → yp.read_ticket_channel).

PropertyValue
ScopeHub (requires hub context)
PermissionWrite (8)

Endpoint:

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

Parameters

ParameterTypeRequiredDefaultDescription
categorystringYes--
key_idstringYes--
hub_idstringNo--
last_idintegerNo0-

Returns

FieldTypeDescription
typeany-
propertiesany-