Telemetry — MANDATORY. Every api.fabric.microsoft.com call must carry
x-ms-fabric-skill: search-consumption-cli (az rest: --headers "x-ms-fabric-skill=search-consumption-cli"),
including every LRO poll, fabric_lro and retry. Snippets omit it — add it anyway.
CRITICAL NOTES
- The Catalog Search API finds items, not workspaces. To find a workspace by name, use
GET /v1/workspaces (see COMMON-CLI.md § Resolve Workspace Properties by Name).
- The search text matches against item display name, description, and workspace name.
- Dataflow (Gen1) and Dataflow (Gen2) are not supported.
Catalog Search — CLI Skill
Prerequisite Knowledge
Table of Contents
Must/Prefer/Avoid
MUST DO
PREFER
- Catalog Search over list-and-filter — single cross-workspace call, no need to resolve workspace first.
- Type filters — narrow results with
"filter": "Type eq 'Lakehouse'" to reduce noise.
- Empty search with type filter — to list all items of a type across workspaces.
jq for extracting IDs from the response — cleaner than JMESPath for nested hierarchy.workspace.
AVOID
- Searching for workspaces — the Catalog Search API returns items, not workspaces. Use
GET /v1/workspaces instead (see COMMON-CLI.md § Resolve Workspace Properties by Name).
- Querying source data after the workspace/item is known — route to the workload-specific consumption skill (
sqldw-cli, spark-cli, eventhouse-cli, or fabriciq) instead of Catalog Search.
- Inventing filter syntax — only
eq, ne, or, and parentheses are supported.
- Assuming all item types are supported — Dataflow (Gen1) and Dataflow (Gen2) are not returned yet.
Search for an Item
cat > /tmp/body.json << 'EOF'
{"search": "SalesLakehouse", "filter": "Type eq 'Lakehouse'", "pageSize": 10}
EOF
az rest --method post \
--resource "https://api.fabric.microsoft.com" \
--url "https://api.fabric.microsoft.com/v1/catalog/search" \
--body @/tmp/body.json
The search text matches against item display name, description and workspace name. Type filtering is optional. The response includes id, type, displayName, description, and hierarchy.workspace (with id and displayName) for each match.
Extract item and workspace IDs
az rest --method post \
--resource "https://api.fabric.microsoft.com" \
--url "https://api.fabric.microsoft.com/v1/catalog/search" \
--body @/tmp/body.json \
--query "value[0].{itemId:id, workspaceId:hierarchy.workspace.id, name:displayName}" \
--output json
Filter Examples
| Goal |
Filter |
| Only lakehouses |
Type eq 'Lakehouse' |
| Reports or semantic models |
Type eq 'Report' or Type eq 'SemanticModel' |
| Exclude notebooks |
Type ne 'Notebook' |
For the full list of supported item types, see the Catalog Search API reference.
List All Items of a Type
Use an empty search string with a type filter (pageSize max is 1000):
cat > /tmp/body.json << 'EOF'
{"search": "", "filter": "Type eq 'Lakehouse'", "pageSize": 100}
EOF
az rest --method post \
--resource "https://api.fabric.microsoft.com" \
--url "https://api.fabric.microsoft.com/v1/catalog/search" \
--body @/tmp/body.json
Pagination
If the response includes a non-null continuationToken, pass it in the next request:
cat > /tmp/body.json << 'EOF'
{"search": "", "filter": "Type eq 'Lakehouse'", "pageSize": 100, "continuationToken": "<token>"}
EOF
az rest --method post \
--resource "https://api.fabric.microsoft.com" \
--url "https://api.fabric.microsoft.com/v1/catalog/search" \
--body @/tmp/body.json
Continue until continuationToken is null.
Agentic Workflow
- Ask — user provides an item name, type, or description keywords.
- Search — call Catalog Search with the user's input and optional type filter.
- Disambiguate — if multiple matches, present results (name, type, workspace) and ask the user to pick.
- Return — provide the search results, include the item
id and hierarchy.workspace.id for downstream use.
Examples
Find a specific report
cat > /tmp/body.json << 'EOF'
{"search": "Monthly Sales Revenue", "filter": "Type eq 'Report'", "pageSize": 10}
EOF
az rest --method post \
--resource "https://api.fabric.microsoft.com" \
--url "https://api.fabric.microsoft.com/v1/catalog/search" \
--body @/tmp/body.json \
--query "value[].{name:displayName, type:type, workspace:hierarchy.workspace.displayName}" \
--output table
List all semantic models across workspaces
cat > /tmp/body.json << 'EOF'
{"search": "", "filter": "Type eq 'SemanticModel'", "pageSize": 1000}
EOF
az rest --method post \
--resource "https://api.fabric.microsoft.com" \
--url "https://api.fabric.microsoft.com/v1/catalog/search" \
--body @/tmp/body.json
Save search results to file
cat > /tmp/body.json << 'EOF'
{"search": "", "filter": "Type eq 'Lakehouse'", "pageSize": 1000}
EOF
az rest --method post \
--resource "https://api.fabric.microsoft.com" \
--url "https://api.fabric.microsoft.com/v1/catalog/search" \
--body @/tmp/body.json \
--query "value[].{name:displayName, type:type, workspace:hierarchy.workspace.displayName, id:id}" \
--output json > /tmp/search_results.json
Gotchas and Troubleshooting
| Symptom |
Cause |
Fix |
401 Unauthorized |
Wrong token audience or expired session |
Verify --resource "https://api.fabric.microsoft.com". Run az login. |
InvalidPageSize |
pageSize outside 1–1000 |
Use a value between 1 and 1000. |
InvalidFilter |
Bad filter syntax |
Only eq, ne, or, and parentheses. Don't mix eq with and, or ne with or. Don't mix eq and ne in the same filter. |
TypeNotFound |
Unrecognized item type in filter |
Check spelling (case-sensitive). See API reference for valid types. |
FilterTooManyValues |
Filter has more than 500 values |
Reduce the number of type values in the filter. |
InvalidRequest |
Missing request body |
Ensure --body points to a valid JSON file. |
| Empty results for known item |
Item type not supported |
Dataflow Gen1/Gen2 are excluded. Use GET /v1/workspaces/{id}/items instead. |
| New item not found |
Catalog index propagation delay |
Indexing lag is variable and not yet near-real-time — usually minutes, but not guaranteed. A just-created item may not appear in search results yet; verify it exists via GET /v1/workspaces/{id}/items instead. |
| Too many results |
Search text too broad |
Add a type filter or use more specific search text. |
1---2name: search-consumption-cli3description: Search the Microsoft Fabric catalog across workspaces using the Fabric Catalog Search API. Use when the user wants to: (1) find an item by display name when the workspace is unknown, (2) list or discover items of a specific type across the tenant, (3) identify which workspace contains an item, (4) return item/workspace IDs for downstream API calls. Dataflow Gen1/Gen2 items are not supported. For data queries after the item is known, use the workload-specific consumption skill (`sqldw-cli`, `spark-cli`, `eventhouse-cli`, or `fabriciq`). Triggers: "catalog search", "fabric catalog search", "catalog lookup", "cross workspace catalog", "tenant catalog discovery", "tenant catalog inventory", "tenant catalog identifiers", "workspace catalog discovery".4---56> **Telemetry — MANDATORY.** Every `api.fabric.microsoft.com` call must carry7> `x-ms-fabric-skill: search-consumption-cli` (`az rest`: `--headers "x-ms-fabric-skill=search-consumption-cli"`),8> including every LRO poll, `fabric_lro` and retry. Snippets omit it — add it anyway.910> **CRITICAL NOTES**11> 1. The Catalog Search API finds **items**, not workspaces. To find a workspace by name, use `GET /v1/workspaces` (see [COMMON-CLI.md § Resolve Workspace Properties by Name](../../common/COMMON-CLI.md#resolve-workspace-properties-by-name)).12> 2. The search text matches against item **display name**, **description**, and **workspace name**.13> 3. Dataflow (Gen1) and Dataflow (Gen2) are not supported.1415# Catalog Search — CLI Skill1617## Prerequisite Knowledge1819- [COMMON-CORE.md](../../common/COMMON-CORE.md) — Fabric REST API patterns, auth20- [COMMON-CLI.md](../../common/COMMON-CLI.md) — CLI implementation (az, curl, jq)2122## Table of Contents2324| Task | Reference | Notes |25|---|---|---|26| Search for an Item | [SKILL.md § Search for an Item](#search-for-an-item) | By name, description, or workspace name |27| List All Items of a Type | [SKILL.md § List All Items of a Type](#list-all-items-of-a-type) | Empty search + type filter |28| Pagination | [SKILL.md § Pagination](#pagination) | Continuation token pattern |29| Agentic Workflow | [SKILL.md § Agentic Workflow](#agentic-workflow) | |30| Examples | [SKILL.md § Examples](#examples) | |31| Gotchas and Troubleshooting | [SKILL.md § Gotchas and Troubleshooting](#gotchas-and-troubleshooting) | |3233---3435## Must/Prefer/Avoid3637### MUST DO3839- **Authenticate first** — see [COMMON-CORE.md § Authentication & Token Acquisition](../../common/COMMON-CORE.md#authentication--token-acquisition) and [COMMON-CLI.md § Authentication Recipes](../../common/COMMON-CLI.md#authentication-recipes). The Catalog Search API requires `Catalog.Read.All` scope.40- **Write the JSON body to a temp file** — avoids shell quoting issues with filter strings.41- **Disambiguate** — if multiple results match, present display name, type, and workspace name and ask the user to confirm.4243### PREFER4445- **Catalog Search over list-and-filter** — single cross-workspace call, no need to resolve workspace first.46- **Type filters** — narrow results with `"filter": "Type eq 'Lakehouse'"` to reduce noise.47- **Empty search with type filter** — to list all items of a type across workspaces.48- **`jq`** for extracting IDs from the response — cleaner than JMESPath for nested `hierarchy.workspace`.4950### AVOID5152- **Searching for workspaces** — the Catalog Search API returns items, not workspaces. Use `GET /v1/workspaces` instead (see [COMMON-CLI.md § Resolve Workspace Properties by Name](../../common/COMMON-CLI.md#resolve-workspace-properties-by-name)).53- **Querying source data after the workspace/item is known** — route to the workload-specific consumption skill (`sqldw-cli`, `spark-cli`, `eventhouse-cli`, or `fabriciq`) instead of Catalog Search.54- **Inventing filter syntax** — only `eq`, `ne`, `or`, and parentheses are supported.55- **Assuming all item types are supported** — Dataflow (Gen1) and Dataflow (Gen2) are not returned yet.5657---5859## Search for an Item6061```bash62cat > /tmp/body.json << 'EOF'63{"search": "SalesLakehouse", "filter": "Type eq 'Lakehouse'", "pageSize": 10}64EOF65az rest --method post \66 --resource "https://api.fabric.microsoft.com" \67 --url "https://api.fabric.microsoft.com/v1/catalog/search" \68 --body @/tmp/body.json69```7071The search text matches against item display name, description and workspace name. Type filtering is optional. The response includes `id`, `type`, `displayName`, `description`, and `hierarchy.workspace` (with `id` and `displayName`) for each match.7273### Extract item and workspace IDs7475```bash76az rest --method post \77 --resource "https://api.fabric.microsoft.com" \78 --url "https://api.fabric.microsoft.com/v1/catalog/search" \79 --body @/tmp/body.json \80 --query "value[0].{itemId:id, workspaceId:hierarchy.workspace.id, name:displayName}" \81 --output json82```8384---8586### Filter Examples8788| Goal | Filter |89|---|---|90| Only lakehouses | `Type eq 'Lakehouse'` |91| Reports or semantic models | `Type eq 'Report' or Type eq 'SemanticModel'` |92| Exclude notebooks | `Type ne 'Notebook'` |9394For the full list of supported item types, see the [Catalog Search API reference](https://learn.microsoft.com/en-us/rest/api/fabric/core/catalog/search).9596---9798## List All Items of a Type99100Use an empty search string with a type filter (`pageSize` max is 1000):101102```bash103cat > /tmp/body.json << 'EOF'104{"search": "", "filter": "Type eq 'Lakehouse'", "pageSize": 100}105EOF106az rest --method post \107 --resource "https://api.fabric.microsoft.com" \108 --url "https://api.fabric.microsoft.com/v1/catalog/search" \109 --body @/tmp/body.json110```111112---113114## Pagination115116If the response includes a non-null `continuationToken`, pass it in the next request:117118```bash119cat > /tmp/body.json << 'EOF'120{"search": "", "filter": "Type eq 'Lakehouse'", "pageSize": 100, "continuationToken": "<token>"}121EOF122az rest --method post \123 --resource "https://api.fabric.microsoft.com" \124 --url "https://api.fabric.microsoft.com/v1/catalog/search" \125 --body @/tmp/body.json126```127128Continue until `continuationToken` is null.129130---131132## Agentic Workflow1331341. **Ask** — user provides an item name, type, or description keywords.1352. **Search** — call Catalog Search with the user's input and optional type filter.1363. **Disambiguate** — if multiple matches, present results (name, type, workspace) and ask the user to pick.1374. **Return** — provide the search results, include the item `id` and `hierarchy.workspace.id` for downstream use.138139---140141## Examples142143### Find a specific report144```bash145cat > /tmp/body.json << 'EOF'146{"search": "Monthly Sales Revenue", "filter": "Type eq 'Report'", "pageSize": 10}147EOF148az rest --method post \149 --resource "https://api.fabric.microsoft.com" \150 --url "https://api.fabric.microsoft.com/v1/catalog/search" \151 --body @/tmp/body.json \152 --query "value[].{name:displayName, type:type, workspace:hierarchy.workspace.displayName}" \153 --output table154```155156### List all semantic models across workspaces157```bash158cat > /tmp/body.json << 'EOF'159{"search": "", "filter": "Type eq 'SemanticModel'", "pageSize": 1000}160EOF161az rest --method post \162 --resource "https://api.fabric.microsoft.com" \163 --url "https://api.fabric.microsoft.com/v1/catalog/search" \164 --body @/tmp/body.json165```166167### Save search results to file168```bash169cat > /tmp/body.json << 'EOF'170{"search": "", "filter": "Type eq 'Lakehouse'", "pageSize": 1000}171EOF172az rest --method post \173 --resource "https://api.fabric.microsoft.com" \174 --url "https://api.fabric.microsoft.com/v1/catalog/search" \175 --body @/tmp/body.json \176 --query "value[].{name:displayName, type:type, workspace:hierarchy.workspace.displayName, id:id}" \177 --output json > /tmp/search_results.json178```179180---181182## Gotchas and Troubleshooting183184| Symptom | Cause | Fix |185|---|---|---|186| `401 Unauthorized` | Wrong token audience or expired session | Verify `--resource "https://api.fabric.microsoft.com"`. Run `az login`. |187| `InvalidPageSize` | `pageSize` outside 1–1000 | Use a value between 1 and 1000. |188| `InvalidFilter` | Bad filter syntax | Only `eq`, `ne`, `or`, and parentheses. Don't mix `eq` with `and`, or `ne` with `or`. Don't mix `eq` and `ne` in the same filter. |189| `TypeNotFound` | Unrecognized item type in filter | Check spelling (case-sensitive). See [API reference](https://learn.microsoft.com/en-us/rest/api/fabric/core/catalog/search) for valid types. |190| `FilterTooManyValues` | Filter has more than 500 values | Reduce the number of type values in the filter. |191| `InvalidRequest` | Missing request body | Ensure `--body` points to a valid JSON file. |192| Empty results for known item | Item type not supported | Dataflow Gen1/Gen2 are excluded. Use `GET /v1/workspaces/{id}/items` instead. |193| New item not found | Catalog index propagation delay | Indexing lag is variable and not yet near-real-time — usually minutes, but not guaranteed. A just-created item may not appear in search results yet; verify it exists via `GET /v1/workspaces/{id}/items` instead. |194| Too many results | Search text too broad | Add a type filter or use more specific search text. |