feat: add find command for catalog search#174
Open
nadavs123 wants to merge 21 commits intomicrosoft:mainfrom
Open
feat: add find command for catalog search#174nadavs123 wants to merge 21 commits intomicrosoft:mainfrom
find command for catalog search#174nadavs123 wants to merge 21 commits intomicrosoft:mainfrom
Conversation
added 21 commits
February 9, 2026 17:51
Features: - Search across all workspaces by displayName, workspaceName, or description - Filter by item type with --type flag - Limit results with --limit flag - Detailed output with --detailed flag (includes id, workspaceId) - Custom endpoint support with --endpoint flag or FAB_CATALOG_ENDPOINT env var Output columns (default): name, type, workspace, description Output columns (detailed): + workspaceId, id Required scope: Catalog.Read.All Unsupported types: Dashboard, Dataflow, Scorecard Includes unit tests (12 tests passing)
…dling Changes based on issue microsoft#172 feedback: - Changed --type from comma-separated to nargs='+' (space-separated) - Removed --endpoint flag (use internal mechanism instead) - Added FabricCLIError for invalid/unsupported item types - Added error handling for API failures - Updated tests to match new patterns (15 tests passing)
- Added complete_item_types() completer for searchable types - Tab completion excludes unsupported types (Dashboard, Dataflow, Scorecard) - Restored unsupported type validation with clear error message - Updated ALL_ITEM_TYPES list from official API spec - Added SEARCHABLE_ITEM_TYPES for valid filter types - 20 tests passing
- Keep tab-completion for --type flag - Custom FabricCLIError for unsupported types (Dashboard, Dataflow, Scorecard) - Custom FabricCLIError for unknown types - Cleaner error messages vs argparse choices listing all 40+ types - 22 tests passing
- Changed from data= to json= for request payload - Added raw_response=True to avoid auto-pagination hanging - Added fallback from displayName to name (API bug workaround) - Updated tests to use dict instead of JSON string - Successfully tested against dailyapi.fabric.microsoft.com
…, workspace_id, description)
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
Closes #172
Summary
Adds a new
findcommand that searches for Fabric items across all accessible workspaces using the Catalog Search API (POST /v1/catalog/search).Usage
Flags
--type--max-items-l/--long--next-tokenImplementation details
@fab_commanddecorator,print_output_format(),FabricCLIError--typeviaargcomplete--max-itemsvalidation (1-1000)-l) mode--next-token(continuation token approach)Files added
src/fabric_cli/client/fab_api_catalog.py— API clientsrc/fabric_cli/commands/find/__init__.py— Package initsrc/fabric_cli/commands/find/fab_find.py— Command logicsrc/fabric_cli/parsers/fab_find_parser.py— Argument parsertests/test_commands/find/__init__.py— Test package inittests/test_commands/find/test_find.py— 22 unit tests.changes/unreleased/added-20260209-171617.yaml— Changie entryFiles modified
src/fabric_cli/core/fab_parser_setup.py— Register find parserNotes
Dataflow)ReportCatalog.Read.Allscope (not yet added to CLI app registration)