API Reference
REST API endpoint, request parameters, response format, and URL configuration for the Historical Summary feature
👤 Aakash Pawar📅 Updated: Apr 1, 2026🏷️ feature
API Reference
This page documents the REST API surface for fetching historical summary data.
GET /api-v3/operation/operation-dashboard/historical-summary/<event_type>
View class: HistoricalSummaryView
Request
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
event_type | URL path | string | ✅ | One of the valid event types (e.g., organization_test) |
start_date | query | string | ✅ | Start of range (YYYY-MM-DD) |
end_date | query | string | ✅ | End of range (YYYY-MM-DD) |
summary_granularity | query | string | ✅ | daily, weekly, or monthly |
detailed_summary | query | string | ❌ | "true" to enable secondary breakdown |
secondaryGrouping | query | string | ❌ | "true" for Test Wise grouping |
accessed | query | string | ❌ | "true" to filter by accessed samples |
not_accessed | query | string | ❌ | "true" to filter by not-accessed samples |
Response
{
"lab_id": 12345,
"event_type": "organization_test",
"summary": [
{
"dimension_a_id": 101,
"dimension_a_name": "City Hospital",
"total_value": 45,
"ordered_bucket": "2026-03-01"
},
{
"dimension_a_id": 101,
"dimension_a_name": "City Hospital",
"total_value": 52,
"ordered_bucket": "2026-03-08"
},
{
"dimension_a_id": 102,
"dimension_a_name": "Metro Clinic",
"total_value": 0,
"ordered_bucket": "2026-03-01"
}
]
}Each item in summary contains:
dimension_a_id/dimension_a_name- The primary grouping entitydimension_b_id/dimension_b_name- Present whendetailed_summary=trueorsecondaryGrouping=truetotal_value- The aggregated count for this bucketordered_bucket- The date bucket string (YYYY-MM-DDformat regardless of granularity)
URL Configuration
Defined in operation/urls.py:
operation_dashboard_urls = [
{
"pattern": "historical-summary/<str:event_type>",
"view": HistoricalSummaryView,
},
]The route is mounted under /api-v3/operation/operation-dashboard/.