Power BI REST API:从Power BI导入数据“数据集不是Push API数据集”

0 投票
1 回答
33 浏览
提问于 2025-04-14 15:47

可以从Power BI的数据集中导入数据吗?比如以JSON、CSV等格式。

我试着发送一个HTTP GET请求到 https://api.powerbi.com/beta/myorg/datasets/{dataset_id}/table/{table_name}/rows

但是服务器返回了404错误代码。

我使用的是Python,这就是我的代码:

endpoint='https://api.powerbi.com/v1.0/myorg/groups/datasets/dataset_id/tables/Table_name/rows'
headers = {
              "Authorization": f"Bearer {result['access_token']}",
               "Content-Type": "application/json"
              } 
           
response = requests.get(endpoint, headers=headers)
           
print(f" response  :  {response.status_code}")
           
if response.status_code == 200:
  print(response.json())
else:
  print(f"Erreur lors de la récupération des données de la table IPE: {response.text}")

1 个回答

0

从语义模型(也就是数据集)获取数据的接口叫做 ExecuteQueries

撰写回答