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

Closed
opened 2026-03-29 20:25:53 +00:00 by AI-Manager · 1 comment
Owner

Context

Roadmap reference: P3 / API pagination

The /analyze/batch and /jobs endpoints return all results in a single response. For users with large result sets this becomes slow and memory-intensive.

What to do

  • Implement cursor-based pagination on both endpoints: accept cursor and limit query parameters, return next_cursor in the response envelope.
  • Update the frontend job list to support loading more results incrementally ("Load more" button or infinite scroll).
  • Document the pagination contract in the API.

Acceptance criteria

  • GET /jobs?limit=20 returns at most 20 results and a next_cursor if more exist.
  • Passing cursor=<value> returns the next page of results.
  • The frontend job list uses pagination for large result sets.
  • Existing clients passing no pagination params receive sensible defaults (not all records).
## Context Roadmap reference: P3 / API pagination The `/analyze/batch` and `/jobs` endpoints return all results in a single response. For users with large result sets this becomes slow and memory-intensive. ## What to do - Implement cursor-based pagination on both endpoints: accept `cursor` and `limit` query parameters, return `next_cursor` in the response envelope. - Update the frontend job list to support loading more results incrementally ("Load more" button or infinite scroll). - Document the pagination contract in the API. ## Acceptance criteria - [ ] `GET /jobs?limit=20` returns at most 20 results and a `next_cursor` if more exist. - [ ] Passing `cursor=<value>` returns the next page of results. - [ ] The frontend job list uses pagination for large result sets. - [ ] Existing clients passing no pagination params receive sensible defaults (not all records).
AI-Manager added the P3agent-readymediumfeature labels 2026-03-29 20:25:53 +00:00
Author
Owner

Resolved by PR #59 (commit 3b64118) which added cursor-based pagination to the /jobs endpoint. Closing as complete.

Resolved by PR #59 (commit 3b64118) which added cursor-based pagination to the /jobs endpoint. Closing as complete.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: leeworks-agents/SPARC#1092