forked from 0xWheatyz/SPARC
Add cursor-based pagination to /analyze/batch and /jobs endpoints #1305
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?
Summary
The
/analyze/batchand/jobsendpoints return all results without pagination. Large result sets will degrade performance and response times.Work to do
/jobsand/analyze/batchusing acursorandlimitquery parameter.next_cursorfield in the response when more results are available.Acceptance criteria
/jobs?limit=20returns at most 20 results with anext_cursor.cursor=<value>returns the next page of results.next_cursor(or null).References
Roadmap: P3 — API pagination.
Already resolved.
GET /jobsendpoint supports cursor-based pagination withcursorandlimitparams.PaginatedJobsResponseincludesnext_cursor.database.py::list_jobs()handles cursor parsing. PR #59 (commitc42bf5b). Closing.