powerbi-report-management

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese
Telemetry — MANDATORY. Every
api.fabric.microsoft.com
call must carry
x-ms-fabric-skill: powerbi-report-management
(
az rest
:
--headers "x-ms-fabric-skill=powerbi-report-management"
), including every LRO poll,
fabric_lro
and retry. Snippets omit it — add it anyway.
CRITICAL NOTES
  1. To find the workspace details (including its ID) from workspace name: list all workspaces and, then, use JMESPath filtering
  2. To find the item details (including its ID) from workspace ID, item type, and item name: list all items of that type in that workspace and, then, use JMESPath filtering
遥测 — 强制要求。每个
api.fabric.microsoft.com
调用必须携带
x-ms-fabric-skill: powerbi-report-management
az rest
中使用:
--headers "x-ms-fabric-skill=powerbi-report-management"
), 包括每个LRO轮询、
fabric_lro
和重试操作。代码片段中省略了该参数,但仍需自行添加。
重要说明
  1. 从工作区名称查找工作区详情(包括其ID):列出所有工作区,然后使用JMESPath进行筛选
  2. 从工作区ID、项类型和项名称查找项详情(包括其ID):列出该工作区中该类型的所有项,然后使用JMESPath进行筛选

Power BI Report Management

Power BI报表管理

Manage Power BI reports in Microsoft Fabric workspaces using
az rest
against the Fabric REST API. This skill covers the full CRUD lifecycle for report items and their PBIR definitions.
Scope: Report item CRUD and definition management only. For report layout authoring (pages, visuals, filters, formatting), use
powerbi-report-authoring
.
Boundary: This skill transports PBIR definitions to and from Fabric. PBIR content authoring remains owned by
powerbi-report-authoring
.
通过
az rest
调用Fabric REST API,管理Microsoft Fabric工作区中的Power BI报表。本技能涵盖报表项及其PBIR定义的完整CRUD生命周期。
适用范围:仅包含报表项CRUD和定义管理。若要进行报表布局创作(页面、可视化组件、筛选器、格式设置),请使用
powerbi-report-authoring
边界说明:本技能负责在本地与Fabric之间传输PBIR定义。PBIR内容创作由
powerbi-report-authoring
负责。

Companion Skills

配套技能

This skill is one of three that partition the Power BI authoring surface. Each owns a single concern; route work to the right one.
SkillOwnsUse for
powerbi-report-authoring
Report content (PBIR JSON authoring)Pages, visuals, filters, formatting, themes, expressions,
definition.pbir
,
version.json
,
report.json
powerbi-report-management
(this skill)
Report transport to/from FabricList, create, get, update, delete report items; download/upload PBIR definitions
Semantic-model authoring skillSemantic model authoring + deploymentCreate/edit measures/tables/relationships, TMDL, deploy semantic models to Fabric
When publishing a local
.pbip
to Fabric
, this skill is the entry point. If the user wants to publish the local semantic model alongside the report, this skill delegates the model deploy to an available semantic-model authoring skill, then resolves the resulting
semanticModelId
and binds the report to it. See the Publishing a local .pbip workflow.
本技能是划分Power BI创作领域的三个技能之一。每个技能负责单一职责,请将任务分配给对应的技能。
技能负责内容适用场景
powerbi-report-authoring
报表内容(PBIR JSON创作)页面、可视化组件、筛选器、格式设置、主题、表达式、
definition.pbir
version.json
report.json
powerbi-report-management
(本技能)
报表在本地与Fabric之间的传输列出、创建、获取、更新、删除报表项;下载/上传PBIR定义
语义模型创作技能语义模型创作与部署创建/编辑度量值/表/关系、TMDL、将语义模型部署到Fabric
当将本地
.pbip
发布到Fabric时
,本技能是入口点。如果用户希望将本地语义模型与报表一起发布,本技能会将模型部署任务委托给可用的语义模型创作技能,然后解析生成的
semanticModelId
并将报表与其绑定。请参阅发布本地.pbip工作流。

Tool Stack

工具栈

ToolRoleInstall
az
CLI
Primary:
az rest
for Fabric REST API calls,
az login
for auth
Pre-installed in most dev environments
jq
Parse and construct JSON payloadsStandard CLI tool — see COMMON-CLI.md § Tool Selection Rationale
base64
Encode/decode PBIR file content for definition payloadsBuilt-in on Linux/macOS · Windows: use PowerShell
[Convert]::ToBase64String()
/
FromBase64String()
Agent check — verify before first operation:
bash
az version 2>/dev/null || echo "INSTALL: https://learn.microsoft.com/cli/azure/install-azure-cli"
工具作用安装方式
az
CLI
主要工具:通过
az rest
调用Fabric REST API,通过
az login
进行身份验证
大多数开发环境中已预装
jq
解析和构造JSON负载标准CLI工具 — 请参阅COMMON-CLI.md § 工具选择依据
base64
对PBIR文件内容进行编码/解码以用于定义负载Linux/macOS系统内置 · Windows系统:使用PowerShell的
[Convert]::ToBase64String()
/
FromBase64String()
代理检查 — 首次操作前请验证:
bash
az version 2>/dev/null || echo "INSTALL: https://learn.microsoft.com/cli/azure/install-azure-cli"

Authentication

身份验证

All calls use the Fabric API audience. Using the wrong audience returns a 401.
APIAudience (
--resource
)
Fabric Report Items API
https://api.fabric.microsoft.com
For the shared authentication model, token audiences, and identity types, see COMMON-CORE.md § Authentication & Token Acquisition.
For full authentication recipes (interactive, device-code, service principal, managed identity), see COMMON-CLI.md § Authentication Recipes.
所有调用都使用Fabric API受众。使用错误的受众会返回401错误。
API受众(
--resource
参数)
Fabric报表项API
https://api.fabric.microsoft.com
有关共享身份验证模型、令牌受众和标识类型,请参阅COMMON-CORE.md § 身份验证与令牌获取
有关完整的身份验证方案(交互式、设备代码、服务主体、托管标识),请参阅COMMON-CLI.md § 身份验证方案

Finding Workspaces and Reports

查找工作区和报表

Shared patterns — workspace and item resolution, pagination, and LRO polling are documented in the common skill library. Read COMMON-CLI.md § Finding Workspaces and Items in Fabric before using the CRUD operations below.
通用模式 — 工作区和项解析、分页以及LRO轮询的相关文档位于通用技能库中。 在使用以下CRUD操作之前,请阅读COMMON-CLI.md § 在Fabric中查找工作区和项

Resolve Report ID by Name

通过名称解析报表ID

