feat(BA-5590): add paginated REST v2 project scoped search endpoints#10787
Closed
feat(BA-5590): add paginated REST v2 project scoped search endpoints#10787
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Adds REST v2 handlers and routes for paginated “scoped” project search, enabling clients to search projects within a domain or within a user’s memberships.
Changes:
- Register two new POST routes under
/v2/projectsfor domain-scoped and user-scoped search. - Add REST handlers that forward requests to the project adapter.
- Implement adapter methods that convert request DTOs into offset pagination queries and return paginated payloads.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 8 comments.
| File | Description |
|---|---|
src/ai/backend/manager/api/rest/v2/project/registry.py |
Registers the new scoped search endpoints and wires them to handlers. |
src/ai/backend/manager/api/rest/v2/project/handler.py |
Adds REST handlers for domain/user scoped project search. |
src/ai/backend/manager/api/adapters/project.py |
Implements adapter-side scoped search logic and pagination payload mapping. |
changes/10787.feature.md |
Adds changelog entry for the new paginated scoped search endpoints. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
5092cc3 to
c83f7b9
Compare
Member
Author
|
redundant. bridge holds superadmin credentials anyways. |
This was referenced Apr 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
resolves #10785 (BA-5590)
Add two new paginated REST v2 endpoints for project-scoped search:
POST /v2/projects/domains/{domain_name}/search-- search projects within a domainPOST /v2/projects/users/{user_id}/search-- search projects a user belongs toBoth endpoints accept offset-based pagination (
limit/offset), filters, and ordering viaSearchProjectsRequest. The implementation adds:ProjectAdapter.domain_search()andProjectAdapter.user_search()adapter methods, plus a shared_build_search_querier()helper that converts the request DTO into aBatchQuerierwithOffsetPagination.V2ProjectHandler.domain_search()andV2ProjectHandler.user_search()REST handler methods.auth_required).The underlying processor actions (
SearchProjectsByDomainAction,SearchProjectsByUserAction) already exist on the epic branch; this PR wires them to the REST v2 surface.Checklist: (if applicable)