search-consumption-cli

bởi microsoft

Kiểm tra cập nhật — MỘT LẦN MỖI PHIÊN (bắt buộc) Lần đầu tiên kỹ năng này được sử dụng trong một phiên, hãy chạy kỹ năng kiểm tra cập nhật trước khi tiếp tục.

npx skills add https://github.com/microsoft/skills-for-fabric --skill search-consumption-cli

Update Check — ONCE PER SESSION (mandatory) The first time this skill is used in a session, run the check-updates skill before proceeding.

  • GitHub Copilot CLI / VS Code: invoke the check-updates skill (e.g., /fabric-skills:check-updates).
  • Claude Code / Cowork / Cursor / Windsurf / Codex: read the local package.json version, then compare it against the remote version via git fetch origin main --quiet && git show origin/main:package.json (or the GitHub API). If the remote version is newer, show the changelog and update instructions.
  • Skip if the check was already performed earlier in this session.

CRITICAL NOTES

  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).
  2. The search text matches against item display name, description, and workspace name.
  3. Dataflow (Gen1) and Dataflow (Gen2) are not supported.

Catalog Search — CLI Skill

Prerequisite Knowledge

Table of Contents

TaskReferenceNotes
Search for an ItemSKILL.md § Search for an ItemBy name, description, or workspace name
List All Items of a TypeSKILL.md § List All Items of a TypeEmpty search + type filter
PaginationSKILL.md § PaginationContinuation token pattern
Agentic WorkflowSKILL.md § Agentic Workflow
ExamplesSKILL.md § Examples
Gotchas and TroubleshootingSKILL.md § Gotchas and Troubleshooting

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).
  • 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

GoalFilter
Only lakehousesType eq 'Lakehouse'
Reports or semantic modelsType eq 'Report' or Type eq 'SemanticModel'
Exclude notebooksType 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

  1. Ask — user provides an item name, type, or description keywords.
  2. Search — call Catalog Search with the user's input and optional type filter.
  3. Disambiguate — if multiple matches, present results (name, type, workspace) and ask the user to pick.
  4. 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

SymptomCauseFix
401 UnauthorizedWrong token audience or expired sessionVerify --resource "https://api.fabric.microsoft.com". Run az login.
InvalidPageSizepageSize outside 1–1000Use a value between 1 and 1000.
InvalidFilterBad filter syntaxOnly 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.
TypeNotFoundUnrecognized item type in filterCheck spelling (case-sensitive). See API reference for valid types.
FilterTooManyValuesFilter has more than 500 valuesReduce the number of type values in the filter.
InvalidRequestMissing request bodyEnsure --body points to a valid JSON file.
Empty results for known itemItem type not supportedDataflow Gen1/Gen2 are excluded. Use GET /v1/workspaces/{id}/items instead.
New item not foundCatalog index propagation delayNewly created items can take up to 24 hours to appear in search results. Verify the item exists via GET /v1/workspaces/{id}/items instead.
Too many resultsSearch text too broadAdd a type filter or use more specific search text.

Thêm skills từ microsoft

