Skip to main content
The /history endpoint returns a list of completed and removed downloads from the download history.

Endpoint

GET /history

Authentication

Requires Bearer token authentication.

Parameters

No parameters required.

Response

Returns an array of historical download records.
id
string
Unique identifier for the download
url
string
Original download URL
filename
string
Name of the downloaded file
path
string
Full path where the file was saved
size
integer
Total file size in bytes
status
string
Final status - typically "complete" or "removed"
completed_at
string
ISO 8601 timestamp when the download completed

Example Request

curl http://localhost:1700/history \
  -H "Authorization: Bearer YOUR_TOKEN"

Example Response

[
  {
    "id": "abc123",
    "url": "https://example.com/file1.zip",
    "filename": "file1.zip",
    "path": "/home/user/Downloads/file1.zip",
    "size": 104857600,
    "status": "complete",
    "completed_at": "2024-03-15T10:30:00Z"
  },
  {
    "id": "def456",
    "url": "https://example.com/file2.zip",
    "filename": "file2.zip",
    "path": "/home/user/Downloads/file2.zip",
    "size": 52428800,
    "status": "complete",
    "completed_at": "2024-03-15T09:15:00Z"
  }
]

Status Codes

CodeDescription
200History retrieved successfully
401Invalid or missing authentication token
500Server error retrieving history

Use Cases

  • Audit Trail: Review what files have been downloaded
  • Statistics: Calculate total downloaded bytes or download counts
  • Reporting: Generate download activity reports
  • Cleanup Verification: Confirm removed downloads are no longer active

Notes

  • History persists across server restarts (stored in SQLite database)
  • Completed downloads remain in history indefinitely
  • Removed downloads appear in history with status "removed"
  • Use List to see active/paused/queued downloads instead
  • List - View active downloads
  • Delete - Remove a download (moves to history)