Once you have the workspace ID (per COMMON-CLI.md), resolve the report:
bash
REPORT_NAME="Sales Report"
REPORT_ID=$(az rest --method get \
  --resource "https://api.fabric.microsoft.com" \
  --url "https://api.fabric.microsoft.com/v1/workspaces/$WS_ID/reports" \
  --query "value[?displayName=='$REPORT_NAME'] | [0].id" \
  --output tsv)
获取工作区ID后(按照COMMON-CLI.md中的方法),解析报表:
bash
REPORT_NAME="Sales Report"
REPORT_ID=$(az rest --method get \
  --resource "https://api.fabric.microsoft.com" \
  --url "https://api.fabric.microsoft.com/v1/workspaces/$WS_ID/reports" \
  --query "value[?displayName=='$REPORT_NAME'] | [0].id" \
  --output tsv)

Examples: CRUD Operations

示例:CRUD操作

List Reports

列出报表

Returns all reports in a workspace.
  • Permissions: Viewer workspace role
  • Scopes:
    Workspace.Read.All
    or
    Workspace.ReadWrite.All
bash
az rest --method get \
  --resource "https://api.fabric.microsoft.com" \
  --url "https://api.fabric.microsoft.com/v1/workspaces/$WS_ID/reports" \
  --query "value[].{name:displayName, id:id, description:description}" \
  --output table
Supports pagination via
continuationToken
query parameter.
返回工作区中的所有报表。
  • 权限:工作区查看者角色
  • 范围
    Workspace.Read.All
    Workspace.ReadWrite.All
bash
az rest --method get \
  --resource "https://api.fabric.microsoft.com" \
  --url "https://api.fabric.microsoft.com/v1/workspaces/$WS_ID/reports" \
  --query "value[].{name:displayName, id:id, description:description}" \
  --output table
支持通过
continuationToken
查询参数进行分页。

Get Report (Properties)

获取报表(属性)

Returns properties of a specific report (name, description, ID, workspace, sensitivity label).
  • Permissions: Read permissions on the report
  • Scopes:
    Report.Read.All
    or
    Report.ReadWrite.All
bash
az rest --method get \
  --resource "https://api.fabric.microsoft.com" \
  --url "https://api.fabric.microsoft.com/v1/workspaces/$WS_ID/reports/$REPORT_ID"
返回特定报表的属性(名称、描述、ID、工作区、敏感度标签)。
  • 权限:报表的读取权限
  • 范围
    Report.Read.All
    Report.ReadWrite.All
bash
az rest --method get \
  --resource "https://api.fabric.microsoft.com" \
  --url "https://api.fabric.microsoft.com/v1/workspaces/$WS_ID/reports/$REPORT_ID"

Get Report Definition

获取报表定义

Downloads the full PBIR definition. This is a POST (not GET) and supports LRO.
  • Permissions: Read and write permissions on the report
  • Scopes:
    Report.ReadWrite.All
    or
    Item.ReadWrite.All
  • Limitation: Blocked for reports with encrypted sensitivity labels
Always request
format=PBIR
— without this parameter, older reports may return PBIR-Legacy format (a single
report.json
blob), which this skill does not support.
bash
RESPONSE=$(az rest --method post \
  --resource "https://api.fabric.microsoft.com" \
  --url "https://api.fabric.microsoft.com/v1/workspaces/$WS_ID/reports/$REPORT_ID/getDefinition?format=PBIR" \
  --verbose 2>&1)
下载完整的PBIR定义。此操作使用POST(而非GET),并支持LRO。
  • 权限:报表的读写权限
  • 范围
    Report.ReadWrite.All
    Item.ReadWrite.All
  • 限制:带有加密敏感度标签的报表无法执行此操作
务必指定
format=PBIR
— 如果缺少此参数,旧版报表可能会返回PBIR-Legacy格式(单个
report.json
blob),本技能不支持该格式。
bash
RESPONSE=$(az rest --method post \
  --resource "https://api.fabric.microsoft.com" \
  --url "https://api.fabric.microsoft.com/v1/workspaces/$WS_ID/reports/$REPORT_ID/getDefinition?format=PBIR" \
  --verbose 2>&1)

If 202 Accepted, extract operation ID and poll the LRO (see Long-Running Operations section)

如果返回202 Accepted,提取操作ID并轮询LRO(请参阅长时运行操作部分)

If 200 OK, the response contains the definition parts

如果返回200 OK,响应中包含定义部分


> **Format check**: After retrieving the definition, verify
> `definition.format == "PBIR"`. If it is `"PBIR-Legacy"`, this skill does not
> support that format.

> **格式检查**:获取定义后,请验证`definition.format == "PBIR"`。如果是`"PBIR-Legacy"`,本技能不支持该格式。

Decode Definition Parts to Local Files

将定义部分解码到本地文件

Note:
getDefinition
often returns
202 Accepted
(LRO). Check the Long-Running Operations section to extract the operation ID and poll for the result before decoding.
bash
undefined
注意
getDefinition
通常返回
202 Accepted
(LRO)。在解码之前,请参阅长时运行操作部分提取操作ID并轮询获取结果。
bash
undefined

After retrieving the definition (from 200 response or LRO result):

获取定义后(来自200响应或LRO结果):

echo "$DEFINITION_JSON" | jq -r '.definition.parts[] | "(.path)\t(.payload)"' |
while IFS=$'\t' read -r path payload; do mkdir -p "$(dirname "./report-definition/$path")" echo "$payload" | base64 -d > "./report-definition/$path" done
undefined
echo "$DEFINITION_JSON" | jq -r '.definition.parts[] | "(.path)\t(.payload)"' |
while IFS=$'\t' read -r path payload; do mkdir -p "$(dirname "./report-definition/$path")" echo "$payload" | base64 -d > "./report-definition/$path" done
undefined

Create Report (with Definition)

创建报表(带定义)

Creates a new report with a PBIR definition. Supports LRO.
  • Permissions: Contributor workspace role
  • Scopes:
    Report.ReadWrite.All
    or
    Item.ReadWrite.All
bash
undefined
使用PBIR定义创建新报表。支持LRO。
  • 权限:工作区参与者角色
  • 范围
    Report.ReadWrite.All
    Item.ReadWrite.All
bash
undefined

Walk ./report-definition/ and build the parts[] array — every file under the

遍历./report-definition/并构建parts[]数组 — 目录下的所有文件都会被编码并上传。包括definition.pbir、report.json、version.json、pages/pages.json、每个pages/<page>/page.json以及每个pages/<page>/visuals/<visual>/visual.json。

directory is encoded and uploaded. Includes definition.pbir, report.json,

version.json, pages/pages.json, every pages/<page>/page.json, and every