oss-growth
microsoft
Cá tính tăng trưởng OSS
official
microsoft-foundry
microsoft
Triển khai, đánh giá và quản lý các agent Foundry từ đầu đến cuối: xây dựng Docker, đẩy lên ACR, tạo agent lưu trữ/agent nhắc nhở, khởi động container, đánh giá hàng loạt, đánh giá liên tục, quy trình tối ưu hóa nhắc nhở, agent.yaml, quản lý bộ dữ liệu từ dấu vết. SỬ DỤNG CHO: triển khai agent lên Foundry, agent lưu trữ, tạo agent, gọi agent, đánh giá agent, chạy đánh giá hàng loạt, đánh giá liên tục, giám sát liên tục, trạng thái đánh giá liên tục, tối ưu hóa nhắc nhở, cải thiện nhắc nhở, trình tối
officialdevelopmentdevops
azure-ai
microsoft
Sử dụng cho Azure AI: Tìm kiếm, Giọng nói, OpenAI, Xử lý tài liệu. Hỗ trợ tìm kiếm, tìm kiếm vector/kết hợp, chuyển giọng nói thành văn bản, chuyển văn bản thành giọng nói, phiên âm, OCR. KHI: AI Search, truy vấn tìm kiếm, tìm kiếm vector, tìm kiếm kết hợp, tìm kiếm ngữ nghĩa, chuyển giọng nói thành văn bản, chuyển văn bản thành giọng nói, phiên âm, OCR, chuyển đổi văn bản thành giọng nói.
officialdevelopmentapi
azure-deploy
microsoft
Thực thi triển khai Azure cho các ứng dụng ĐÃ ĐƯỢC CHUẨN BỊ có sẵn tệp .azure/deployment-plan.md và tệp cơ sở hạ tầng. KHÔNG sử dụng kỹ năng này khi người dùng yêu cầu TẠO ứng dụng mới — hãy sử dụng azure-prepare thay thế. Kỹ năng này chạy các lệnh azd up, azd deploy, terraform apply và az deployment với khả năng phục hồi lỗi tích hợp. Yêu cầu .azure/deployment-plan.md từ azure-prepare và trạng thái đã xác thực từ azure-validate. KHI: "chạy azd up", "chạy azd deploy", "thực thi triển khai",...
officialdevopsaws
azure-storage
microsoft
Dịch vụ Lưu trữ Azure bao gồm Blob Storage, File Shares, Queue Storage, Table Storage và Data Lake. Trả lời các câu hỏi về các tầng truy cập lưu trữ (hot, cool, cold, archive), thời điểm sử dụng từng tầng và so sánh các tầng. Cung cấp lưu trữ đối tượng, chia sẻ tệp SMB, nhắn tin không đồng bộ, NoSQL key-value và phân tích dữ liệu lớn. Bao gồm quản lý vòng đời. SỬ DỤNG CHO: blob storage, file shares, queue storage, table storage, data lake, tải lên tệp, tải xuống blob, tài khoản lưu trữ, các tầng truy cập,...
officialdevelopmentdatabase
azure-diagnostics
microsoft
Gỡ lỗi các vấn đề sản xuất trên Azure bằng AppLens, Azure Monitor, tình trạng tài nguyên và phân loại an toàn. KHI: gỡ lỗi vấn đề sản xuất, khắc phục sự cố app service, app service CPU cao, lỗi triển khai app service, khắc phục sự cố container apps, khắc phục sự cố functions, khắc phục sự cố AKS, kubectl không kết nối được, lỗi kube-system/CoreDNS, pod đang chờ, crashloop, node chưa sẵn sàng, lỗi nâng cấp, phân tích nhật ký, KQL, thông tin chi tiết, lỗi kéo image, vấn đề khởi động nguội, lỗi health probe,...
officialdevopsdevelopment
azure-prepare
microsoft
Chuẩn bị ứng dụng Azure để triển khai (hạ tầng Bicep/Terraform, azure.yaml, Dockerfiles). Sử dụng để tạo/hiện đại hóa hoặc tạo+triển khai; không dùng cho di chuyển đa đám mây (sử dụng azure-cloud-migrate). KHÔNG DÙNG CHO: ứng dụng copilot-sdk (sử dụng azure-hosted-copilot-sdk). KHI: "tạo ứng dụng", "xây dựng ứng dụng web", "tạo API", "tạo HTTP API serverless", "tạo frontend", "tạo backend", "xây dựng dịch vụ", "hiện đại hóa ứng dụng", "cập nhật ứng dụng", "thêm xác thực", "thêm bộ nhớ đệm", "lưu trữ trên Azure", "tạo và...
officialdevelopmentdevops
azure-validate
microsoft
Kiểm tra trước khi triển khai để đảm bảo sẵn sàng trên Azure. Chạy kiểm tra sâu về cấu hình, hạ tầng (Bicep hoặc Terraform), phân công vai trò RBAC, quyền của managed identity và các điều kiện tiên quyết trước khi triển khai. KHI NÀO: xác thực ứng dụng của tôi, kiểm tra mức độ sẵn sàng triển khai, chạy kiểm tra trước khi triển khai, xác minh cấu hình, kiểm tra xem đã sẵn sàng triển khai chưa, xác thực azure.yaml, xác thực Bicep, kiểm tra trước khi triển khai, khắc phục lỗi triển khai, xác thực Azure Functions, xác thực function app, xác th
officialdevopstesting