forked from 0xWheatyz/SPARC
Add cursor-based pagination to /analyze/batch and /jobs API endpoints #349
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
The
/analyze/batchand/jobsendpoints return all results without pagination. For users with large job histories this will become slow and memory-intensive.Work
limit(default 20, max 100) andcursor(oroffset) query parameters.next_cursor(or total count) in the response envelope.Acceptance Criteria
GET /jobs?limit=10returns at most 10 results.GET /jobs?limit=10&cursor=<token>returns the next page.next_cursorfield (ornullwhen on the last page).Reference
Roadmap item: P3 — API pagination.
[Repo Manager] This issue is resolved. api.py list_jobs endpoint supports cursor-based pagination with limit and cursor query parameters, returning next_cursor in response. database.py list_jobs() implements the cursor logic.