pages/<page>/visuals/<visual>/visual.json.

PARTS=$(find ./report-definition -type f -not -name '.*' -not -name 'Thumbs.db' | while read -r file; do rel="${file#./report-definition/}" payload=$(base64 < "$file" | tr -d '\n') jq -nc --arg p "$rel" --arg b "$payload"
'{path:$p, payload:$b, payloadType:"InlineBase64"}' done | jq -sc '.')
jq -n
--arg name "My New Report"
--arg desc "Created via Fabric API"
--argjson parts "$PARTS"
'{displayName:$name, description:$desc, definition:{parts:$parts}}' \
create-report.json
az rest --method post
--resource "https://api.fabric.microsoft.com"
--url "https://api.fabric.microsoft.com/v1/workspaces/$WS_ID/reports"
--headers "Content-Type=application/json"
--body @create-report.json
--verbose 2>&1

> **PowerShell** — use `Get-ChildItem -Recurse -File` to walk the directory and
> `[Convert]::ToBase64String([System.IO.File]::ReadAllBytes($_.FullName))` to
> encode each file (instead of `base64 | tr -d '\n'`).

> **Important**: `definition.pbir` is always required. The directory walk above
> includes every file under `./report-definition/` automatically — make sure
> your local directory mirrors the full PBIR layout (top-level files, plus all
> `pages/<page>/page.json` and `pages/<page>/visuals/<visual>/visual.json`
> files) before encoding.
PARTS=$(find ./report-definition -type f -not -name '.*' -not -name 'Thumbs.db' | while read -r file; do rel="${file#./report-definition/}" payload=$(base64 < "$file" | tr -d '\n') jq -nc --arg p "$rel" --arg b "$payload"
'{path:$p, payload:$b, payloadType:"InlineBase64"}' done | jq -sc '.')
jq -n
--arg name "My New Report"
--arg desc "Created via Fabric API"
--argjson parts "$PARTS"
'{displayName:$name, description:$desc, definition:{parts:$parts}}' \
create-report.json
az rest --method post
--resource "https://api.fabric.microsoft.com"
--url "https://api.fabric.microsoft.com/v1/workspaces/$WS_ID/reports"
--headers "Content-Type=application/json"
--body @create-report.json
--verbose 2>&1

> **PowerShell** — 使用`Get-ChildItem -Recurse -File`遍历目录,使用`[Convert]::ToBase64String([System.IO.File]::ReadAllBytes($_.FullName))`对每个文件进行编码(替代`base64 | tr -d '\n'`)。

> **重要提示**:`definition.pbir`是必填项。上述目录遍历会自动包含`./report-definition/`下的所有文件 — 编码前请确保本地目录与完整的PBIR布局一致(顶层文件,加上所有`pages/<page>/page.json`和`pages/<page>/visuals/<visual>/visual.json`文件)。

Update Report Definition

更新报表定义

Overwrites the entire definition. This is a POST and supports LRO.
  • Permissions: Read and write permissions on the report
  • Scopes:
    Report.ReadWrite.All
    or
    Item.ReadWrite.All
bash
undefined
覆盖整个定义。此操作使用POST,并支持LRO。
  • 权限:报表的读写权限
  • 范围
    Report.ReadWrite.All
    Item.ReadWrite.All
bash
undefined

Rebuild parts[] from ./report-definition/ after edits (same walk as Create).

编辑后从./report-definition/重新构建parts[]数组(与创建操作的遍历方式相同)。

PARTS=$(find ./report-definition -type f -not -name '.*' -not -name 'Thumbs.db' | while read -r file; do rel="${file#./report-definition/}" payload=$(base64 < "$file" | tr -d '\n') jq -nc --arg p "$rel" --arg b "$payload"
'{path:$p, payload:$b, payloadType:"InlineBase64"}' done | jq -sc '.')
jq -n --argjson parts "$PARTS"
'{definition:{parts:$parts}}' \
update-definition.json
az rest --method post
--resource "https://api.fabric.microsoft.com"
--url "https://api.fabric.microsoft.com/v1/workspaces/$WS_ID/reports/$REPORT_ID/updateDefinition"
--headers "Content-Type=application/json"
--body @update-definition.json
--verbose 2>&1

> **Critical**: `updateDefinition` replaces the **entire** definition. Include
> ALL parts — modified and unmodified. Omitting parts deletes them.

Optional query parameter `?updateMetadata=true` updates item metadata from
`.platform` file if included.
PARTS=$(find ./report-definition -type f -not -name '.*' -not -name 'Thumbs.db' | while read -r file; do rel="${file#./report-definition/}" payload=$(base64 < "$file" | tr -d '\n') jq -nc --arg p "$rel" --arg b "$payload"
'{path:$p, payload:$b, payloadType:"InlineBase64"}' done | jq -sc '.')
jq -n --argjson parts "$PARTS"
'{definition:{parts:$parts}}' \
update-definition.json
az rest --method post
--resource "https://api.fabric.microsoft.com"
--url "https://api.fabric.microsoft.com/v1/workspaces/$WS_ID/reports/$REPORT_ID/updateDefinition"
--headers "Content-Type=application/json"
--body @update-definition.json
--verbose 2>&1

> **关键提示**:`updateDefinition`会替换**整个**定义。请包含所有部分 — 修改过的和未修改的。省略部分会导致其被删除。

可选查询参数`?updateMetadata=true`会从包含的`.platform`文件更新项元数据。

Update Report (Properties)

更新报表(属性)

Updates display name and/or description only (not the definition).
  • Permissions: Read and write permissions on the report
  • Scopes:
    Report.ReadWrite.All
    or
    Item.ReadWrite.All
bash
cat > update-report.json << 'EOF'
{
  "displayName": "Renamed Report",
  "description": "Updated description"
}
EOF

az rest --method patch \
  --resource "https://api.fabric.microsoft.com" \
  --url "https://api.fabric.microsoft.com/v1/workspaces/$WS_ID/reports/$REPORT_ID" \
  --headers "Content-Type=application/json" \
  --body @update-report.json
仅更新显示名称和/或描述(不更新定义)。
  • 权限:报表的读写权限
  • 范围
    Report.ReadWrite.All
    Item.ReadWrite.All
bash
cat > update-report.json << 'EOF'
{
  "displayName": "Renamed Report",
  "description": "Updated description"
}
EOF

az rest --method patch \
  --resource "https://api.fabric.microsoft.com" \
  --url "https://api.fabric.microsoft.com/v1/workspaces/$WS_ID/reports/$REPORT_ID" \
  --headers "Content-Type=application/json" \
  --body @update-report.json

Delete Report

删除报表

