power bi api_如何以编程方式访问Power BI REST API

本文详细介绍了如何使用Power BI REST API来编程访问Power BI服务功能,包括注册应用程序、授权用户、生成访问令牌以及获取报告和数据集列表。重点讲述了REST API的基础知识,以及使用Postman进行API调用的步骤。
摘要由CSDN通过智能技术生成

power bi api

In this article, I am going to explain how to use the Power BI REST API to programmatically access the Power BI Service features. I’ll also discuss the basis of REST API and how to use the APIs using Postman. Using the Power BI REST API, you can programmatically manage the administrative services like getting a list of dashboards and workspaces, refreshing a dataset, copying a dashboard from one workspace to another, and so on.

在本文中,我将解释如何使用Power BI REST API以编程方式访问Power BI Service功能。 我还将讨论REST API的基础,以及如何使用Postman使用API​​。 使用Power BI REST API,您可以以编程方式管理管理服务,例如获取仪表板和工作区列表,刷新数据集,将仪表板从一个工作区复制到另一个工作区,等等。

In order to securely access the Power BI REST API, we first need to request an embed token using which we can call the APIs and execute our functions. Although several operations can be performed using the REST APIs, in this article, we will specifically investigate how to authorize an application and call the APIs using Postman.

为了安全地访问Power BI REST API,我们首先需要请求一个嵌入令牌,我们可以使用该令牌来调用API并执行我们的功能。 尽管可以使用REST API执行若干操作,但在本文中,我们将专门研究如何授权应用程序并使用Postman调用API。

什么是REST API? (What is a REST API?)

The abbreviation of REST stands for Representational State Transfer, and API stands for Application Programming Interface. Let us assume that you are trying to find the football scores for your favorite team. You open the browser, search for your team, and then hit enter, and the results are displayed on your screen as expected. A REST API also works in a similar fashion. Using the REST API, you can search for some items, and then the results will be returned from the service you initiated the request.

REST的缩写代表表象小号泰特贸易交接,并且API代表A pplication P 方法在AGC覆盖整个院落。 让我们假设您正在尝试查找最喜欢的球队的足球得分。 您打开浏览器,搜索您的团队,然后按Enter键,结果将按预期显示在屏幕上。 REST API也以类似的方式工作。 使用REST API,您可以搜索一些项目,然后结果将从您发起请求的服务中返回。

The REST API consists of simple anatomy as follows:

REST API包含以下简单的解剖结构:

  • The Endpoint: This is the URL of the resource to which we are going to place the requests. For example, https://api.powerbi.com/v1.0/myorg/ 端点 :这是我们要向其发出请求的资源的URL。 例如,https://api.powerbi.com/v1.0/myorg/
  • The Method: Although there are multiple methods to call a REST API, the most common ones are GET and POST. The GET is used to retrieve information while the POST is used to send information to the resource on the web 方法 :尽管有多种方法可以调用REST API,但最常见的方法是GET和POST。 GET用于检索信息,而POST用于将信息发送到Web上的资源
  • The Headers: The authentication mode and the content types 标头 :身份验证模式和内容类型
  • The Data (Body): Textual data in the form of JSON, which needs to be sent to the resource 数据(正文) :JSON形式的文本数据,需要发送到资源

In this article, we will be using a tool known as Postman for making the API calls. A postman is a free tool using which you can make GET or POST calls to various URLs and save the results in a collection. You can download the tool from the official website of

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值