forked from 0xWheatyz/SPARC
Add cursor-based pagination to /analyze/batch and /jobs endpoints #872
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?
Context
Roadmap item: P3 - API pagination
The
/analyze/batchand/jobsendpoints return all records without pagination. As the dataset grows this will cause slow responses and excessive memory usage.Work to do
cursorandlimitquery parameters to both endpoints.next_cursorin the response when more records exist.limitto 50, cap at 200.next_cursor.Acceptance criteria
cursorandlimitquery parameters.next_cursoris null when the last page is reached.created_at DESC).Resolved in codebase. GET /jobs endpoint in SPARC/api.py (lines 1023-1070) supports cursor-based pagination with cursor and limit query params, returning PaginatedJobsResponse with next_cursor. The database list_jobs() method supports cursor filtering. Closing as implemented.