Problem
AdminService can list entire collections (ListAllUsers, ListAllServiceUsers, ListAllOrganizations), but there's no way to resolve a known set of IDs to entities in a single call. Given a list of IDs, the options today are to issue N single Get calls or to list a whole collection and filter — N round-trips, or over-fetching.
Proposal
Add batch get-by-IDs RPCs to AdminService (superuser-gated, consistent with the existing ListAll* admin RPCs, since these are cross-org lookups that aren't org-scoped):
BatchGetUsers(user_ids: []string) → users: []User
BatchGetServiceUsers(service_user_ids: []string) → service_users: []ServiceUser
BatchGetProjects(project_ids: []string) → projects: []Project
Each takes a repeated ID field and returns the matching existing entity messages. A bounded max number of IDs per request (like BatchCheckPermission) would be reasonable.
Notes
- The lookup already exists internally —
GetByIDs is implemented in core/user, core/serviceuser, and core/group; it just isn't exposed at the API layer. (core/group could get a BatchGetGroups too if useful.)
core/project would need a batch lookup added; it currently has only single Get and a filtered List.
Problem
AdminServicecan list entire collections (ListAllUsers,ListAllServiceUsers,ListAllOrganizations), but there's no way to resolve a known set of IDs to entities in a single call. Given a list of IDs, the options today are to issue N singleGetcalls or to list a whole collection and filter — N round-trips, or over-fetching.Proposal
Add batch get-by-IDs RPCs to
AdminService(superuser-gated, consistent with the existingListAll*admin RPCs, since these are cross-org lookups that aren't org-scoped):BatchGetUsers(user_ids: []string) → users: []UserBatchGetServiceUsers(service_user_ids: []string) → service_users: []ServiceUserBatchGetProjects(project_ids: []string) → projects: []ProjectEach takes a repeated ID field and returns the matching existing entity messages. A bounded max number of IDs per request (like
BatchCheckPermission) would be reasonable.Notes
GetByIDsis implemented incore/user,core/serviceuser, andcore/group; it just isn't exposed at the API layer. (core/groupcould get aBatchGetGroupstoo if useful.)core/projectwould need a batch lookup added; it currently has only singleGetand a filteredList.