The URL of the REST API service for PowerBI Report Server is highlighted below. This is the same for SQL Server Reporting Services 2016 onwards.
http://<reportservername>/Reports/api/v2.0
Example - http://lab/PBIReports/api/v2.0
Steps to access the REST API in a browser.
- Enter the following URL - http://lab/PBIReports/api/v2.0 and replace the Report Server name and Reports folder
- Refer to the following URL to check the available commands to access the Report Server elements https://app.swaggerhub.com/apis/microsoft-rs/pbirs/2.0#/
- If you want to see the data from the Shared dataset, then the URL should be like below.
http://lab/PBIReports/api/v2.0/datasets(a8fd207a-bb6d-43ec-9b9e-391e293e2dd8)/data
This will show the result as below based on the dataset that you used.
We can use this REST API on applications and can access the report resources from the application. Access includes, read, write and delete. Check swaggerhub for more information.
Shared Dataset for Power BI Report
With the help of REST API, we can use the Shared Dataset as a source for Power BI Reports. As you know, the Shared Dataset is one of the standard objects for SQL Server Reporting Services. Using shared datasets, you can create multiple paginated reports and mobile reports.
REST API opens a channel to use the SQL Server Reporting Services Shared dataset as a source for Power BI report.
Follow the below steps to use the Shared dataset inside PowerBI.
Data Connector - Odata feed- Always ensure to check the below checkbox (Check the below screenshot).
- Expand “More Columns”. It will create a new step in the Applied Steps section.
- The above step will expand all the columns from the dataset as below. You can change the data type of the column and start to build the report.
Report Server Resource Utilization
Using REST API, we can build the report server resource utilization PowerBI report. Again, we need to use OData feed for this scenario.
Follow the below steps,
- Use the default REST API URL on the OData feed.
- Specify the Table that you want to use it for your report.
- The table contains the below information. This table also contains a few columns which have additional information. If you want to consider that information, then you can expand those columns and add it to the data model.
- When the data model is ready then you can create a report.