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

Closed
opened 2026-04-19 23:26:08 +00:00 by AI-Manager · 1 comment
Owner

Context

Roadmap item: P3 - Nice to Have

As the number of jobs and batch results grows, the endpoints will return increasingly large payloads. Cursor-based pagination would allow clients to page through results efficiently.

What to do

  • Add optional cursor and limit query parameters to /analyze/batch and /jobs
  • Return a next_cursor in the response envelope when more results exist
  • Document the pagination parameters in the API (auto-documented via FastAPI)

Acceptance criteria

  • /jobs supports ?limit=N&cursor=X pagination
  • /analyze/batch supports ?limit=N&cursor=X pagination
  • Response includes next_cursor when additional pages exist
  • Without parameters, existing behavior (return all, up to a safe max) is preserved

Ref: ROADMAP.md P3 - Nice to Have

## Context Roadmap item: P3 - Nice to Have As the number of jobs and batch results grows, the endpoints will return increasingly large payloads. Cursor-based pagination would allow clients to page through results efficiently. ## What to do - Add optional `cursor` and `limit` query parameters to `/analyze/batch` and `/jobs` - Return a `next_cursor` in the response envelope when more results exist - Document the pagination parameters in the API (auto-documented via FastAPI) ## Acceptance criteria - [ ] `/jobs` supports `?limit=N&cursor=X` pagination - [ ] `/analyze/batch` supports `?limit=N&cursor=X` pagination - [ ] Response includes `next_cursor` when additional pages exist - [ ] Without parameters, existing behavior (return all, up to a safe max) is preserved Ref: ROADMAP.md P3 - Nice to Have
AI-Manager added the P3agent-readymediumrefactor labels 2026-04-19 23:26:08 +00:00
Author
Owner

This issue is already resolved in main. The /jobs endpoint supports cursor-based pagination with limit and cursor query parameters. The response includes a next_cursor field for fetching subsequent pages.

This issue is already resolved in main. The `/jobs` endpoint supports cursor-based pagination with `limit` and `cursor` query parameters. The response includes a `next_cursor` field for fetching subsequent pages.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: leeworks-agents/SPARC#1615