✨ Add URI-based repository methods to support federated architecture#75
Merged
CalebGerman merged 19 commits intomainfrom Jan 28, 2026
Merged
✨ Add URI-based repository methods to support federated architecture#75CalebGerman merged 19 commits intomainfrom
CalebGerman merged 19 commits intomainfrom
Conversation
- Added `getRepositoryResourcesByUri` and `getRepositoryResourceByUri` methods to support federated repository architecture. - Updated existing methods to deprecate `getRepositoryResource` and `getRepositoryResources`, providing migration examples in documentation. - Enhanced `RepositoryCapabilities` interface to include graphics capabilities. - Implemented tests for new URI-based methods, including resource retrieval and graphics metadata access. - Added backward compatibility tests to ensure deprecated methods still function correctly. - Introduced migration pattern tests to demonstrate transitioning from deprecated to new methods.
davidbryant222
requested changes
Jan 27, 2026
Collaborator
davidbryant222
left a comment
There was a problem hiding this comment.
I just had one comment. Other than that it looks good.
wsm95
reviewed
Jan 27, 2026
wsm95
approved these changes
Jan 28, 2026
davidbryant222
approved these changes
Jan 28, 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.
Pull Request Summary: URI-Based Repository Methods & Federated Architecture Support
Overview
This PR adds URI-based repository methods and secure HTTP 302 redirect handling to support Bentley's federated API architecture. Client code can now seamlessly work with distributed repository services across different backend systems.
🎯 Key Features
1. URI-Based Repository Methods
Three new methods accept capability URIs directly from repository metadata:
getRepositoryResourcesByUri()- Retrieve multiple resources with OData supportgetRepositoryResourceByUri()- Retrieve single resourcegetResourceGraphicsByUri()- Retrieve graphics metadata2. HTTP 302 Redirect Support
Repository resource endpoints now automatically follow redirects:
getRepositoryResource()getRepositoryResources()getResourceGraphics()3. Secure Redirect Handling
Security features ensure safe credential forwarding within Bentley's trust boundary:
api.bentley.comand subdomains allowed🏗️ Architecture
Federated routing enables specialized services for different resource types:
All Bentley subdomains share the same trust boundary with consistent token validation.
📝 API Changes
Added abstract methods to
BaseITwinsApiClientand fixedupdateRepositorysignature to use proper Partial type.🔒 Security
Implements OWASP best practices:
🚀 Usage
📊 Benefits
✅ Summary
Type: ✨ Feature | Breaking Changes: None | Security: Enhanced