REST API in Power BI – Dataset, Import, Reports, Push Datasets

FREE Online Courses: Click, Learn, Succeed, Start Now!

1. Objective

In our previous two tutorials, we covered most of the Power BI REST API through Part -1 & Part – 2. Today, in this REST API in Power BI we are going to discuss Power BI Imports API, Power BI Push Datasets API, Power BI Reports API, and Power BI Datasets API.
So, let’s start REST API in Power BI.

REST API in Power BI - Dataset, Import, Reports, Push Datasets

REST API in Power BI – Dataset, Import, Reports, Push Datasets

2. REST API in Power BI

Following are the Power BI REST APIs. let’s discuss them:

  • Operation group Description
  • Admin Operations
  • Available Features
  • Capacities Operations
  • Dashboards Operations
  • Embed Token Operations
  • Gateways Operations
  • Groups Operations
  • Imports Operations
  • Push Datasets Operations
  • Reports Operations
  • Datasets Operations

3. Power BI Datasets API

These are the Datasets Operations of REST API in Power BI:
a. Bind To Gateway
Ties the predefined dataset from “My Workspace” to the predetermined portal. These exclusive backings the On-Premises Data Gateway.
Required Extension: Dataset.ReadWrite.All
Do you know about Power Bi Gateway?
b. Tie To Gateway In Group
Ties the predefined dataset from the predetermined workspace to the predefined portal. Supported for the On-Premises Data Gateway.
Required Extension: Dataset.ReadWrite.All
c. Erase Dataset By Id
Erases the predefined dataset from “My Workspace”.
Required Extension: Dataset.ReadWrite.All
d. Erase Dataset By Id In Group
Erases the predefined dataset from the predetermined workspace.
Required Extension: Dataset.ReadWrite.All
e. Find Gateways
Returns a rundown of portals which the predefined dataset from “My Workspace” can be bound to.

  • This REST API in Power BI is applicable just for datasets that have no less than one on-premises association.
  • For datasets with cloud-just associations, it will restore a vacant rundown.

Required Degree: Dataset.Read.All
f. Find Gateways In Group
Returns a rundown of entryways that the predetermined dataset from the predefined workspace can be bound to.

  • This REST API in Power BI is pertinent just for datasets that have no less than one on-premises association.
  • For datasets with cloud-just associations, it will restore an unfilled rundown.

