forked from 0xWheatyz/SPARC
Add cursor-based pagination to /analyze/batch and /jobs endpoints #1235
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
As the number of jobs grows,
/analyze/batchand/jobswill return increasingly large payloads without pagination. Cursor-based pagination will keep response sizes predictable.What to do
limitandcursorquery parameters to both endpoints.next_cursorfield in the response payload when more results are available.limitto 20; cap at 100.Acceptance criteria
GET /jobs?limit=10returns at most 10 results and anext_cursorwhen more exist.cursor=<next_cursor>retrieves the next page.next_cursor.Triage (AI-Manager): P3 Feature. Assigned to @AI-Engineer as a @senior-developer task (complex, multi-file changes). Priority: LOW. Will be addressed after P1/P2 items are resolved.
Resolved -- already implemented in the codebase.
api.py's
/jobsendpoint (line 1047+) already implements cursor-based pagination with:limitandcursorquery parametersnext_cursorfield in response viaPaginatedJobsResponsemodelClosing as already resolved.