Deletes a report. Supports soft-delete (default) and hard-delete.
  • Permissions: Write permissions on the report
  • Scopes:
    Report.ReadWrite.All
    or
    Item.ReadWrite.All
bash
undefined
删除报表。支持软删除(默认)和硬删除。
  • 权限:报表的写入权限
  • 范围
    Report.ReadWrite.All
    Item.ReadWrite.All
bash
undefined

Soft delete (recoverable)

软删除(可恢复)

Hard delete (permanent)

硬删除(永久)

Long-Running Operations (LRO)

长时运行操作(LRO)

Create Report
,
Get Report Definition
, and
Update Report Definition
may return
202 Accepted
instead of an immediate result. Capture
x-ms-operation-id
from the verbose output and poll until terminal state per COMMON-CLI.md § Long-Running Operations.
The management-specific guardrails below take precedence over the generic pattern when they conflict.
⚠️ Never retry a create POST after receiving 202. A
202 Accepted
response means the operation was accepted and is likely being processed server-side. Retrying the POST risks creating duplicates.
Always write
--verbose
output to a file
to reliably capture the
x-ms-operation-id
header on every attempt — this is the only reliable way to track the operation. Regex extraction from in-memory strings is fragile across shells and platforms. Once captured, poll the operation to completion just like any other LRO call.
powershell
# PowerShell — reliable operation ID capture
az rest --method post ... --verbose 2>&1 | Out-File "$env:TEMP\lro-response.txt" -Encoding utf8
$opId = (Select-String -Path "$env:TEMP\lro-response.txt" -Pattern "x-ms-operation-id.*?'([a-f0-9-]+)'" | Select-Object -First 1).Matches.Groups[1].Value
As a last resort, if the operation ID is still lost despite writing to a file, list reports in the workspace to locate the created report — but this should not be the normal path.
For more details, see Long-Running Operations.
创建报表
获取报表定义
更新报表定义
操作可能返回
202 Accepted
而非即时结果。从详细输出中捕获
x-ms-operation-id
,并按照COMMON-CLI.md § 长时运行操作轮询直到进入终端状态。
以下管理特定的规则与通用模式冲突时,以这些规则为准。
⚠️ 收到202响应后切勿重试创建POST请求
202 Accepted
响应表示操作已被接受,且可能正在服务器端处理。重试POST请求可能会导致创建重复报表。
务必将
--verbose
输出写入文件
,以可靠地捕获每次尝试的
x-ms-operation-id
头 — 这是跟踪操作的唯一可靠方式。从内存字符串中通过正则表达式提取在不同Shell和平台上不稳定。捕获到操作ID后,像处理其他LRO调用一样轮询操作直到完成。
powershell
# PowerShell — 可靠捕获操作ID
az rest --method post ... --verbose 2>&1 | Out-File "$env:TEMP\lro-response.txt" -Encoding utf8
$opId = (Select-String -Path "$env:TEMP\lro-response.txt" -Pattern "x-ms-operation-id.*?'([a-f0-9-]+)'" | Select-Object -First 1).Matches.Groups[1].Value
万不得已时,如果即使写入文件仍丢失了操作ID,可以列出工作区中的报表来查找已创建的报表 — 但这不应成为常规操作方式。
有关更多详细信息,请参阅长时运行操作

PBIR Definition Structure

PBIR定义结构

Reports use the PBIR format — a folder of JSON files:
text
Report/
├── definition.pbir                              # Semantic model reference (required)
├── definition/
│   ├── report.json                              # Report-level settings (required)
│   ├── version.json                             # Format version (required)
│   ├── pages/
│   │   ├── pages.json                           # Page listing (required)
│   │   ├── <pageId>/
│   │   │   ├── page.json                        # Page layout
│   │   │   ├── visuals/
│   │   │   │   ├── <visualId>/
│   │   │   │   │   ├── visual.json              # Visual config
│   │   │   │   │   ├── mobile.json              # Mobile layout (optional)
│   ├── bookmarks/                               # Bookmarks (optional)
├── StaticResources/                             # Custom themes, images (optional)
All parts are base64-encoded in API payloads using
"payloadType": "InlineBase64"
.
报表使用PBIR格式 — 一个包含多个JSON文件的文件夹:
text
Report/
├── definition.pbir                              # 语义模型引用(必填)
├── definition/
│   ├── report.json                              # 报表级设置(必填)
│   ├── version.json                             # 格式版本(必填)
│   ├── pages/
│   │   ├── pages.json                           # 页面列表(必填)
│   │   ├── <pageId>/
│   │   │   ├── page.json                        # 页面布局
│   │   │   ├── visuals/
│   │   │   │   ├── <visualId>/
│   │   │   │   │   ├── visual.json              # 可视化组件配置
│   │   │   │   │   ├── mobile.json              # 移动端布局(可选)
│   ├── bookmarks/                               # 书签(可选)
├── StaticResources/                             # 自定义主题、图片(可选)
所有部分在API负载中都使用
"payloadType": "InlineBase64"
进行base64编码。

definition.pbir — Semantic Model Reference

definition.pbir — 语义模型引用

For Fabric API, use
byConnection
(not
byPath
):
json
{
  "$schema": "https://developer.microsoft.com/json-schemas/fabric/item/report/definitionProperties/2.0.0/schema.json",
  "version": "4.0",
  "datasetReference": {
    "byConnection": {
      "connectionString": "semanticmodelid=<SemanticModelId>"
    }
  }
}
对于Fabric API,请使用
byConnection
(而非
byPath
):
json
{
  "$schema": "https://developer.microsoft.com/json-schemas/fabric/item/report/definitionProperties/2.0.0/schema.json",
  "version": "4.0",
  "datasetReference": {
    "byConnection": {
      "connectionString": "semanticmodelid=<SemanticModelId>"
    }
  }
}

Must/Prefer/Avoid

必须/推荐/避免

MUST

必须

  • ALL PBIR content MUST go through the
    powerbi-report-authoring
    skill
    — this is the single most important rule. Whether creating a brand-new report or modifying an existing one, every PBIR file (
    definition.pbir
    ,
    report.json
    ,
    version.json
    ,
    pages.json
    , page configs, visuals, filters, formatting, themes, expressions) must be authored using
    powerbi-report-authoring
    . Follow its guidance for correct PBIR structure, schemas, and field values. Use its CLI tools for validation. Never construct any PBIR JSON from memory or guesswork — not even "simple" files like
    definition.pbir
    or
    version.json
    . This skill is strictly for API transport (download, encode, upload) — it does not author PBIR content.
  • Always pass
    --resource "https://api.fabric.microsoft.com"
    to
    az rest
    — omitting it causes silent auth failures.
  • Always pass
    ?format=PBIR
    on
    getDefinition
    — without it, older reports return PBIR-Legacy format which is not supported by this skill.
  • Only work with PBIR format — if a definition comes back with
    "format": "PBIR-Legacy"
    , stop and tell the user that PBIR-Legacy is not supported.
  • Include ALL definition parts in
    updateDefinition
    — modified + unmodified. The API replaces the entire definition; omitting parts deletes them.
  • Base64-encode all part payloads — every
    payload
    value must be base64-encoded.
  • Use
    byConnection
    in
    definition.pbir
    for Fabric API —
    byPath
    is for local/Git scenarios only.
  • Poll LRO to completion
    Create
    ,
    getDefinition
    , and
    updateDefinition
    return
    202 Accepted
    . Poll until terminal state.
  • Always use
    --verbose
    on LRO operations
    az rest
    does not expose response headers by default. Without
    --verbose
    , you cannot capture the
    x-ms-operation-id
    header needed for polling, and there is no other way to retrieve it after the fact.
  • Clean up temporary files — delete any local temp directories and files (decoded definitions, JSON payloads) created during the workflow once the operation completes. These can be large and accumulate on the user's machine.
  • Verify semantic-model bindings after the target model is resolved — once the report's target semantic model is known (whether by a fresh deploy through an available semantic-model authoring skill or by selecting an existing workspace model), download its TMDL and compare all PBIR bindings (
    Entity
    ,
    queryRef
    ,
    nativeQueryRef
    , filter
    Source
    /
    Entity
    references) against the model's table/column/measure names. This applies to both branches: even a hand-off deploy may rename or transform the model during publish, so the diff is not optional. If names differ but models are structurally equivalent (same columns/measures), remap all table-qualified bindings via
    powerbi-report-authoring
    . If the models are not structurally equivalent, prompt the user before attempting to re-author — explain which tables/columns/measures don't match and ask whether to proceed.
  • Local edits stay local by default — when a user requests changes to a local
    .pbip
    report, apply the changes to the local files only. Do not publish to Fabric unless the user explicitly asks to publish, upload, or push the report. Even if the report was previously published to Fabric, treat subsequent edits as local-only until told otherwise. When the user does request publishing a local
    .pbip
    , follow the Publishing a local .pbip workflow: (a) confirm the target workspace once up front, (b) prompt publish-the-local-model vs. connect-to-an-existing-workspace-model, (c) on the publish-model branch, check whether a semantic-model authoring skill is available in the current session and degrade gracefully if not, (d) confirm create-new vs. update-existing for the report itself.
  • 所有PBIR内容必须通过
    powerbi-report-authoring
    技能处理
    — 这是最重要的规则。无论是创建全新报表还是修改现有报表,所有PBIR文件(
    definition.pbir
    report.json
    version.json
    pages.json
    、页面配置、可视化组件、筛选器、格式设置、主题、表达式)都必须使用
    powerbi-report-authoring
    技能进行创作。遵循其关于正确PBIR结构、模式和字段值的指导。使用其CLI工具进行验证。切勿从内存中构造或猜测任何PBIR JSON — 即使是
    definition.pbir
    version.json
    这类“简单”文件也不行。本技能仅用于API传输(下载、编码、上传) — 不负责PBIR内容创作。
  • 务必向
    az rest
    传递
    --resource "https://api.fabric.microsoft.com"
    — 省略该参数会导致静默身份验证失败。
  • getDefinition
    操作中务必传递
    ?format=PBIR
    — 缺少该参数时,旧版报表会返回PBIR-Legacy格式,本技能不支持该格式。
  • 仅处理PBIR格式 — 如果定义返回
    "format": "PBIR-Legacy"
    ,请停止操作并告知用户PBIR-Legacy不受支持。
  • updateDefinition
    中包含所有定义部分
    — 修改过的和未修改的。API会替换整个定义;省略部分会导致其被删除。
  • 对所有部分负载进行Base64编码 — 每个
    payload
    值都必须进行Base64编码。
  • definition.pbir
    中使用
    byConnection
    — 针对Fabric API,
    byPath
    仅适用于本地/Git场景。
  • 轮询LRO直到完成
    创建
    getDefinition
    updateDefinition
    操作会返回
    202 Accepted
    。轮询直到进入终端状态。
  • 在LRO操作中务必使用
    --verbose
    az rest
    默认不暴露响应头。如果不使用
    --verbose
    ,无法捕获轮询所需的
    x-ms-operation-id
    头,且事后没有其他方式获取该值。
  • 清理临时文件 — 操作完成后,删除工作流中创建的所有本地临时目录和文件(解码的定义、JSON负载)。这些文件可能很大,会占用用户机器的存储空间。
  • 解析目标模型后验证语义模型绑定 — 一旦确定报表的目标语义模型(无论是通过可用的语义模型创作技能重新部署,还是选择现有工作区模型),下载其TMDL并将所有PBIR绑定(
    Entity
    queryRef
    nativeQueryRef
    、筛选器
    Source
    /
    Entity
    引用)与模型的表/列/度量值名称进行比较。这适用于两个分支:即使是委托部署,模型在发布过程中也可能重命名或转换,因此差异检查是必须的。如果名称不同但模型结构等效(列/度量值相同),请通过
    powerbi-report-authoring
    重新映射所有表限定绑定。如果模型结构不等效,请在尝试重新创作前提示用户 — 说明哪些表/列/度量值不匹配,并询问是否继续。
  • 本地编辑默认仅保留在本地 — 当用户请求修改本地
    .pbip
    报表时,仅对本地文件进行更改。除非用户明确要求发布、上传或推送报表到Fabric,否则不要发布。即使报表之前已发布到Fabric,后续编辑也应视为仅本地修改,直到用户明确指示。当用户请求发布本地
    .pbip
    ,请遵循发布本地.pbip工作流:(a) 提前确认目标工作区;(b) 提示用户选择发布本地模型还是连接到工作区中现有模型;(c) 在发布模型分支中,检查当前会话中是否有可用的语义模型创作技能,如果没有则优雅降级;(d) 确认报表是创建新报表还是更新现有报表。

PREFER

推荐

  • Soft delete over hard delete — allows recovery.
  • az rest
    with JMESPath
    --query
    for filtering — built-in JSON parsing, no extra tools needed.
  • 优先使用软删除而非硬删除 — 允许恢复。
  • 使用带JMESPath
    --query
    az rest
    进行筛选
    — 内置JSON解析,无需额外工具。

AVOID

避免

  • Hand-writing or directly constructing PBIR JSON — whether creating new files or modifying existing ones, all PBIR content (
    definition.pbir
    ,
    report.json
    ,
    version.json
    , pages, visuals, filters, formatting, themes, expressions) must go through the
    powerbi-report-authoring
    skill. Never construct any PBIR JSON from memory or guesswork — not even "simple" structural files. No exceptions.
  • PBIR-Legacy format — do not create, read, or update PBIR-Legacy definitions. Only modern PBIR format is supported.
  • Sending only modified parts in
    updateDefinition
    — the API replaces the full definition; missing parts are deleted.
  • Using
    byPath
    in
    definition.pbir
    for API payloads — only works for local/Git scenarios.
  • Hardcoded workspace/report IDs — resolve dynamically via the List APIs.
  • Skipping LRO polling — definition operations may be async; always check for 202 responses.
  • Omitting
    ?format=PBIR
    on
    getDefinition
    — may return unusable PBIR-Legacy format.
  • Retrying a create POST after receiving 202 — risks creating duplicates. See the LRO section for the correct recovery pattern.
  • 手动编写或直接构造PBIR JSON — 无论是创建新文件还是修改现有文件,所有PBIR内容(
    definition.pbir
    report.json
    version.json
    、页面、可视化组件、筛选器、格式设置、主题、表达式)都必须通过
    powerbi-report-authoring
    技能处理。切勿从内存中构造或猜测任何PBIR JSON — 即使是“简单”的结构文件也不行。无例外。
  • PBIR-Legacy格式 — 不要创建、读取或更新PBIR-Legacy定义。仅支持现代PBIR格式。
  • updateDefinition
    中仅发送修改过的部分
    — API会替换完整定义;缺少的部分会被删除。
  • 在API负载的
    definition.pbir
    中使用
    byPath
    — 仅适用于本地/Git场景。
  • 硬编码工作区/报表ID — 通过List API动态解析。
  • 跳过LRO轮询 — 定义操作可能是异步的;务必检查202响应。
  • getDefinition
    中省略
    ?format=PBIR
    — 可能返回无法使用的PBIR-Legacy格式。
  • 收到202响应后重试创建POST请求 — 可能导致创建重复报表。请参阅LRO部分了解正确的恢复模式。

Agentic Workflow

代理工作流

Publishing a local
.pbip

发布本地
.pbip

This is the primary entry point when a user has a local
.pbip
(report plus sibling
.SemanticModel
) on disk and asks to publish, upload, push, or deploy the report to a Fabric workspace.
1. Detect that the source is a local
.pbip
.
Any of these signals:
  • A
    <Name>.pbip
    file in or above the working directory.
  • A
    <Name>.Report
    folder with a sibling
    <Name>.SemanticModel
    folder.
  • The report's
    definition.pbir
    uses
    byPath
    (local/Git form) rather than
    byConnection
    (API form).
  • Presence of a
    .pbi/
    cache folder.
If the source is not a local
.pbip
(e.g., the report was already downloaded from Fabric and only the
.Report
folder is present with a
byConnection
definition.pbir
), use the Modifying an existing report in Fabric workflow instead.
2. Confirm the target workspace once. Resolve and store the workspace ID by name (per COMMON-CLI.md). This single workspace is reused for both the model deploy (if applicable) and the report publish — never split them.
3. Prompt the user about the semantic model. Ask explicitly — do not silently choose:
"Do you want me to publish the local semantic model to this workspace too, or connect this report to an existing semantic model already in the workspace?"
4a. Branch: "Publish the local model".
  • Check whether a semantic-model authoring skill is available in the current session.
    • Available → hand off to that workflow to create or update the semantic model. Pass: target workspace ID, the local
      .SemanticModel
      folder path (TMDL source), and the desired model display name. Wait for that skill's workflow to reach terminal success before proceeding.
    • Not available → tell the user a semantic-model authoring skill is not loaded in this session and that publishing the local model is not possible without it. Then degrade to branch 4b (connect-to-existing) and re-prompt for which workspace model to bind the report to.
4b. Branch: "Connect to an existing model in the workspace".
  • List semantic models in the target workspace and confirm the target model with the user. Resolve
    semanticModelId
    by name.
5. Resolve
semanticModelId
.
Regardless of branch, the report needs a concrete model ID to bind to:
  • After 4a: list semantic models in the target workspace and find the model just deployed by name (the model skill verifies by listing workspace items but does not return an ID).
  • After 4b: this was already done.
6. Verify bindings against the resolved model (universal, both branches). Download the model TMDL and run the bindings diff per MUST Verify semantic-model bindings after the target model is resolved. Even on the publish-the-local-model branch, the model skill may rename tables or apply transforms during deploy, so this diff is not optional. Remap any drift via
powerbi-report-authoring
skill or, if structurally divergent, prompt the user before re-authoring.
7. Rebind
definition.pbir
from
byPath
byConnection
.
Use
powerbi-report-authoring
to set:
json
"datasetReference": {
  "byConnection": {
    "connectionString": "semanticmodelid=<resolved-id>"
  }
}
The Fabric API rejects
byPath
; this swap is mandatory on every local-source publish.
8. Decide create-new vs. update-existing for the report. Default the report
displayName
to the
.pbip
filename without extension (e.g.
SalesDashboard.pbip
"SalesDashboard"
). Surface the default to the user so they can override.
  • List reports in the target workspace and look up the chosen
    displayName
    .
9. Encode and upload. Run the existing transport — base64-encode all PBIR parts (forward-slash paths!), build the
parts
payload, POST, capture
x-ms-operation-id
(with
--verbose
written to a file), poll the LRO to terminal success.
10. Clean up any temporary files created during the flow.
Note on report-side verification: there is no reliable programmatic way to confirm a report renders correctly post-publish — the report lives at a Fabric Service URL and visual rendering requires a browser session. Surface the workspace/report URL so the user can verify in the browser.
当用户本地磁盘上有
.pbip
(报表及其同级
.SemanticModel
)并要求发布、上传、推送或部署到Fabric工作区时,这是主要入口点。
1. 检测源是否为本地
.pbip
。以下任一信号均可:
  • 工作目录中或其上级目录存在
    <Name>.pbip
    文件。
  • 存在
    <Name>.Report
    文件夹,且同级目录有
    <Name>.SemanticModel
    文件夹。
  • 报表的
    definition.pbir
    使用
    byPath
    (本地/Git形式)而非
    byConnection
    (API形式)。
  • 存在
    .pbi/
    缓存文件夹。
如果源不是本地
.pbip
(例如,报表已从Fabric下载,仅存在
.Report
文件夹且
definition.pbir
使用
byConnection
),请改用修改Fabric中的现有报表工作流。
2. 确认目标工作区。通过名称解析并存储工作区ID(按照COMMON-CLI.md中的方法)。该工作区将同时用于模型部署(如适用)和报表发布 — 切勿分开使用。
3. 提示用户关于语义模型的选择。明确询问 — 不要默认选择:
“您希望我将本地语义模型也发布到该工作区,还是将此报表连接到工作区中已有的语义模型?”
4a. 分支:“发布本地模型”
  • 检查当前会话中是否有可用的语义模型创作技能。
    • 可用 → 将任务委托给该工作流以创建或更新语义模型。传递:目标工作区ID、本地
      .SemanticModel
      文件夹路径(TMDL源)以及所需的模型显示名称。等待该技能的工作流完成后再继续。
    • 不可用 → 告知用户当前会话中未加载语义模型创作技能,无法发布本地模型。然后降级到4b分支(连接到现有模型),重新提示用户选择要绑定报表的工作区模型。
4b. 分支:“连接到工作区中的现有模型”
  • 列出目标工作区中的语义模型,并与用户确认目标模型。通过名称解析
    semanticModelId
5. 解析
semanticModelId
。无论选择哪个分支,报表都需要一个具体的模型ID进行绑定:
  • 选择4a分支后:列出目标工作区中的语义模型,通过名称查找刚刚部署的模型(模型技能会通过列出工作区项进行验证,但不会返回ID)。
  • 选择4b分支后:此步骤已完成。
6. 验证与解析后模型的绑定(通用步骤,两个分支均适用)。下载模型TMDL并按照必须中的解析目标模型后验证语义模型绑定步骤进行绑定差异检查。即使在发布本地模型分支中,模型技能在部署过程中也可能重命名表或应用转换,因此差异检查是必须的。通过
powerbi-report-authoring
技能重新映射任何差异,或者如果结构不同,在重新创作前提示用户。
7. 将
definition.pbir
byPath
重新绑定为
byConnection
。使用
powerbi-report-authoring
技能设置:
json
"datasetReference": {
  "byConnection": {
    "connectionString": "semanticmodelid=<resolved-id>"
  }
}
Fabric API会拒绝
byPath
;每次从本地源发布时,此转换都是必须的。
8. 决定创建新报表还是更新现有报表。默认报表
displayName
.pbip
文件名(不含扩展名)(例如
SalesDashboard.pbip
"SalesDashboard"
)。将默认名称告知用户,以便他们可以覆盖。
  • 列出目标工作区中的报表,查找所选的
    displayName
    • 未找到 → 创建报表。遵循创建报表(带定义)步骤。
    • 已找到 → 与用户确认:覆盖现有报表(
      updateDefinition
      )、使用不同名称发布,还是取消。如果选择覆盖,遵循更新报表定义步骤。
9. 编码并上传。执行现有传输流程 — 对所有PBIR部分进行base64编码(使用正斜杠路径!),构建
parts
负载,发送POST请求,捕获
x-ms-operation-id
(将
--verbose
输出写入文件),轮询LRO直到完成。
10. 清理工作流中创建的所有临时文件。
报表端验证说明:目前没有可靠的程序化方式确认报表发布后是否正确渲染 — 报表位于Fabric服务URL,可视化渲染需要浏览器会话。提供工作区/报表URL,以便用户在浏览器中验证。

Modifying an existing report in Fabric

修改Fabric中的现有报表

  1. Authenticate → see COMMON-CLI.md § Authentication Recipes
  2. Find workspace → Resolve workspace ID by name
  3. List/find report → Resolve report ID by name
  4. Download definition
    getDefinition?format=PBIR
    → poll LRO → decode parts to local files
  5. Author PBIR contentUse the
    powerbi-report-authoring
    skill
    for ALL changes. This covers every file:
    definition.pbir
    ,
    report.json
    ,
    version.json
    ,
    pages.json
    , page configs, visuals, filters, formatting, themes, and expressions. Follow its guidance for correct structure, schemas, and field values. Use its CLI tools to validate. Never construct any PBIR JSON from memory or guesswork.
  6. Upload changes → Re-encode all local files to base64 →
    updateDefinition
    with ALL parts (modified + unmodified)
  7. Clean up → Delete all temporary local files and directories created during the workflow
  1. 身份验证 → 请参阅COMMON-CLI.md § 身份验证方案
  2. 查找工作区 → 通过名称解析工作区ID
  3. 列出/查找报表 → 通过名称解析报表ID
  4. 下载定义
    getDefinition?format=PBIR
    → 轮询LRO → 将部分解码到本地文件
  5. 创作PBIR内容使用
    powerbi-report-authoring
    技能
    进行所有更改。这涵盖所有文件:
    definition.pbir
    report.json
    version.json
    pages.json
    、页面配置、可视化组件、筛选器、格式设置、主题和表达式。遵循其关于正确结构、模式和字段值的指导。使用其CLI工具进行验证。切勿从内存中构造或猜测任何PBIR JSON。
  6. 上传更改 → 将所有本地文件重新编码为base64 → 使用所有部分(修改过的和未修改的)执行
    updateDefinition
  7. 清理 → 删除工作流中创建的所有本地临时文件和目录

Creating a new report in Fabric

在Fabric中创建新报表

  1. Authenticate → see COMMON-CLI.md § Authentication Recipes
  2. Find workspace → Resolve workspace ID by name
  3. Resolve semantic model → Find the semantic model ID and workspace name for the
    definition.pbir
    connection string
  4. Verify semantic-model bindings → Download the target semantic model definition (TMDL) and compare all PBIR
    Entity
    ,
    queryRef
    ,
    nativeQueryRef
    , and filter references against the target table/column names. If names differ but structure matches, remap all table-qualified bindings. If models are structurally different, prompt the user before proceeding — explain what doesn't match and ask whether to re-author the affected bindings
  5. Author PBIR contentUse the
    powerbi-report-authoring
    skill
    to generate the complete PBIR definition from scratch —
    definition.pbir
    ,
    report.json
    ,
    version.json
    ,
    pages.json
    , page configs, and all visuals. Never construct any PBIR JSON from memory or guesswork.
  6. Upload → Encode all files to base64 →
    POST /reports
    with
    displayName
    and all definition parts
  7. Clean up → Delete temporary local files
  1. 身份验证 → 请参阅COMMON-CLI.md § 身份验证方案
  2. 查找工作区 → 通过名称解析工作区ID
  3. 解析语义模型 → 查找
    definition.pbir
    连接字符串所需的语义模型ID和工作区名称
  4. 验证语义模型绑定 → 下载目标语义模型定义(TMDL),将所有PBIR的
    Entity
    queryRef
    nativeQueryRef
    和筛选器引用与目标表/列名称进行比较。如果名称不同但结构匹配,重新映射所有表限定绑定。如果模型结构不同,在继续前提示用户 — 说明哪些内容不匹配,并询问是否重新创作受影响的绑定。
  5. 创作PBIR内容使用
    powerbi-report-authoring
    技能
    从头生成完整的PBIR定义 —
    definition.pbir
    report.json
    version.json
    pages.json
    、页面配置和所有可视化组件。切勿从内存中构造或猜测任何PBIR JSON。
  6. 上传 → 将所有文件编码为base64 → 使用
    displayName
    和所有定义部分执行
    POST /reports
  7. 清理 → 删除本地临时文件

Troubleshooting

故障排除

ErrorCauseFix
401 Unauthorized
Wrong or missing
--resource
audience
Always pass
--resource "https://api.fabric.microsoft.com"
403 Forbidden
Insufficient permissionsCheck workspace role (Contributor+ for write ops)
404 Not Found
Wrong workspace or report IDRe-resolve IDs via List APIs
CorruptedPayload
Malformed base64 or invalid PBIR JSONRe-encode files; validate JSON before encoding
202
with no result
LRO not polled to completionImplement LRO polling pattern
OperationNotSupportedForItem
Report has encrypted sensitivity labelCannot get definition for encrypted reports
ItemDisplayNameAlreadyInUse
Duplicate name in workspaceUse a unique display name
format: "PBIR-Legacy"
Report was created before PBIR was defaultPBIR-Legacy is not supported by this skill
Visuals empty / no data after publishPBIR entity names don't match workspace semantic model table names (e.g., local CSV table name vs workspace table name)Download target semantic model TMDL, compare table names, update all
Entity
,
queryRef
,
nativeQueryRef
, and filter references to match
MissingDefinitionParts
on create/update even though all files are included
Definition part paths use backslashes (
definition\report.json
) — the Fabric API requires forward slashes. On Windows,
path.join()
produces backslashes by default.
Normalize all
path
values in the payload to use forward slashes before uploading (e.g.,
.replace(/\\\\/g, '/')
in Node.js, or
.Replace('\\', '/')
in PowerShell).
Duplicate reports appear in workspace after createCreate POST was retried after a
202 Accepted
response. Each retry risks creating a new report.
Never retry a create POST after
202
. See the LRO section for reliable operation ID capture and recovery steps. Delete any duplicates with the Delete Report API.
Visuals empty after publishing a local
.pbip
via the model hand-off
The semantic-model authoring skill may rename or transform tables/columns during deploy, so the freshly deployed model's TMDL no longer matches the report's PBIR bindings.Re-run the TMDL-diff verification against the deployed model (per MUST Verify semantic-model bindings after the target model is resolved) and remap drifted bindings via
powerbi-report-authoring
skill.
Visuals empty after publish, despite TMDL diff being clean
definition.pbir
byConnection
still points at a stale model ID (e.g., from
.pbi/
cache or an earlier publish), not the freshly resolved one.
Re-run step 7 of Publishing a local .pbip to set
byConnection
to the actually resolved
semanticModelId
, then re-publish.
Semantic-model authoring skill not available when user wants to publish the local modelNo semantic-model authoring skill is loaded in the current session.Inform the user and degrade to the connect-to-existing branch — re-prompt for which workspace model to bind the report to. Do not silently fall through.
Model published to one workspace, report POSTed to anotherWorkspace was not confirmed up front, or two different workspaces were used for the model deploy and the report publish.Enforce the single-workspace rule (step 2 of Publishing a local .pbip). Recovery: either re-publish the report into the model's workspace, or move the model.
错误原因解决方法
401 Unauthorized
--resource
受众错误或缺失
务必传递
--resource "https://api.fabric.microsoft.com"
403 Forbidden
权限不足检查工作区角色(写入操作需要参与者及以上权限)
404 Not Found
工作区或报表ID错误通过List API重新解析ID
CorruptedPayload
Base64格式错误或PBIR JSON无效重新编码文件;编码前验证JSON
202
无结果
未轮询LRO直到完成实现LRO轮询模式
OperationNotSupportedForItem
报表带有加密敏感度标签无法获取加密报表的定义
ItemDisplayNameAlreadyInUse
工作区中存在重复名称使用唯一的显示名称
format: "PBIR-Legacy"
报表创建于PBIR成为默认格式之前本技能不支持PBIR-Legacy格式
发布后可视化组件为空/无数据PBIR实体名称与工作区语义模型表名称不匹配(例如,本地CSV表名称与工作区表名称)下载目标语义模型TMDL,比较表名称,更新所有
Entity
queryRef
nativeQueryRef
和筛选器引用以匹配
创建/更新时出现
MissingDefinitionParts
,但已包含所有文件
定义部分路径使用反斜杠(
definition\report.json
) — Fabric API要求使用正斜杠。在Windows系统中,
path.join()
默认生成反斜杠。
上传前将负载中的所有
path
值标准化为正斜杠(例如,在Node.js中使用
.replace(/\\\\/g, '/')
,在PowerShell中使用
.Replace('\\', '/')
)。
创建后工作区中出现重复报表收到
202 Accepted
响应后重试了创建POST请求。每次重试都可能创建新报表。
收到
202
后切勿重试创建POST请求。请参阅LRO部分了解可靠的操作ID捕获和恢复步骤。使用删除报表API删除重复报表。
通过模型委托发布本地
.pbip
后可视化组件为空
语义模型创作技能在部署过程中可能重命名或转换表/列,因此新部署模型的TMDL与报表的PBIR绑定不再匹配。针对部署的模型重新运行TMDL差异验证(按照必须中的解析目标模型后验证语义模型绑定步骤),并通过
powerbi-report-authoring
技能重新映射差异绑定。
发布后可视化组件为空,尽管TMDL差异检查正常
definition.pbir
byConnection
仍指向过期的模型ID(例如,来自
.pbi/
缓存或之前的发布),而非刚解析的ID。
重新执行发布本地.pbip的步骤7,将
byConnection
设置为实际解析的
semanticModelId
,然后重新发布。
用户希望发布本地模型时,语义模型创作技能不可用当前会话中未加载语义模型创作技能。告知用户并降级到连接到现有模型分支 — 重新提示用户选择要绑定报表的工作区模型。不要静默跳过。
模型发布到一个工作区,报表POST到另一个工作区未提前确认工作区,或模型部署和报表发布使用了两个不同的工作区。强制执行单一工作区规则(发布本地.pbip的步骤2)。恢复方法:要么将报表重新发布到模型所在的工作区,要么移动模型。