Required Extension: Dataset.Read.All
g. Get Dataset By Id
Returns the predetermined dataset from “My Workspace”.
Required Degree: Dataset.ReadWrite.All or Dataset.Read.All
h. Get Dataset By Id In Group
Returns the predetermined dataset from the predefined workspace.
Required Degree: Dataset.ReadWrite.All or Dataset.Read.All
i. Get Datasets
Returns a rundown of datasets from “My Workspace”.
Required Degree: Dataset.ReadWrite.All or Dataset.Read.All
j. Get Datasets In Group
Returns a rundown of datasets from the predetermined workspace.
Required Degree: Dataset.ReadWrite.All or Dataset.Read.All
k. Get Datasources
Returns a rundown of datasources for the predetermined dataset from “My Workspace”.
Required Degree: Dataset.ReadWrite.All or Dataset.Read.All
l. Get Datasources In Group
Returns a rundown of datasources for the predefined dataset from the predetermined workspace.
Required Extension: Dataset.ReadWrite.All or Dataset.Read.All
Follow this link to know about Power BI Administrator Portal
m. Get Gateway Datasources
Returns a rundown of passage datasources for the predetermined dataset from “My Workspace”.
Note: Use the new Dataset – Get Datasources API.
Required Extension: Dataset.ReadWrite.All or Dataset.Read.All
n. Get Gateway Datasources In Group
Returns a rundown of portal datasources for the predetermined dataset from the predefined workspace.
Note: Use the Dataset – Get Datasources In Group API.
Required Extension: Dataset.ReadWrite.All or Dataset.Read.All
o. Get Parameters
Returns a rundown of parameters for the predefined dataset from “My Workspace”.
Required Extension: Dataset.ReadWrite.All
p. Get Parameters In Group
Returns a rundown of parameters for the predefined dataset from the predetermined workspace.
Required Extension: Dataset.ReadWrite.All
q. Get Refresh History
Returns the revive history of the predefined dataset from “My Workspace”.
Required Degree: Dataset.ReadWrite.All or Dataset.Read.All
r. Get Refresh History In Group
Returns the revive history of the predefined dataset from the predetermined workspace.
Required Extension: Dataset.ReadWrite.All or Dataset.Read.All
s. Invigorate Dataset
Triggers an invigorate for the predetermined dataset from “My Workspace”.
Required Extension: Dataset.ReadWrite.All
t. Invigorate Dataset In Group
Triggers an invigorate for the predetermined dataset from the predefined workspace.
Required Extension: Dataset.ReadWrite.All
u. Set All Dataset Connections
Updates all associations for the predefined dataset from “My Workspace”.
Note: To refresh association subtle elements for SQL, AS, OData Feed, and SharePoint, utilize Update Datasources. For other datasource composes, utilize Update Parameters.
This REST API in Power BI is just backings SQL DirectQuery datasets.
Required Degree: Dataset.ReadWrite.All
Have a look at Power BI Pricing & Power BI Licensing
v. Set All Dataset Connections In Group
Updates all associations for the predetermined dataset from the predefined workspace.
Note: To refresh association points of interest for SQL, AS, OData Feed, and SharePoint, utilize Update Datasources In Group. For other datasource composes, utilize Update Parameters In Group.
This REST API in Power BI is just backings SQL DirectQuery datasets.
Required Degree: Dataset.ReadWrite.All
w. Assume control In Group
Exchanges responsibility for a determined dataset to the currently approved client.
Required Degree: Dataset.ReadWrite.All
x. Refresh Datasources
Updates the datasources of the predetermined dataset from “My Workspace”.
Imperative: The first datasource and the new datasource must have precisely the same.
For reserved models, the dataset must be invigorated to get the information from the new information sources. Sit tight 30 minutes for the refresh datasources activity to finish before reviving.
Required Degree: Dataset.ReadWrite.All
Confinements – Refresh datasources bolsters SQL Server, Azure SQL Server, Analysis Services, Azure Analysis Services, OData Feed, and SharePoint datasources. For other datasource composes, utilize Update Parameters

  • Changing datasource compose isn’t bolstered.
  • Datasources that contain parameters on the association string are not upheld.
  • Datasources which are a piece of Merged or Joined tables are not upheld.
  • Changing association from a cloud to on-premises or on-premises to a cloud isn’t bolstered.

y. Refresh Datasources In Group
Updates the datasources of the predetermined dataset from the predefined workspace.
Vital: The first datasource and the new datasource must have precisely the same.
For reserved models, the dataset must be invigorated to get the information from the new datasources. Sit tight 30 minutes for the refresh datasources activity to finish before reviving.
Required Degree: Dataset.ReadWrite.All
Confinements – Refresh datasources bolsters SQL Server, Azure SQL Server, Analysis Services, Azure Analysis Services, OData Feed, and SharePoint datasources. For other datasource composes, utilize Update Parameters In Group.

  • Changing datasource compose isn’t upheld.
  • Datasources that contain parameters on the association string are not upheld.
  • Datasources which are a piece of Merged or Joined tables are not upheld.
  • Changing association from cloud to on-premises or on-premises to cloud isn’t upheld.

z. Refresh Parameters
Updates the parameters esteem for the predefined dataset from “My Workspace”.
Imperative: The dataset must be revived for new parameters esteems to be connected. Sit tight 30 minutes for the refresh parameters task to finish before invigorating.
Required Extension: Dataset.ReadWrite.All
Do you know How to Create Your Own Measures in Power BI Desktop

