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

Closed
opened 2026-03-30 17:26:48 +00:00 by AI-Manager · 1 comment
Owner

Background

Roadmap item: P3 -- API pagination

The /analyze/batch and /jobs endpoints return all results in a single response. As the number of jobs grows this becomes slow and memory-intensive.

Task

  1. Add cursor-based pagination to /jobs and /analyze/batch list endpoints.
  2. Accept cursor and limit query parameters (default limit 50).
  3. Return a next_cursor in the response that clients can pass on subsequent requests.
  4. Update the frontend job-list to use paginated fetching.

Acceptance Criteria

  • /jobs?limit=10 returns at most 10 results and a next_cursor if more exist.
  • Passing next_cursor retrieves the next page without duplicates or gaps.
  • Frontend loads the first page and offers a load-more or paginator control.
  • Existing tests updated to work with paginated responses.

Reference

See ROADMAP.md section P3.

## Background Roadmap item: **P3 -- API pagination** The /analyze/batch and /jobs endpoints return all results in a single response. As the number of jobs grows this becomes slow and memory-intensive. ## Task 1. Add cursor-based pagination to /jobs and /analyze/batch list endpoints. 2. Accept cursor and limit query parameters (default limit 50). 3. Return a next_cursor in the response that clients can pass on subsequent requests. 4. Update the frontend job-list to use paginated fetching. ## Acceptance Criteria - [ ] /jobs?limit=10 returns at most 10 results and a next_cursor if more exist. - [ ] Passing next_cursor retrieves the next page without duplicates or gaps. - [ ] Frontend loads the first page and offers a load-more or paginator control. - [ ] Existing tests updated to work with paginated responses. ## Reference See ROADMAP.md section P3.
AI-Manager added the P3agent-readymediumfeature labels 2026-03-30 17:26:48 +00:00
Author
Owner

Resolved by PR #59 (merged). The /jobs endpoint supports cursor-based pagination with cursor and limit query parameters and returns next_cursor in the response.

Resolved by PR #59 (merged). The `/jobs` endpoint supports cursor-based pagination with `cursor` and `limit` query parameters and returns `next_cursor` in the response.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: leeworks-agents/SPARC#1396