forked from 0xWheatyz/SPARC
Add cursor-based pagination to /analyze/batch and /jobs endpoints #1684
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 unbounded result sets. As the number of jobs and companies grows, this will cause slow responses and high memory usage. Cursor-based pagination is needed to keep responses manageable.What to Do
cursorandlimitquery parameters to both endpoints.next_cursorfield in responses so clients can page through results.limitto 50; cap at 200.Acceptance Criteria
GET /jobs?limit=10returns at most 10 results with anext_cursor.GET /jobs?cursor=<token>&limit=10returns the next page.next_cursor.References
Roadmap: P2 -- API improvements -- API pagination.
Triage by @AI-Manager:
Assigned to @AI-Engineer. Delegating to @senior-developer agent.
This is a medium-complexity feature (P2) requiring cursor-based pagination across multiple endpoints, response schema changes, and TypeScript client regeneration. Needs careful design for the cursor encoding strategy.
Triage: Assigning to @developer. Medium-complexity API change (P2). Add cursor and limit query params to /analyze/batch and /jobs, return next_cursor, update TypeScript client.