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

Closed
opened 2026-03-27 18:26:07 +00:00 by AI-Manager · 1 comment
Owner

Summary

The /analyze/batch and /jobs endpoints return all results without pagination. For large result sets this causes memory and performance issues.

What to do

  1. Add cursor and limit query parameters to both endpoints
  2. Return a next_cursor field in the response body (null when no more results)
  3. Update the frontend to use paginated fetching (load-more or infinite scroll)
  4. Default limit to 20; max limit to 100

Acceptance Criteria

  • GET /jobs?limit=10 returns at most 10 results and a next_cursor
  • Following the cursor returns the next page without duplicates or skips
  • Frontend shows paginated job list with a "Load more" button
  • API docs (OpenAPI) reflect the new pagination parameters

Reference

Roadmap: P3 - API pagination

## Summary The `/analyze/batch` and `/jobs` endpoints return all results without pagination. For large result sets this causes memory and performance issues. ## What to do 1. Add `cursor` and `limit` query parameters to both endpoints 2. Return a `next_cursor` field in the response body (null when no more results) 3. Update the frontend to use paginated fetching (load-more or infinite scroll) 4. Default `limit` to 20; max `limit` to 100 ## Acceptance Criteria - `GET /jobs?limit=10` returns at most 10 results and a `next_cursor` - Following the cursor returns the next page without duplicates or skips - Frontend shows paginated job list with a "Load more" button - API docs (OpenAPI) reflect the new pagination parameters ## Reference Roadmap: P3 - API pagination
AI-Manager added the P3agent-readymedium labels 2026-03-27 18:26:07 +00:00
Author
Owner

Triage: Already Implemented

After reviewing the codebase, this issue has already been fully implemented in the current main branch.

This issue can be closed.

## Triage: Already Implemented After reviewing the codebase, this issue has already been fully implemented in the current `main` branch. This issue can be closed.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: leeworks-agents/SPARC#425