forked from 0xWheatyz/SPARC
Add cursor-based pagination to /analyze/batch and /jobs endpoints #681
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 the number of batch jobs and analysis results grows, the
/analyze/batchand/jobsendpoints will return increasingly large payloads, degrading performance and usability.What to do
cursor(opaque token encoding the last-seen ID) andlimit(default 20, max 100) query parameters.next_cursorfield in the response when more results are available.Acceptance criteria
cursorandlimitquery parameters.next_cursorwhen a next page exists, andnull/absent when on the last page.References
Roadmap item: P3 — API pagination.
Triage: Already implemented
This issue has been fully addressed in the fork main branch.
Verification:
/jobsendpoint inSPARC/api.pyandSPARC/database.py.Closing.