i. Limitations

  • All parameters must exist in the dataset. Names are case-touchy.
  • Datasets with SQL, Oracle, Teradata and SapHana Direct Query associations are not bolstered.
  • Datasets with Analysis Services Live associations are not bolstered.
  • Greatest of a 100 parameters in ask for is permitted.
  • Qualities ought to be of expected Type.
  • Can’t pass void an incentive to an IsRequired parameter.
  • Rundown can’t be vacant or incorporate numerous events of the same parameter.
  • Parameters of sorts ‘Any’ or ‘Parallel’ can’t be set.
  • Parameters may change the real association (server or potentially database), however not its OnPrem status (from Cloud to OnPrem, or the other way).

4. Power BI Import API

a. Make Temporary Upload Location
Makes a transitory blob stockpiling to be utilized to import .pbix records bigger than 1 GB.
To import .pbix documents bigger than 1 GB, make a transitory transfer area and transfer the record utilizing the mutual access signature (SAS) url from the reaction, and afterwards call Post Import and determine ‘fileUrl’ to be the SAS url in the Request Body
Note: Import huge .pbix documents is accessible for workspaces on a premium limit.
Required Extension: Dataset.ReadWrite.All
b. Make Temporary Upload Location In Group
Makes an impermanent blob stockpiling used to import .pbix documents bigger than 1 GB.
To import .pbix documents bigger than 1 GB, make a transitory transfer area and transfer the .pbix record utilizing the common access signature (SAS) url from the reaction, and afterwards call Post Import In Group and determine ‘fileUrl’ to be the SAS url in the Request Body.
Note: Import huge .pbix records is accessible for workspaces on a premium limit.
Required Extension: Dataset.ReadWrite.All
c. Get Import By Id
Returns the predetermined import from “My Workspace”.
Required Degree: Dataset.ReadWrite.All or Dataset.Read.All
d. Get Import By Id In Group
Returns the predefined import from the predetermined workspace.
Required Extension: Dataset.ReadWrite.All or Dataset.Read.All
e. Get Imports
Returns a rundown of imports from “My Workspace”.
Required Degree: Dataset.ReadWrite.All or Dataset.Read.All
Read about Data Sources for Power BI Benefit (Services)
f. Get Imports In Group
Returns a rundown of imports from the predefined workspace.
Required Extension: Dataset.ReadWrite.All or Dataset.Read.All
g. Post Import
Makes new substance on “My Workspace” from .pbix, Excel or record way in OneDrive for Business.
Required Degree: Dataset.ReadWrite.All
Notes- To import a record, ask for Headers ought to incorporate Content-Type: multipart/frame information with the document encoded as shape information in the demand body.

  • To import from OneDrive for Business, ask for Headers ought to incorporate Content-Type: application/json with ImportInfo in the demand body.
  • To import .pbix records bigger than 1 GB, see Create Temporary Upload Location, supported just for workspaces on a premium limit.

h. Post Import In Group
Makes new substance on the predetermined workspace from .pbix, Excel, or record the way in OneDrive for Business.
Required Degree: Dataset.ReadWrite.All
Notes – To import a document, ask for Headers ought to incorporate Content-Type: multipart/shape information with the record encoded as frame information in the demand body.

  • To import from OneDrive for Business, ask for Headers ought to incorporate Content-Type: application/json with ImportInfo in the demand body.
  • To import .pbix documents bigger than 1 GB see Create Temporary Upload Location In Group, supported just for workspaces on a premium limit.

5. Power BI Push Datasets API

REST API in Power BI – Datasets API
a. Datasets DeleteRows
Erases all columns from the predefined table inside the predetermined dataset from “My Workspace”.
Note: This REST API in Power BI is bolstering just Push datasets.
Required Extension: Dataset.ReadWrite.All
Follow this link to know about Power BI Building Blocks
b. Datasets DeleteRowsInGroup
Erases all lines from the predefined table, inside the predetermined dataset, from the predetermined workspace.
Note: This REST API in Power BI is underpine just Push datasets.
Required Degree: Dataset.ReadWrite.All
c. Datasets GetTables
Returns a rundown of tables inside the predetermined dataset from “My Workspace”.
Note: This REST API in Power BI is bolstering just Push datasets.
Required Extension: Dataset.ReadWrite.All or Dataset.Read.All
d. Datasets GetTablesInGroup
Returns a rundown of tables inside the predefined dataset from the predetermined workspace.
Note: This REST API in Power BI is underpins just Push datasets.
Required Degree: Dataset.ReadWrite.All or Dataset.Read.All
e. Datasets PostDataset
Makes another dataset on “My Workspace”.
Required Extension: Dataset.ReadWrite.All
f. Datasets PostDatasetInGroup
Makes another dataset in the predetermined workspace.
Required Extension: Dataset.ReadWrite.All
g. Datasets PostRows
Adds new information columns to the predetermined table inside the predefined dataset from “My Workspace”.
Note: This REST API in Power BI is underpinning just Push datasets.
Required Extension: Dataset.ReadWrite.All
h. Datasets PostRowsInGroup
Adds new information lines to the predefined table, inside the predetermined dataset, from the predetermined workspace.
Note: This REST API in Power BI is bolstering just Push datasets.
Required Degree: Dataset.ReadWrite.All
Do you know What is Dynamic Row-Level Security in Power BI?
i. Datasets PutTable
Updates the metadata and outline for the predefined table inside the predetermined dataset from “My Workspace”.
Note: This REST API in Power BI is bolsteringjust Push datasets.
Required Extension: Dataset.ReadWrite.All
j. Datasets PutTableInGroup
Updates the metadata and construction for the predefined table, inside the predetermined dataset, from the predefined workspace.
Note: This REST API in Power BI underpins just Push datasets.
Required Extension: Dataset.ReadWrite.All

6. Power BI Reports API

REST API in Power BI – Reports API
a. Clone Report
Clones the predefined report from “My Workspace”.
Required Extension: Content.Create
b. Clone Report In Group
Clones the predetermined report from the predefined workspace.
Required Degree: Content.Create
c. Erase Report
Erases the predetermined report from “My Workspace”.
Required Extension: Report.ReadWrite.All
d. Erase Report In Group
Erases the predefined report from the predetermined workspace.
Required Degree: Report.ReadWrite.All
e. Fare Report
Fares the predetermined report from “My Workspace” to a .pbix document.
Required Degree: Report.ReadWrite.All or Report.Read.All
f. Fare Report In Group
Fares the predetermined report from the predefined workspace to a .pbix record.
Required Extension: Report.ReadWrite.All or Report.Read.All
g. Get Report
Returns the predefined report from “My Workspace”.
Required Extension: Report.ReadWrite.All or Report.Read.All
Let’s discuss Power BI Report Server in detail
h. Get Report In Group
Returns the predetermined report from the predefined workspace.
Required Extension: Report.ReadWrite.All or Report.Read.All
i. Get Reports
Returns a rundown of reports from “My Workspace”.
Required Extension: Report.ReadWrite.All or Report.Read.All
j. Get Reports In Group
Returns a rundown of reports from the predetermined workspace.
Required Degree: Report.ReadWrite.All or Report.Read.All
k. Rebind Report
Rebinds the predetermined report from “My Workspace” to the asked for a dataset.
Required Degree: Report.ReadWrite.All
l. Rebind Report In Group
Rebinds the predefined report from the predetermined workspace to the asked for a dataset.
Required Degree: Report.ReadWrite.All
m. Refresh Report Content
Updates the predefined report from “My Workspace” to have indistinguishable substance from the report in the demand body.
Required Degree: Report.ReadWrite.All
n. Refresh Report Content In Group
Updates the predefined report from the predetermined workspace to have indistinguishable substance from the predetermined report in the demand body.
Required Extension: Report.ReadWrite.All
So, this was all about REST API in Power BI. Hope you like our explanation.

7. Conclusion

Hence, in this Power BI tutorial, we learned about different operations of REST API in Power BI: Power BI Imports API, Power BI Push Datasets API, Power BI Reports API, and Power BI Datasets API. Still have a doubt, feel free to ask in the comment section.
Related Topic – Power BI ArcGIS Maps
For reference

Did you like this article? If Yes, please give DataFlair 5 Stars on Google

follow dataflair on YouTube

Leave a Reply

Your email address will not be published. Required fields are marked *