en en ms fi da da da da ca da en da ms hbs_lat ms ms ms en da da ms ms da es da de ro en da da da da de da da de en it da da da es da da en da da da en da sv de da en da en en en en en da pt fr fr en de en sv da da da da sv da da en en en en en en en en en en en kn en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en da da da da da en da da da da da en tr da ca en en id en en en en en en en en ms ms ms en en ml da en en nl nl da en da de de en en nl en en nl nl sv en da de de en en nl en en nl nl sv en da de de en en nl en en sv nl da en da de da en en nl en en nl nl sv en da da da en en nl en en nl nl sv en da da da en en nl en en nl nl sv en da de de en en nl en en nl nl da en da de de en en nl en en nl nl da en da de de en en nl en en nl en da ms en en en sv da fr da it de en ms ms en it da da de en en en sv da en da en da da en da da da hbs_lat da de de de el de en en tr en en en en en en en es es fi fr fr fr fr hu it it ja ko da nl nl pl pt pt ru sv th tr zh zh ar he
Introducing te Power BI APIs for Preview | Microsoft Power BI-blog | Microsoft Power BI
Office 365 + Power BI
What it means to be a developer has dramatically changed and evolved in recent years. Gone are te days of disconnected single platform software that can take months and years to develop before anyone even uses it. We are now in te age of connected applications that span all of our devices and services. Te Power BI APIs are te first step to allow Power BI developers to integrate Power BI into this connected world.
When we set out to design a modern developer experience for Power BI, we looked at what other major web platforms were doing and we saw lots of consistency. In these services, te majority of UI functionality is exposed to developers through REST APIs. Applications integrate their authentication with te service using OAuth 2.0. By following some of these same principles, we hope that you can build applications that extend Power BI in ways we never thought of, and allows you to extend your own applications with Power BI.
We have kicked off our developer experience with an initial round of APIs for preview. Let’s look at some functionality that is available. For reference, I will show an example of an application that I built which extends Google Chrome into Power BI. I created a Chrome extension that can take data inside a web page and send it to Power BI to be analyzed. Before we actually look at any APIs, let’s talk about authentication. Power BI uses OAuth 2.0 to authenticate its users. We have extended that same functionality to our developers so that applications can act on behalf of any Power BI user.
Te extension shows up in Chrome and has a link for you to sign in to Power BI. When you click that link, I invoke te Power BI login flow. Information on how to invoke login, can be found here. Power BI uses Azure Active Directory (AAD) for OAuth and AAD asks you to sign in with your company user name and password. Once te you log in, you are prompted to approve certain permissions for your application. I chose te permissions that I wished to ask for when I registered my application in AAD.
These permissions are what allow your application to sign in on behalf of a user and perform certain actions. Te below table gives a description of each of these permissions:
Add data to any of your datasets in Power BI (preview)
Gives an app access to add or delete a user’s dataset rows. This permission does not grant te app access to te user’s data.
App can automatically create content and datasets for a user.
View content properties (preview)
Te app can view object properties owned by te user including content and dataset names as well as dataset schema. This permission does not grant te app any access to te user’s data.
Once you consent to te permissions, an access token is returned to te app that is used to call te APIs on your behalf. So now let’s talk APIs. Below are te APIs that are now available for Preview:
You can try all of these APIs out without writing a single line of code using  https://docs.powerbi.apiary.io.
GET Datasets – Lists all te datasets that te signed in user has including their names and IDs.
POST Datasets – Creates a new dataset based on a JSON schema definition passed in te request body. This schema can contain multiple tables.
POST Table/Rows – Appends rows to te specified table in a dataset. Any dashboards that use that dataset will have their tiles automatically updated to reflect te new data.
DELETE Table/Rows – Clears all te rows in a table.
While these are just te first APIs available, you can still do some powerful things with them. Finishing up my example of te Chrome extensions, te Power BI user is now logged in. You can go find any table of data in a web page, highlight it and click “Analyze in Power BI”.
Next, in my code I analyze te schema of te table that te you selected and I generate te JSON schema of a new dataset:
{ "Name":"wunderground_5637", "Tables":[ { "Name":"wunderground_5637", "Columns":[ { "name":"Time", "DataType":"string" }, { "name":"Temp", "DataType":"string" }, { "name":"Feels Like", "DataType":"string" }, { "name":"Dew Point", "DataType":"string" }, { "name":"Humidity", "DataType":"string" }, { "name":"Conditions", "DataType":"string" }, { "name":"Precip", "DataType":"string" }, { "name":"Hourly Precip", "DataType":"string" }, { "name":"Wind", "DataType":"string" }, { "name":"Cloud Cover", "DataType":"string" }, { "name":"Pressure", "DataType":"string" } ] } ]}
Then I make a REST call to POST Datasets to create this new dataset. Te app passes te access token it got when te user signed in. This ensures that te dataset gets created on te correct users Power BI account.
{ "Name": "wunderground_5637", "Tables": [ { "Name": "wunderground_5637", "Columns": [ { "name": "Time", "DataType": "string"….
Te response to this call is a 201 create and te name and ID of te created datasets is returned:
{ "id": "2e8b21e6-7015-4d11-9d6b-6166990400a5", "name": "wunderground_5637"}
Te newly created dataset now shows in te UI and can be explored:
That takes care of creating te dataset, but we also need to add data to it. We do this by making another API call and passing te JSON for te rows.
{ "rows": [ { "Time": "12:00 pm", "Temp": "34 °F", "Feels Like": "25 °F", "Dew Point": "21 °F", "Humidity": "59%", "Conditions": "", "Precip": "Clear", "Hourly Precip": "1%", "Wind": "0 in", "Cloud Cover": "12 mph NNW", "Pressure": "24%" }, {…
This will respond with a 200 OK and te data is visible when you explore it in te Power BI UI.
This has been a brief introduction to te Power BI APIs. In te comments below, please let us know what ideas you have for Power BI applications and which APIs you would like to see next.
Tilmeld dig Power BI-nyhedsbrevet
Tilmeld dig nedenfor for at modtage de seneste nyheder fra Power BI direkte i din indbakke.
Land Afghanistan Albanien Algeriet Amerikansk Samoa Andorra Angola Anguilla Antarktis Antigua og Barbuda Argentina Armenien Aruba Aserbajdsjan Australien Bahamas Bahrain Bailiwick of Jersey Bangladesh Barbados Belgien Belize Benin Bermuda Bhutan Bolivia Bonaire Bosnien-Hercegovina Botswana Bouvetøen Brasilien Brunei Darussalam Bulgarien Burkina Faso Burundi Cabo Verde Cambodja Cameroun Canada Caymanøerne Chile Cocosøerne (Keelingøerne) Colombia Comorerne Congo Cookøerne Costa Rica Côte d'Ivoire Curaçao Cypern Danmark De Amerikanske Jomfruøer De Amerikanske oversøiske øer De Britiske Jomfruøer De Forenede Arabiske Emirater Den Centralafrikanske Republik Den Demokratiske Republik Congo Den Dominikanske Republik Det Britiske Territorium i Det Indiske Ocean Det palæstinensiske selvstyre Djibouti Dominica Ecuador Egypten El Salvador Eritrea Estland Etiopien Falklandsøerne Fiji Filippinerne Finland Frankrig Fransk Guyana Fransk Polynesien Franske Oversøiske Områder Færøerne Gabon Gambia Georgien Ghana Gibraltar Grenada Grækenland Grønland Guadeloupe Guam Guatemala Guernsey Guinea Guinea-Bissau Guyana Haiti Heard- og McDonaldøerne Honduras Indien Indonesien Iran Irland Island Isle of Man Israel Italien Jamaica Jan Mayen Japan Jordan Juleøen Kasakhstan Kenya Kina Kirgisistan Kiribati Korea Kosovo Kroatien Kuwait Laos Lesotho Letland Libanon Liberia Liechtenstein Litauen Luxembourg Madagaskar Malawi Malaysia Maldiverne Mali Malta Marokko Marshalløerne Martinique Mauretanien Mauritius Mayotte Mexico Mikronesien Moldova Monaco Mongoliet Montenegro Montserrat Mozambique Namibia Nauru Nederlandene Nepal New Zealand Nicaragua Niger Nigeria Niue Nordmakedonien Nordmarianerne Norfolk Island Norge Ny Kaledonien Oman Pakistan Palau Panama Papua Ny Guinea Paraguay Peru Pitcairn Polen Portugal Puerto Rico Qatar Reunion Rumænien Rwanda Saba Saint Barthélemy Saint Kitts og Nevis Saint Lucia Saint Martin Saint Pierre og Miquelon Saint Vincent og Grenadinerne Salomonøerne Samoa San Marino São Tomé og Príncipe SAR Hongkong SAR Macao Saudi-Arabien Schweiz Senegal Serbien Seychellerne Sierra Leone Singapore Sint Eustatius Sint Maarten Slovakiet Slovenien Somalia South Georgia og De Sydlige Sandwichøer Spanien Sri Lanka St. Helena, Ascension, Tristan da Cunha Storbritannien Sudan Surinam Svalbard Sverige Swaziland Sydafrika Sydsudan Syrien Tadsjikistan Taiwan Tanzania Tchad Thailand Timor-Leste Tjekkiet Togo Tokelau Tonga Trinidad og Tobago Tunesien Turkmenistan Turks- og Caicosøerne Tuvalu Tyrkiet Tyskland Uganda Ukraine Ungarn Uruguay USA Usbekistan Vanuatu Vatikanstaten Venezuela Vietnam Wallis og Futunaøerne Yemen Zambia Zimbabwe Ækvatorialguinea Østrig Ålandsøerne
Jeg vil gerne modtage Power BI-nyhedsbrevet. Erklæring om beskyttelse af personlige oplysninger.
Deltagelse kræver, at dine personlige oplysninger overføres til andre lande, som Microsoft driver forretning i, herunder USA. Når du sender denne formular, accepterer du overførslen af dine data uden for Kina. Erklæring om beskyttelse af personlige oplysninger.
Hvad er Power BI?
Power BI er en pakke med virksomhedsanalyseværktøjer til dataanalyse og vidensdeling. Overvåg din virksomhed, og få hurtigt svar med omfattende dashboards, der er tilgængelige på alle enheder.
Få de seneste nyheder fra Power BI-blog
Abonner via mail Du skal angive en gyldig mailadresse Du har angivet en personlig mailadresse. Angiv din arbejds- eller skolemailadresse. Noget gik galt. Prøv igen senere.
Beskyttelse af personlige oplysninger og cookies