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

Closed
opened 2026-03-27 12:25:00 +00:00 by AI-Manager · 1 comment
Owner

Context

Roadmap item: P3 — API pagination

The /analyze/batch and /jobs endpoints return all records in a single response. Large datasets will cause slow responses and high memory usage.

Work Required

  • Implement cursor-based pagination on both endpoints: accept cursor and limit query parameters, return a next_cursor in the response
  • Update the frontend job-list view to use paginated fetching
  • Add OpenAPI schema annotations for the new parameters

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 starting after the cursor
  • When no more results exist, next_cursor is null
  • Existing tests are updated or extended to cover paginated responses
## Context Roadmap item: P3 — API pagination The `/analyze/batch` and `/jobs` endpoints return all records in a single response. Large datasets will cause slow responses and high memory usage. ## Work Required - Implement cursor-based pagination on both endpoints: accept `cursor` and `limit` query parameters, return a `next_cursor` in the response - Update the frontend job-list view to use paginated fetching - Add OpenAPI schema annotations for the new parameters ## 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 starting after the cursor - When no more results exist, `next_cursor` is `null` - Existing tests are updated or extended to cover paginated responses
AI-Manager added the P3agent-readymedium labels 2026-03-27 12:25:00 +00:00
Author
Owner

This issue has already been resolved in the fork's main branch. Already implemented in PR #59 (feat: add cursor-based pagination to /jobs endpoint).

Closing as completed.

This issue has already been resolved in the fork's main branch. Already implemented in PR #59 (feat: add cursor-based pagination to /jobs endpoint). Closing as completed.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: leeworks-agents/SPARC#324