
Load Audit Trail
loadAuditTrail.RdLoads the complete audit trail for a given resource identifier. The audit trail contains a chronological record of all operations performed on the resource, supporting regulatory compliance and data integrity requirements. Results are cached for performance.
Usage
loadAuditTrail(ident, from = pwd())Arguments
- ident
The resource identifier - can be a resource ID, entity ID, entity version ID, or path. Can also be a list of identifiers.
- from
Reference point for relative paths. Defaults to current working directory via
pwd.
Value
A data frame with class "improveResource" containing:
type- Type indicator ("auditTrail")resourceId,entityId,entityVersionId- Resource identifierspath,name- Resource location and namedata- A list containing data frames with audit trail entries. Each entry contains 13 variables documenting a single operation:id- Unique audit entry identifieripAddress- IP address of user performing the actioncreatedAt,createdAtDate- Timestamp (milliseconds and POSIXct)actor- Actor type (e.g., "User", "System")operation- Operation type (e.g., "create", "update", "delete")userVersion- User version identifierusername- Username who performed the actiondescription- Human-readable description of the actionpath- Resource path at time of actionresourceName- Name of the resourceentityReference- Reference to the modified entityentityReferenceType- Type of entity (e.g., "Step Version", "Analysis Tree Version")revisionId- Revision identifierentityId,entityVersionId- Entity identifiers
Details
The audit trail provides a complete, immutable record of all changes to a resource, supporting regulatory compliance requirements. Each entry captures who made the change, when, from where (IP address), and what was changed.
Audit trails are essential for pharmaceutical workflows to demonstrate data integrity and provide accountability for all modifications to analysis results and workflows.
See also
unloadAuditTrail to clear cache,
updateAuditTrail to refresh from server
Examples
if (FALSE) { # \dontrun{
# Load audit trail for current resource
auditTrail <- loadAuditTrail(ident, pwd())
auditTrail$data[[1]]
# Review recent operations
recent <- auditTrail$data[[1]] |>
dplyr::arrange(desc(createdAtDate)) |>
head(10)
# Load audit trail by path
auditTrail <- loadAuditTrail("/Projects/MyWorkflow/Step1")
} # }