rest api
32 TopicsMore Granular when pulling Semantic Models from Rest API
I am trying to pull all the tables inside my lakehouse using PowerBI's Rest API. Originally, I used: Reports - Get Reports In Group - REST API (Power BI Power BI REST APIs) | Microsoft Learn then created a loop to pull all datasources of reports using the datasetID: Datasets - Get Datasources - REST API (Power BI Power BI REST APIs) | Microsoft Learn However, I notice when it is a semantic model it just shows as a SQL and does not provide the tables. Additionally, It only pulls the sources of reports. I want all the data inside a workspace. Is there a way to the next granular level, so I may see if we are duplicating pulls of tables. Also, is there a way to tell if a table is a shortcut or another re-pull of the same datasource? I am going to test this pull: Admin - WorkspaceInfo GetScanResult - REST API (Power BI Power BI REST APIs) | Microsoft Learn to see if I can get tables.711Views0likes1CommentPowerbi Reports using SPN
Hi there, I'm trying to report on all workspace's, DataSets associated to a datasource in our tenant. We setup an spn with Tenant.Read.All delegated api permissions. The Allow service principals to use Power BI APIs is enabled for the security group that the app is a member of.Created a client secret as well as certificate.We are able to connect using Connect-PowerBIServiceAccount to 'however no data is returned. When connecting using my account, i'm able to output the workspace that my account is a member of. So i'm not sure if im missing other permissions to the workspaces.1.6KViews0likes5CommentsReportingServicesTools Set-RsRestItemDataSource - BAD REQUEST how to diagnose?
I am attempting to write a script to update Datasource connect strings for power bi reports on PBIRS(on prem, no service) - Trying to add a port to the ( sharepoint ) url in the connect string. Forgive me as I am new to this and unsure how to move forward. Script is below and it does return the connectstring with the port to screen prior to setting it. Can anyone help with possible next steps or what might be wrong? Thanks in advance The last line Set-RsRestItemDataSource -RsItem $dataSourcePath -RsItemType 'PowerBIReport' -DataSources $ds -ReportPortalUri $ReportServerURI returns Failed to update data sources for '/AP/CSECR/Action%20Items': The remote server returned an error: (400) Bad Request. $ReportServerURI = "https://<svr>/Reports/" $ReportPortalUri = "https://<svr>//PBIReports" $dataSourcePath = "/MyReportPath" cls #Get-RsRestItemDataSource -RsItem $dataSourcePath -ReportPortalUri $ReportPortalUri $dataSources = Get-RsRestItemDataSource -RsItem $dataSourcePath -ReportPortalUri $ReportServerUri foreach($ds in $dataSources) { Write-Host $ds.ConnectionString $ds.ConnectionString = $ds.ConnectionString.Replace("mydomain.com", "mydomain.com.999") $ds.DataModelDataSource.AuthType = "Integrated" $ds.DataModelDataSource.Username = "Adomain\user" $ds.DataModelDataSource.Secret = "mypw" Write-Host $ds.ConnectionString Set-RsRestItemDataSource -RsItem $dataSourcePath -RsItemType 'PowerBIReport' -DataSources $ds -ReportPortalUri $ReportServerURI }3.4KViews0likes5CommentsIs there any REST API to Refresh Data for PBIX files existing on Power BI Report Server?
Hi Friends, I am working on REST APIs for Power BI Report Server. I could upload a report (Power BI Dashboard) using REST APIs. Now, I am curious to know if we have any APIs to set the schedule refresh plan for files exisitng on Power BI Report Server. Based on documentation available on "https://app.swaggerhub.com/apis/microsoft-rs/pbirs/2.0#/"; I could not find any data refresh APIs for Power BI Report Server. As per one blog "https://powerbi.microsoft.com/en-us/blog/announcing-data-refresh-apis-in-the-power-bi-service/" , data refresh APIs are available for Power BI Service; but no clues for this for Power BI Report Server. Is there any ways (if I am correct about no APIs available) to programatically set scheduled refresh plan for Power BI Report Server? Any help will be appreciated. Thanks.Solved12KViews1like5CommentsRest APi to modify groups for RLS
Hi I have a on-Prem Power BI report server where I upload pbix dashboards to. I am using row level security on a number of dashboards where i have defined groups that I manually assign users to. I would like to be able to assign users dynamically using REST APIs like Add Group User (https://docs.microsoft.com/en-us/rest/api/power-bi/groups/add-group-user) I was wondering if this is possible on a on premise report server where we upload the pbix files to? Will it only work for Power BI premium (Service) where I define workspaces, datasets and reports? Is there any way to achieve this using APIs or via code? Thanks JimSolved903Views0likes1CommentPower BI Server and REST calls by angular app
Hi everyone, I installed an instance of Power BI Server with some reports on a computer and I can view the reports in embed version inside a web-app by adding the parameter "?rs:embed=true" to the report URL in a iframe. My PBI Server is installed with Evaluation License. Can I use REST API to get reports from my Power BI Server? Note that my reports are on my Server and not on app.powerbi.com. Can I get this functionality with an Evaluation for the moment or is the Premium license necessary to call my PBI Server via REST from my angular web-app? Thanks in advance. Best regard. SalvatoreSolved8.2KViews0likes10CommentsREST API PBI Report Server
Is it possible to use REST API in PowerShell to download and upload reports in bulk to a PBI report server?, for example select multiple folders, or at least a folder containing multiple PBI reports?. And also if anyone can share a script example of this situation would be great!. Thanks!Solved1.2KViews0likes2CommentsUpdating parameter in a published report
I am on Report Server version 1.12.7936.39665 and trying to update one parameter in a simple published report, with PBRS REST API (PBIRS | 2.0 | microsoft-rs | SwaggerHub) but despite the successful update, the parameter keeps its original value. Here is the simple steps to recreate the issue: 1. Publishing a simple single query report to path /MyReport, with paramater called Databasename. 2. Double checking the current paramater value with a simple GET call: http://MyReportServer/Reports/api/v2.0/PowerBIReports(path='/MyReport')/DataModelParameters gives me back the expected original parameter value from the report which is: "Name": "Databasename", "Value": "MyOriginalDb" 3. Now updating the parameter for the report with a POST message: http://MyReportServer/Reports/api/v2.0/PowerBIReports(path='/MyReport')/DataModelParameters Message body: [ { "Name": "Databasename", "Value": "MyNewDb" } ] Works as expected, i have a successful POST pesponse. Also the PowerBI report server log shows no error on my POST message. So the report now has the Databasename parameter with MyNewDb value. 4. Issuing a GET for the report, it gives back the expected new value which is "MyNewDb:" http://MyReportServer/Reports/api/v2.0/PowerBIReports(path='/MyReport')/DataModelParameters Response: { "@odata.context": "http://MyReportServer/Reports/api/v2.0/$metadata#Collection(Model.DataModelParameter)", "value": [ { "Name": "Databasename", "Value": "MyNewDb" } ] } Indeed, the parameter update went fine in the published report. 5. Now comes the problem: Opening the report directly from the report server (even with Power BI Desktop app) still uses and has the old paramater value "MyOriginalDb" instead of "MyNewDb" (even after refresh) Tried with PBRS PowerShell tools as well: GitHub - microsoft/ReportingServicesTools: Reporting Services Powershell Tools Same issue. Is it a bug? Seems like the report is cached somehow at the web portal side and not updating with the backend? What could be the workaround here?Solved3.4KViews0likes5CommentsStruggling to create refresh plan with rest API
I try to create a new refresh plan for a power bi report on the report server. According to the documentation this should be possible with POST command: https://app.swaggerhub.com/apis/microsoft-rs/PBIRS/2.0#/CacheRefreshPlans/AddCacheRefreshPlan http://localhost/reports/api/v2.0/CacheRefreshPlans I'm using postman and in the body I have something like this: { "Id": "01234567-89ab-cdef-0123-456789abcdef", "Owner": "Username", "Description": "TestRefresh", "CatalogItemPath": "/path/to/report", "EventType": "DataModelRefresh", "Schedule": { "ScheduleId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "Definition": { "StartDateTime": "2021-09-21T15:51:04Z", "EndDate": "2021-09-29T15:51:04Z", "EndDateSpecified": true, "Recurrence": { "MinuteRecurrence": { "MinutesInterval": 0 }, "DailyRecurrence": { "DaysInterval": 0 }, "WeeklyRecurrence": { "WeeksInterval": 0, "WeeksIntervalSpecified": true, "DaysOfWeek": { "Sunday": true, "Monday": true, "Tuesday": true, "Wednesday": true, "Thursday": true, "Friday": true, "Saturday": true } }, "MonthlyRecurrence": { "Days": "string", "MonthsOfYear": { "January": true, "February": true, "March": true, "April": true, "May": true, "June": true, "July": true, "August": true, "September": true, "October": true, "November": true, "December": true } }, "MonthlyDOWRecurrence": { "WhichWeek": "FirstWeek", "WhichWeekSpecified": true, "DaysOfWeek": { "Sunday": true, "Monday": true, "Tuesday": true, "Wednesday": true, "Thursday": true, "Friday": true, "Saturday": true }, "MonthsOfYear": { "January": true, "February": true, "March": true, "April": true, "May": true, "June": true, "July": true, "August": true, "September": true, "October": true, "November": true, "December": true } } } } }, "LastRunTime": null, "LastStatus": null, "ModifiedBy": null, "ModifiedDate": null, "ParameterValues": [] } But I always get "500 InternalServer Error" response. Is there something wrong with the json or could it be an other problem? Unfortunally I did not find a detailed example on how to use the CacheRefreshPlans Api.Solved2.6KViews0likes4CommentsWeb URL not properly recognized as valid Refreshable Source
I'm calling the SharePoint profile API to retrieve user profile data. A typical call look like this: Json.Document(Web.Contents("https://<sharepoint site url>/_api/sp.userprofiles.peoplemanager/getpropertiesfor(@v)?@v='<user account name>'", [Headers=[Accept="application/json"]]))) It works perfectly fine in Power BI Desktop. Once published, when trying to set a scheduled refresh, the following error is returned: COM error: Microsoft.PowerBI.ReportServer.ASEngineManagedRoot, The given data source kind is not supported. Data source kind: UnknownCallsite. Maybe it's the unusual URL caussing this problem? How to solve this problem?Solved886Views0likes1Comment