Reports and Scheduled Reports API #
GET /analytics/reports #
List all saved reports in the Report Library.
URL: GET /wp-json/dmsilm/v1/analytics/reports
Response: Array of report objects (id, title, report_type, created_at, last_run_at).
POST /analytics/reports #
Save a new custom report configuration.
URL: POST /wp-json/dmsilm/v1/analytics/reports
Body:
{
"title": "My Revenue Report",
"report_type": "revenue",
"config": {
"data_source": "revenue",
"metrics": ["mrr", "arr", "total_revenue"],
"visualization": "line",
"filters": { "product_id": null }
}
}
POST /analytics/reports/{id}/execute #
Run a saved report and return results.
URL: POST /wp-json/dmsilm/v1/analytics/reports/15/execute
Body:
{
"date_from": "2026-02-01",
"date_to": "2026-02-28"
}
Scheduled Reports API #
GET /analytics/scheduled #
List all scheduled reports.
POST /analytics/scheduled #
Create a new schedule. Body includes: report_id, frequency, schedule_config, recipients, format, status.
