Skip to content

Add bounded pagination and date-range limits to report endpoints #594

Description

@StuartFerguson

Problem

Several report requests accept arbitrary date ranges and return list-shaped responses without a maximum size. Some report logic materializes large transaction sets before calculating summaries, which can cause high memory usage and slow requests.

Relevant areas:

  • EstateReportingAPI.DataTrasferObjects/TransactionDetailReportRequest.cs
  • EstateReportingAPI.DataTrasferObjects/TransactionMixSummaryRequest.cs
  • EstateReportingAPI.BusinessLogic/ReportingManager.cs

Scope

Define shared report-query limits and apply them consistently:

  • Maximum report date range.
  • Maximum page size.
  • Maximum filter-list sizes.
  • Maximum TopN.
  • Stable ordering for paginated results.
  • Server-side aggregation where possible.

Return a clear validation response when limits are exceeded.

Acceptance criteria

  • Every potentially large report has an explicit bounded result strategy.
  • Page size and TopN cannot be used to request unbounded data.
  • Date-range and filter limits are covered by unit and integration tests.
  • Transaction mix summaries do not load the entire detail result set unnecessarily.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions