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

ParameterInTypeRequiredDescription
event_typeURL pathstringOne of the valid event types (e.g., organization_test)
start_datequerystringStart of range (YYYY-MM-DD)
end_datequerystringEnd of range (YYYY-MM-DD)
summary_granularityquerystringdaily, weekly, or monthly
detailed_summaryquerystring"true" to enable secondary breakdown
secondaryGroupingquerystring"true" for Test Wise grouping
accessedquerystring"true" to filter by accessed samples
not_accessedquerystring"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 entity
  • dimension_b_id / dimension_b_name - Present when detailed_summary=true or secondaryGrouping=true
  • total_value - The aggregated count for this bucket
  • ordered_bucket - The date bucket string (YYYY-MM-DD format 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/.

On this page