Skip to content

Serve household reports through /v2/reports #4291

Closed

Description

@anth-volk

/v2/reports should serve reports over household simulations, with no separate household-report route.

  • POST /v2/reports with kind household takes a household stored through /v2/households, the year, a baseline policy and an optional reform policy, and add_missing_variables, for any country whose countries row has household_enabled, including a household-only one. The Public API checks the country, the household and the policies before it asks the simulation service to create the report and its two household simulations through its POST /reports.
  • GET /v2/reports/{report_id} and GET /v2/reports?report_id=… read a household report from the detailed-save tables: its newest run and, once that run has succeeded, each simulation run's calculated household (simulation_runs.household_result).

This replaces #4132, which was built on the simulation service's /v2/household-reports routes. The redesign removed those routes: a household report is now a report over household simulations, created through the simulation service's /reports.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions