Skip to main content

Request History

The Request History page provides a detailed log of API requests processed by GEM, including commands, macros, model changes, and admin-only operations. Each entry records who made the request, the result (granted or denied), and the denial reason if applicable.

Overview

Request History tracks:

  • Commands and Macros: Zone commands and macro executions
  • Model Changes: Inserts, updates, deletes, and sorts
  • Admin-Only Operations: Script execution, backups, encryption keys, SSL, user management, and other sensitive operations
  • Denied Requests: All denied API calls with the reason for denial

Open Request History

Date Range Selection

Controls at the top of the page set the time range and grouping:

ControlDescription
Start DateBeginning of the date range
End DateEnd of the date range
Group ByTimeline chart grouping: Hour, Day, or Week
Quick SelectShortcut buttons: 1D, 7D, 30D, 90D
LoadFetches records for the selected range
RefreshReloads data with current settings
note

The page loads the most recent 2,000 records within the selected date range. For high-traffic systems, narrow the date range for complete coverage.

Summary Cards

Four cards display aggregate statistics for the loaded data:

CardDescription
Total RequestsTotal number of logged requests
GrantedCount of requests that were allowed
DeniedCount of denied requests. Click the card to filter the table to denied requests only.
Unique TypesNumber of distinct request types in the loaded data

Request Timeline Chart

A stacked bar chart showing request volume over time:

  • Blue bars: Granted requests
  • Red bars: Denied requests
  • X-Axis: Time buckets (based on Group By setting)
  • Y-Axis: Request count

Use the Group By selector to change between hourly, daily, or weekly views.

Top Requests

A table below the timeline lists the 10 most frequently executed requests in the loaded data, with columns for name, type badge, and execution count. Useful for quickly spotting the busiest zones, macros, or API endpoints.

Filters

The filter bar above the request table provides six filter dimensions:

FilterDescription
TypeRequest type (e.g., command, macro, update_model, restart_gem)
Resultgranted or denied
ReasonDenial reason (e.g., admin_only, role_denied, unauthorized, invalid_session, invalid_token, remote_disallowed)
UserUsername of the authenticated user
ClientClient session ID
IPClient IP address

A count indicator shows how many records match the current filters out of the total loaded.

Request Log Table

The table displays individual request records:

ColumnDescription
TimestampWhen the request was made
TypeRequest type, color-coded by category
NameRequest name (zone name for commands, macro name for macros)
Resultgranted or denied badge
ReasonDenial reason badge (if denied)
UserUsername
ClientClient session ID (truncated). Click to open the Clients detail modal for session context.
IP AddressClient IP address
RequestRequest payload (truncated, hover for full JSON)

Denied requests are highlighted with a red background for visibility.

Pagination

Results are paginated at 50 records per page. Use the Previous/Next buttons at the bottom to navigate.

Denial Reasons

When a request is denied, one of these reasons is recorded:

ReasonDescription
admin_onlyNon-admin user attempted an admin-only operation
role_deniedUser's role explicitly denies this API function
unauthorizedUser's role does not include this API function
invalid_sessionSession expired or invalid
invalid_tokenResource token is invalid or expired
remote_disallowedRemote access blocked for this user's role

Logged Request Types

Not all API calls are logged. The following categories are recorded:

Always Logged

  • All admin-only operations (backup, restore, restart, scripts, encryption keys, SSL, user management, reports, AI assistant, etc.)
  • All denied requests regardless of type

Tracked Operations

  • command — Zone commands
  • macro — Macro executions
  • set_attribute — Attribute changes
  • reload — Device/zone reloads
  • update_model, insert_model, delete_model, create_model, sort_model — Database changes
  • upsert_user — User creation/updates
  • enable_disable_target — Enable/disable operations
  • set_site_mode, clear_site_mode — Site mode changes
  • build_automation_from_config, delete_automation — Automation changes
  • save_theme_file, delete_theme_file — Theme changes

REST API

All REST API calls are logged with request_type: rest_api, including /api/token, /api/logout, /api/control/command, /api/control/macro, and /api/data/:entity. Denial reasons specific to the REST API include malformed_body, 2fa_required, 2fa_mismatch, and 2fa_no_email.

Use Cases

Security Auditing

Monitor for unauthorized access attempts:

  1. Filter by Result: denied
  2. Review denial reasons
  3. Look for patterns (repeated denials from same user/IP)
  4. Cross-reference with Access Log for physical access correlation

Troubleshooting

Investigate when something isn't working:

  1. Filter by User or Client ID
  2. Check if requests are being denied
  3. Review denial reason to identify permission issues
  4. Adjust Roles if needed

Activity Analysis

Understand system usage patterns:

  1. Set date range to desired period
  2. Use the timeline chart to identify peak hours
  3. Review type breakdown to see which operations are most common
  4. Filter by type to drill into specific categories
  • Roles — Role-based access control and API permissions
  • Clients — Connected client sessions and device details
  • Access Log — Physical access control events
  • Data Retention — Configure how long request history is kept
  • Dashboard — System overview and recent activity widget