简体   繁体   English

从 Power Bi API 数据集检索记录时出错 - 获取刷新历史记录

[英]Error with retrieveing records from Power Bi API Datasets - Get Refresh History

I'm trying get Refresh Logs for each dataset from Power BI rest API with Power Shell script.我正在尝试使用 Power Shell 脚本从 Power BI rest API 获取每个数据集的刷新日志。

Documentation for API https://docs.microsoft.com/en-us/rest/api/power-bi/datasets/getrefreshhistory API https 的文档://docs.microsoft.com/en-us/rest/api/power-bi/datasets/getrefreshhistory

But I'm getting below error in power shell.但我的电源错误低于 shell。 could you please help me?请你帮助我好吗? 在此处输入图像描述

At first sight, you should use Invoke-PowerBIRestMethod instead of the generic Invoke-RestMethod .乍一看,您应该使用Invoke-PowerBIRestMethod而不是通用的Invoke-RestMethod The first one will take care of adding the authorization token in the request for you, which you must add manually when using the generic cmdlet (and you didn't).第一个将负责为您在请求中添加授权令牌,您必须在使用通用 cmdlet 时手动添加(而您没有)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM