Simple History has a few WP REST API endpoints that developers can use to fetch the log themself.
To access these you must authenticate your requests.
Endpoints
Events
Contains the same data as the main events feed.
GET /wp-json/simple-history/v1/eventsGET /wp-json/simple-history/v1/events/has-updatesGET /wp-json/simple-history/v1/events/<event-id>POST /wp-json/simple-history/v1/events/<event-id>/stickPOST /wp-json/simple-history/v1/events/<event-id>/unstick
Query Parameters for GET /events
The events endpoint supports various query parameters for filtering and pagination:
Basic Parameters
| Parameter | Type | Description |
|---|---|---|
per_page | int | Number of events per page (default: 10) |
page | int | Page number for pagination (default: 1) |
date_from | string | Filter events from this date (YYYY-MM-DD) |
date_to | string | Filter events until this date (YYYY-MM-DD) |
search | string | Search for events containing this text |
Inclusion Filters
| Parameter | Type | Description |
|---|---|---|
loggers[] | array | Include only events from these loggers |
loglevels[] | array | Include only events with these log levels |
messages[] | array | Include only specific message types (format: LoggerSlug:MessageKey) |
user | int | Include only events by this user ID |
initiator | string | Include only events by this initiator type |
Exclusion Filters (Negative Filters)
Use these parameters to exclude events matching specific criteria:
| Parameter | Type | Description |
|---|---|---|
exclude_loglevels[] | array | Exclude events with these log levels |
exclude_loggers[] | array | Exclude events from these loggers |
exclude_messages[] | array | Exclude specific message types (format: LoggerSlug:MessageKey) |
exclude_users[] | array | Exclude events by these user IDs |
exclude_initiator[] | array | Exclude events by these initiator types |
exclude_search | string | Exclude events containing this text |
Valid Initiator Values
wp_user– Regular WordPress user actionswp_cli– Actions performed via WP-CLIwp– WordPress system actions (cron jobs, automatic updates)web_user– Non-logged-in web visitorsother– Other sources
Example Requests
# Get events excluding debug level
curl -u user:app-password \
'https://example.com/wp-json/simple-history/v1/events?exclude_loglevels[]=debug'
# Get events excluding WordPress system actions
curl -u user:app-password \
'https://example.com/wp-json/simple-history/v1/events?exclude_initiator[]=wp'
# Get user events, excluding cron-related entries
curl -u user:app-password \
'https://example.com/wp-json/simple-history/v1/events?initiator=wp_user&exclude_search=cron'
# Get events excluding multiple loggers
curl -u user:app-password \
'https://example.com/wp-json/simple-history/v1/events?exclude_loggers[]=SimplePluginLogger&exclude_loggers[]=SimpleThemeLogger'Code language: PHP (php)
Note: When the same value appears in both an inclusion and exclusion filter, exclusion takes precedence.
Stats
These endpoints contain the same data as the Premium add-on uses on the Stats and Summaries page/History insights page.
/wp-json/simple-history/v1/stats/summary– Brief overview with total counts for events, users, content, media, plugins, and core updates/wp-json/simple-history/v1/stats/activity-overview– Daily activity breakdown/wp-json/simple-history/v1/stats/peak-days– High activity day analysis/wp-json/simple-history/v1/stats/peak-times– Peak activity time patterns/wp-json/simple-history/v1/stats/users– Detailed user activity insights/wp-json/simple-history/v1/stats/content– Content modification statistics/wp-json/simple-history/v1/stats/media– Media upload and management metrics/wp-json/simple-history/v1/stats/plugins– Plugin installation and update data/wp-json/simple-history/v1/stats/core– WordPress core update tracking