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.
| Property | Value |
|---|---|
| Scope | Hub (requires hub context) |
| Permission | Read (2) |
Endpoint:
https://hostname/-/svc/activity.get_unread_count
Parameters
No parameters
Returns
| Field | Type | Description |
|---|---|---|
type | any | - |
properties | any | - |
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.
| Property | Value |
|---|---|
| Scope | Hub (requires hub context) |
| Permission | Write (8) |
Endpoint:
https://hostname/-/svc/activity.mark_all_read
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
last_id | integer | No | 0 | - |
Returns
| Field | Type | Description |
|---|---|---|
type | any | - |
properties | any | - |
Possible Errors
| Error Code | HTTP Status | Description |
|---|---|---|
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.
| Property | Value |
|---|---|
| Scope | Hub (requires hub context) |
| Permission | Read (2) |
Endpoint:
https://hostname/-/svc/activity.get_feed
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
page | integer | No | 1 | - |
Returns
| Field | Type | Description |
|---|---|---|
type | any | - |
description | any | - |
items | object | - |
items.id | integer | - |
items.action | string | - |
items.nid | string | - |
items.file_name | string | - |
items.author_id | string | - |
items.ctime | integer | - |
items.is_read | integer | - |