getAuditEvents
Retrieve audit trail of actions in RSpace to monitor document access, modifications, and user activity with filtering by user, document, or date range.
Instructions
Retrieves audit trail of all actions performed in RSpace
Usage: Monitor document access, modifications, and user activity Filtering options:
username: Filter by specific user actions
global_id: Filter by specific document
date_from/date_to: ISO8601 format date range
Returns: Chronological list of system events
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| date_from | No | ||
| date_to | No | ||
| global_id | No | ||
| username | No |
Implementation Reference
- main.py:608-627 (handler)The handler function for the 'getAuditEvents' tool, decorated with @mcp.tool for registration. It retrieves RSpace audit events filtered by username, global_id, and date range using eln_cli.get_activity.@mcp.tool(tags={"rspace"}, name="getAuditEvents") def activity( username: str = None, global_id: str = None, date_from: str = None, date_to: str = None ) -> Dict[str, any]: """ Retrieves audit trail of all actions performed in RSpace Usage: Monitor document access, modifications, and user activity Filtering options: - username: Filter by specific user actions - global_id: Filter by specific document - date_from/date_to: ISO8601 format date range Returns: Chronological list of system events """ resp = eln_cli.get_activity(users=[username], global_id=global_id, date_from=date_from, date_to=date_to) return resp
- main.py:608-608 (registration)The MCP tool registration decorator that registers the 'activity' function as the 'getAuditEvents' tool.@mcp.tool(tags={"rspace"}, name="getAuditEvents")