feat: allow resolving users by ID - #483
Merged
Merged
Conversation
matkaras
approved these changes
Jun 12, 2026
nieomylnieja
added a commit
to nobl9/nobl9-go
that referenced
this pull request
Jun 12, 2026
## Motivation The underlying API already allows fetching multiple users. To make fetching multiple users easier and faster for SDK callers, this PR adds a dedicated method for that API capability. ## Summary - Added `GetUsers(ctx, GetUsersRequest)` to the users v2 endpoint and generated interface, returning `[]User`. - Added `IDs []string` request filtering while keeping `GetUser` on the existing phrase lookup path. - Extended e2e coverage for fetching the current user through the ID-list lookup. ## Related Changes nobl9/sloctl#483 ## Testing - Added `Test_Users_V2_GetUsers` e2e coverage for fetching the current user by ID list. - Verified the new e2e test against the configured Nobl9 environment. ## Release Notes Added `GetUsers` to the Go SDK users v2 endpoint for fetching users by ID list.
Remove the required user ID check so `get user` can return all users. Add coverage for the new behavior and normalize shell heredoc spacing in tests.
Support `get user` with no positional arguments by returning all users up to a configurable limit. This also adds a `--limit` flag and coverage for the limited listing behavior.
nieomylnieja
added a commit
to nobl9/nobl9-go
that referenced
this pull request
Jun 16, 2026
## Motivation Allow `GetUsers` to pass a `limit` query parameter through the SDK. Without it the API is limited to 100 results and there's no way to circumvent it. ## Related changes nobl9/sloctl#483 ## Testing Expanded users v2 tests to cover fetching all users and limiting results. ## Release Notes `GetUsers` now supports a limit parameter.
Allow `get` commands to combine piped input with positional arguments for resource and user lookups, and add coverage for stdin-based project queries.
Only set the users limit when listing all users or when `--limit` is provided. This lets `get user <id>` return requested IDs without being constrained by the default page size.
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.
Motivation
Allow resolving user details by their IDs.
Summary
Added
sloctl get user USER_ID...to resolve one or more users through the Nobl9 Go SDK users endpoint and print matching user details.Updated the Nobl9 Go SDK dependency to the version that provides the users lookup API.
Added Bats e2e coverage for resolving the current configured user through the CLI.
Related Changes
nobl9/nobl9-go#943
Testing
Added Bats e2e coverage for
sloctl get userusing the current configured user ID.Live Bats e2e tests were not run because they talk to the Nobl9 platform API and require explicit permission per
AGENTS.md.Release Notes
Added
sloctl get usercommand to resolve user details for one or more user IDs. No user IDs results in returning all users.