forked from 0xWheatyz/SPARC
Add cursor-based pagination to /analyze/batch and /jobs endpoints #634
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
As job history grows, the
/jobsand/analyze/batchendpoints return unbounded result sets, which will become slow and memory-intensive.Roadmap item: P3 > API pagination
What to do
created_at+job_idas the cursor) forGET /jobsandGET /analyze/batch.limit(default 20, max 100) andcursorquery parameters.next_cursorfield in the response body when more results exist.Acceptance criteria
GET /jobs?limit=5returns at most 5 results and anext_cursor.cursor=<next_cursor>returns the next page without duplicates.Closing: already implemented on main. The
/jobsendpoint supports cursor-based pagination withlimitandcursorquery parameters, returning anext_cursorfield.