You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Implement pagination for access control GET methods #113
GET /permissions currently accepts only limit and returns a bare list sorted by $natural. For v0.14.0, we would implement page-based pagination as per the GA4GH API pagination guide. The guide recommends page-based pagination for random seeking and flexible client queries, and token-based pagination for streaming large result sets; permission rule sets are small to medium-sized and typically browsed by admins, so page-based is the better fit (and maps directly to MongoDB skip/limit and count_documents).
Query parameters page_size (default 100, maximum 1000) and page (starting at 0, default 0).
Stable order by _id (insertion order), not $natural.
400 for a page beyond the available results (except page 0 of an empty result set) and for a page_size above the maximum, as recommended by the guide.
The limit parameter is removed.
Consistency between pages is not guaranteed if rules change in between; this is documented, as required by the guide.
Acceptance criteria
Spec updated (page_size, page, response schema with results and pagination); limit removed.
Tests: iterating all pages returns every rule exactly once; total/total_pages are correct; out-of-range page and too large page_size yield 400; empty result set yields page 0 with total 0.
Docs and permissions API examples updated, including the note on consistency.
Breaking changes
The list endpoint returns an object instead of a list, and limit is gone. Admin scripts and UIs that call GET /permissions must read results and request further pages.
Activity
uniqueg commentedon Oct 18, 2026
Refined proposal
GET /permissionscurrently accepts onlylimitand returns a bare list sorted by$natural. For v0.14.0, we would implement page-based pagination as per the GA4GH API pagination guide. The guide recommends page-based pagination for random seeking and flexible client queries, and token-based pagination for streaming large result sets; permission rule sets are small to medium-sized and typically browsed by admins, so page-based is the better fit (and maps directly to MongoDBskip/limitandcount_documents).page_size(default 100, maximum 1000) andpage(starting at 0, default 0).{ "results": [...], "pagination": {"page": 0, "page_size": 100, "total": 16, "total_pages": 1} }_id(insertion order), not$natural.400for apagebeyond the available results (except page 0 of an empty result set) and for apage_sizeabove the maximum, as recommended by the guide.limitparameter is removed.Acceptance criteria
page_size,page, response schema withresultsandpagination);limitremoved.total/total_pagesare correct; out-of-rangepageand too largepage_sizeyield 400; empty result set yields page 0 withtotal0.Breaking changes
The list endpoint returns an object instead of a list, and
limitis gone. Admin scripts and UIs that callGET /permissionsmust readresultsand request further pages.Planned PR
4 (
refactor(access-control): tidy permissions API).