Many of you have been using the Power BI REST API the last several months during the Power BI preview. As the Power BI service has moved to GA, so has the Power BI REST API. With the Power BI REST API v1.0, you will be able to integrate your application’s data into Power BI and create datasets that power dashboards in real-time.
For those of you who have been using the preview version of the API, you will notice a few changes.
Base URL
The base URL has changed from https://api.powerbi.com/beta/myorg to https://api.powerbi.com/v1.0/myorg. This will allow us to continually make improvements to the API without introducing breaking changes to existing applications. We will still continue to add functionality to v1.0 as long as they are considered non-breaking. To see what is considered a non-breaking change, please review our documentation here: https://msdn.microsoft.com/en-US/library/mt269435(Azure.100).aspx
Permission Scopes
Scopes are what allow your application to make certain API calls on behalf of a signed in user. You select the scopes that your application needs when you register it with Azure Active Directory. A user of your application will consent to these permissions when you trigger the OAuth 2 sign in flow and they sign in with their Power BI login. With the v1.0 API, we are simplifying the scopes to the following:
Display NameDescriptionScope ValueView all DatasetsThe app can view all datasets for the signed in user and datasets that the user has access to.Dataset.Read.AllRead and Write all DatasetsThe app can view and write to all datasets for the signed in user and datasets that the user has access to.Dataset.ReadWrite.AllView users GroupsThe app can view all groups that the signed in user belongs to.Group.Read.All
To read more about scopes, please review our documentation here: https://msdn.microsoft.com/en-US/library/dn889823.aspx.
Group Support!
As seen in the scope section above, your application can not only post content to a user’s personal workspace but can now also make the same API calls to any of the groups that the user has access to. The change is simple. To post a dataset to a user’s personal workspace you continue to send the POST request tohttps://api.powerbi.com/v1.0/myorg/datasets. It you want to post that dataset to a group that the user is a member of, you would send the POST request to https://api.powerbi.com/v1.0/myorg/groups/{groupId}/datasets.
In order to get the group ID to put in the URL, we have added a new API that allows you to get a list of all the groups that a user is a member of. To get this list, your application would call “GEThttps://api.powerbi.com/v1.0/myorg/groups“.
More about groups can be found here: https://msdn.microsoft.com/en-US/library/mt243835.aspx.
OData
We have made some changes to make the API more OData compliant. This has effected the response formats on certain API calls. Most noticeably on the “GET Datasets” and “GET Tables” calls as well as error responses for all calls. These changes will make the Power BI APIs more consistent with each other as well as other Microsoft APIs.
To view these changes as well as to get samples or to try the API, please visit http://dev.powerbi.com.
Note: The beta namespace will remain until the end of August to give developers time to move to v1.0.
Comments