Skip to content

Access Log

The Flywheel Access Log provides user access auditing capability by keeping a record of what users took specific actions and when.

Querying the Access Log requires admin permissions.

Access log report

The ReportAccessLogEntry object has the following key fields:

Field Description
id Log entry identifier
access_type Type of access event
actions Action taken
user_id Email address of the user who performed the action
role_id role_id of the user who performed the action
timestamp When the event occurred
origin The type and ID of the log entry origin
context Additional context about the accessed resource
request_method HTTP method of the underlying request
request_path API path of the underlying request
first_access Datetime of first access
last_access Datetime of last access
count The count of the entry
destination The destination of the entry
error Error string, if error encountered

Querying the access log

Get recent access log entries
entries = fw.get_access_log_report()
for entry in entries:
    print(entry.timestamp, entry.user_id, entry.access_type)

Filter by user

Filter access log by user
entries = fw.get_access_log_report(user=user_id)
for entry in entries:
    print(entry.timestamp, entry.access_type)

Filter by date range

Filter access log by date range
from datetime import datetime

entries = fw.get_access_log_report(
    start_date=datetime(2025, 1, 1),
    end_date=datetime(2025, 12, 31),
)
for entry in entries:
    print(entry.timestamp, entry.user_id, entry.access_type)

Filter by access type

Filter access log by access type
entries = fw.get_access_log_report(access_types=["download_file"])
for entry in entries:
    print(entry.timestamp, entry.user_id, entry.origin)

Filter by project

Filter access log by project
entries = fw.get_access_log_report(project=project_id)
for entry in entries:
    print(entry.timestamp, entry.user_id, entry.access_type)

Getting available access types

List available access type values
access_types = fw.get_access_log_types()
print(access_types)