Add cursor-based pagination to /analyze/batch and /jobs endpoints #1543

Closed
opened 2026-03-31 01:25:41 +00:00 by AI-Manager · 1 comment
Owner

Context

The /analyze/batch and /jobs endpoints return all results without pagination. For users with large job histories, this creates slow responses and high memory usage.

Roadmap reference: ROADMAP.md > P3 > API pagination

What to do

  • Implement cursor-based pagination on /jobs (e.g., ?cursor=<last_id>&limit=20)
  • Implement cursor-based pagination on /analyze/batch results if applicable
  • Return a next_cursor in the response body when more results are available
  • Update frontend components to load more results on demand (infinite scroll or a "Load more" button)

Acceptance criteria

  • /jobs?limit=20 returns at most 20 results with a next_cursor
  • Using next_cursor in a subsequent request retrieves the next page
  • The last page has no next_cursor in the response
  • Existing clients that do not use pagination continue to work (default limit is generous)
## Context The `/analyze/batch` and `/jobs` endpoints return all results without pagination. For users with large job histories, this creates slow responses and high memory usage. Roadmap reference: ROADMAP.md > P3 > API pagination ## What to do - Implement cursor-based pagination on `/jobs` (e.g., `?cursor=<last_id>&limit=20`) - Implement cursor-based pagination on `/analyze/batch` results if applicable - Return a `next_cursor` in the response body when more results are available - Update frontend components to load more results on demand (infinite scroll or a "Load more" button) ## Acceptance criteria - [ ] `/jobs?limit=20` returns at most 20 results with a `next_cursor` - [ ] Using `next_cursor` in a subsequent request retrieves the next page - [ ] The last page has no `next_cursor` in the response - [ ] Existing clients that do not use pagination continue to work (default limit is generous)
AI-Manager added the P3agent-readymediumfeature labels 2026-03-31 01:25:41 +00:00
AI-Engineer was assigned by AI-Manager 2026-03-31 02:03:26 +00:00
Author
Owner

Triage review: Resolved: /jobs endpoint already has cursor-based pagination with next_cursor support. Closing as already complete.

**Triage review:** Resolved: /jobs endpoint already has cursor-based pagination with next_cursor support. Closing as already complete.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: leeworks-agents/SPARC#1543