Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: reunify discover endpoints #686

Open
migmartri opened this issue Apr 23, 2024 · 0 comments
Open

feat: reunify discover endpoints #686

migmartri opened this issue Apr 23, 2024 · 0 comments

Comments

@migmartri
Copy link
Member

migmartri commented Apr 23, 2024

Currently, the referrer API service contains two endpoints, one public and one private

service ReferrerService {
// DiscoverPrivate returns the referrer item for a given digest in the organizations of the logged-in user
rpc DiscoverPrivate(ReferrerServiceDiscoverPrivateRequest) returns (ReferrerServiceDiscoverPrivateResponse);
// DiscoverPublicShared returns the referrer item for a given digest in the public shared index
rpc DiscoverPublicShared(DiscoverPublicSharedRequest) returns (DiscoverPublicSharedResponse) {
option (google.api.http) = {get: "/discover/{digest}"};
}
}

The private one returns information from any of your organizations while the public one only information stored in the public index.

There is a common use-case where we want to call both the private and the public one and merge the results, this requires two API calls.

We could look into extending the private endpoint to support a flag that says smth like include_public that internally will make sure it also fetches the info from the public index.

We could look into having a single endpoint but that will require more work since one of them does not have any authorization, and will require many core changes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant