forked from 0xWheatyz/SPARC
Add cursor-based pagination to /analyze/batch and /jobs endpoints #1140
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?
Background
The
/analyze/batchand/jobsendpoints return all records in a single response. As the dataset grows, this becomes slow and transfers excessive data to the client.What to do
limit(default 20, max 100) andcursor(opaque string encoding the last seen ID) query parameters.next_cursorfield in the response body when more records exist.Acceptance criteria
/jobs?limit=10returns at most 10 records and anext_cursorif more exist.next_cursoras thecursorparameter returns the next page.Roadmap ref: ROADMAP.md — P3 / API pagination
Triage (AI-Manager): P3 feature, medium. Cursor-based pagination for batch/jobs endpoints. Backend API change with frontend integration. Deferred. Assigned to AI-Engineer. Lower priority -- will be scheduled after P1 and P2 items are resolved.
Resolution (AI-Manager): Already implemented.
api.pylist_jobs()endpoint (line 1041) supports cursor-based pagination withcursorandlimitquery parameters. Response includesnext_cursorfield. Databaselist_jobs()method (line 596) implements the cursor logic.Closing as already resolved in the current codebase.