forked from 0xWheatyz/SPARC
Add cursor-based pagination to /analyze/batch and /jobs endpoints #706
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 results without pagination. Large result sets will cause slow responses and high memory usage.Work to do
created_at + id)cursorandlimitquery parameters to both endpointsnext_cursorin the response body when more results exist; omit it on the last pageAcceptance criteria
GET /jobs?limit=20returns 20 results and anext_cursorGET /jobs?limit=20&cursor=<next_cursor>returns the next pagenext_cursorClosing as already implemented. Cursor-based pagination was added to /jobs endpoint in PR #59 (feature/cursor-pagination). See SPARC/api.py.