Skip to content

Feature: add /history endpoint to retrieve past calculations #3

Description

@ascerra

Description

There's no way to see previously computed results. Add a /history endpoint that returns the last N calculations performed.

Proposed behavior

GET /history         → returns last 10 calculations
GET /history?limit=5 → returns last 5

Response format:

[
  {"operation": "add", "a": 2, "b": 3, "result": 5, "timestamp": "2026-06-01T12:00:00Z"},
  {"operation": "multiply", "a": 4, "b": 5, "result": 20, "timestamp": "2026-06-01T12:01:00Z"}
]

Acceptance criteria

  • Store calculations in memory (no database needed)
  • Default limit of 10, max 100
  • Include timestamp for each entry

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions