如何通过API获取Microsoft Fabric中特定数据管道的完整定义
解决方法:使用数据管道定义API
你需要调用获取数据管道定义的API端点来获取包含activities等详细结构的完整管道信息,而非仅返回基础元数据的接口。
正确的API请求
GET https://api.fabric.microsoft.com/v1/workspaces/{workspaceId}/dataPipelines/{dataPipelineId}/definition
请求要求
- 需拥有目标工作区和数据管道的读取权限(如Workspace Member或更高权限)。
- 请求必须携带有效的Azure AD身份验证令牌。
示例响应
该接口返回的内容与Fabric界面「视图→查看JSON代码」选项展示的结构完全一致,示例如下:
{ "name": "Pipeline_1_updated", "objectId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "properties": { "description": "this is the description", "activities": [ { "name": "Wait1", "type": "Wait", "dependsOn": [], "typeProperties": { "waitTimeInSeconds": 240 } } ], "annotations": [], "lastModifiedByObjectId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "lastPublishTime": "2024-02-01T17:28:02Z" } }
补充说明
- 若需获取已发布版本的管道定义,可在请求URL后添加查询参数
?artifactType=Published,默认返回的是草稿版本的定义。
内容的提问来源于stack exchange,提问作者Akash
相关产品推荐
相关产品推荐

