Skip to main content
All audit endpoints are available since v1.4.0.

GET /audit

Returns paginated audit log entries in reverse chronological order. Supports filtering by action type, user, and date range.
curl -X GET "https://example.com/wp-json/wp-manager-pro/v1/audit?page=1&per_page=50" \
  -H "X-WP-Nonce: YOUR_NONCE"

Parameters

page
integer
Page number. Defaults to 1.
per_page
integer
Results per page. Defaults to 50, maximum 200.
action_type
string
Filter by a specific action slug (e.g. plugin.activated, user.login). Use GET /audit/action-types for a list of available values.
user_id
integer
Filter by WordPress user ID.
from
string
Start of the date range in Y-m-d format. Entries on or after this date are included.
to
string
End of the date range in Y-m-d format. Entries on or before this date are included.

Response

logs
array
total
integer
Total number of matching log entries.
page
integer
Current page number.
per_page
integer
Results per page.
total_pages
integer
Total number of pages.

DELETE /audit/clear

Permanently deletes all audit log entries.
This truncates the entire audit log table. All activity history is permanently removed.
curl -X DELETE https://example.com/wp-json/wp-manager-pro/v1/audit/clear \
  -H "X-WP-Nonce: YOUR_NONCE"

Response

success
boolean
Always true on success.

POST /audit/export

Exports all audit log entries as a CSV file and stores the result in a short-lived transient (120 seconds). Returns a signed download URL.
curl -X POST https://example.com/wp-json/wp-manager-pro/v1/audit/export \
  -H "X-WP-Nonce: YOUR_NONCE"

Response

success
boolean
Always true.
download_url
string
A time-limited URL to download the CSV export. Expires after 120 seconds.

GET /audit/download

Streams the exported CSV generated by POST /audit/export. The response is a CSV file download, not JSON.
Use the download_url returned by POST /audit/export directly — it includes the required key and _wpnonce query parameters.
curl -o audit-log.csv "https://example.com/wp-json/wp-manager-pro/v1/audit/download?key=KEY&_wpnonce=NONCE"

Parameters

key
string
required
The one-time download key returned by POST /audit/export.

GET /audit/action-types

Returns a list of all distinct action type slugs present in the current audit log. Use these values as the action_type filter parameter for GET /audit.
curl -X GET https://example.com/wp-json/wp-manager-pro/v1/audit/action-types \
  -H "X-WP-Nonce: YOUR_NONCE"

Response

types
array
Sorted array of distinct action slug strings present in the log (e.g. ["backup.created", "plugin.activated", "user.login"]).

Build docs developers (and LLMs) love