apis and embedding
75 TopicsREST API for subscriptions V2
Hi all, I came across some Power BI REST APIs related to subscriptions, but they seem incomplete and are not working as expected. Has anyone else encountered this issue? Are these APIs officially supported or still in development? Any insights would be helpful. Subscriptions - REST API (Power bi report) | Microsoft Learn Thanks!Solved2KViews0likes6CommentsPower BI REST API ExportTo MHTML leads to a base64 encoded file
I am using a Python Notebook to export Paginated Reports to an HTML file. Now it works fine for CSV files, I get clear and readable CSV back, the same goes for IMAGE with the format set to PNG. But when I set the format to MHTML as per the documentation I am getting a long error response about my headers, followed by a succesfull download of a file with .html extension. If I open it however it doesn't look like HTML: MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_NextPart_01C35DB7.4B204430" X-MSSQLRS-ProducerVersion: V This is a multi-part message in MIME format. ------=_NextPart_01C35DB7.4B204430 Content-ID: <filename> Content-Disposition: inline; filename="filename" Content-Type: text/html; name="filename"; charset="utf-8" Content-Transfer-Encoding: base64 PCFET0NUWVBFIEhUTUwgUFVCTElDICItLy9XM0MvL0RURCBIVE1MIDQuMDEgVHJhbnNpdGlvbmFs aXB0LVR5cGUiIGNvbnRlbnQ9InRleHQvamF2YXNjcmlwdCIvPjxNRVRBIEhUVFAtRVFVSVY9Ikxv....[this goes on for a long time] VEg9IjAiIEhFSUdIVD0iMTAwJSI+PC9URD48L1RSPjwvVEFCTEU+PC9ESVY+PC9ESVY+PC9ib2R5 PjwvaHRtbD4= ------=_NextPart_01C35DB7.4B204430-- I have tried several bodies, but the documentation is lacking for the formatSettings for Paginated Reports: And with empty formatSettings and I also left the formatSettings completely out, but there is no difference. The response from the download action for this html file is as follows: Failed to parse headers (url=https://api.powerbi.com:443/v1.0/myorg/groups/[REDACTED]/reports/[REDACTED]/exports/Mi9CbG9iSWRWMi1mYTJjOTY5Yy00NmZlLTRiYzktYjNkZS00NjFmZTE1YmExMTN3UHY3ZGxOLXlXVXpxU3N2THlGWk5YMlN2Yzl4MnRQeUJaWk4tQ2x0Lg==/file😞 [NoBoundaryInMultipartDefect()], unparsed data: '' Traceback (most recent call last): File "/home/trusted-service-user/cluster-env/trident_env/lib/python3.11/site-packages/urllib3/connection.py", line 464, in getresponse assert_header_parsing(httplib_response.msg) File "/home/trusted-service-user/cluster-env/trident_env/lib/python3.11/site-packages/urllib3/util/response.py", line 88, in assert_header_parsing raise HeaderParsingError(defects=defects, unparsed_data=unparsed_data) urllib3.exceptions.HeaderParsingError: [NoBoundaryInMultipartDefect()], unparsed data: '' And the file itself remains unreadable base64 encoded and it seems to be partial. Now I have a hunch that there maybe is a formatSetting to get a UTF-8 / UTF-16 HTML file, but it also seems odd that that would have to be specified. How can I find out why my HTML file is not properly formatted as readable (and usable) HTML? Adding just ?rdl:format=MHTML to a URL of a Paginated Report returns a readable HTML file. But when using the REST API, I cannot find why it keeps sending me base64 encoded partial files. Thanks for helping me out Martijn KuiperSolved1.4KViews0likes5CommentsAuto refresh/ connect to google sheets doesn't work, always getting Error: (429): Too Many Requests
Hi. Could you pls help, want to connect to google sheets and at least one time per day update my bi dasbords app/ workspase Always when I try update manyally or set schedule update always getting such error: Processing errorWeb.Contents failed to get contents from 'https://sheets.googleapis.com/v4/spreadsheets/*******?fields=sheets/properties,namedRanges' (429): Too Many Requests I don't need to update data every minute, just want that bi managed to take updated data from google sheets one/two times per day2KViews0likes3CommentsAutomatic data refresh for Power BI embedded
Hi, I have implemented Power BI embedded in a web app and used the Python script to import the on-premises data to the Power BI. I use the power BI embedded generated sample .NET file without Channing anything. Question: Can we do the data automatically refresh without using the on-premises data gateway (personal mode) in the above embedded option? Can explain how to implement the automatic data refresh for Power BI embedded?677Views0likes1CommentFailed to open external link when clicking on a Power BI embedded dashboard tile
I have a Power BI dashboard with a few tiles embedded to our own website using powerbi-client JS library. All tiles display and work as expected except the one that open an external link, just nothing happens when I click on it. Noted that the link works in Power BI service. An 401 error from the browser dev tools console which seems to be related: GET https://wabi-south-east-asia-redirect.analysis.windows.net/powerbi/metadata/packages/10319972 401 ERROR Error: Uncaught (in promise): Object: {"name":"PBI.Dashboard.GetNavigationPanePackage","time":1686734047923,"id":"ab6e5724-93e8-7858-b110-1e3d84ca4f11","info":{"parentId":"4e8f7037-1eb3-1275-0d10-be39435cd02c","activityName":"PBI.Dashboard.RootSession","activityId":"4e8f7037-1eb3-1275-0d10-be39435cd02c","startEventTime":1686734047923.0999,"isReqId":true,"isError":true,"errorSource":"PowerBI","errorCode":"HttpStatusCode = 401","endEventTime":1686734048263},"shouldBeLogged":true} As other tiles loaded and display correctly, I don't think it is the problem of the access token. Settings of the dashboard tile:602Views0likes1CommentIssue with Analysis Services migration configuring backup
I have create a new migration Azure Analysis Services to Power BI Premium. When I click on the migration, I get directed to the Migration Details page. On this page there is a link to configure the backup storage, which in my case is in disabled state. When I click on the link, I'm directed to the Azure portal but in the Microsoft Azure (Preview) tenant. The URL for the link is probably hard coded with Microsoft tenant name, instead of my tenant name.245Views0likes0CommentsIssue: API: Pipelines - Get Pipeline Stage Artifacts - wrong property name in returned objects
The /pipelines/{pipelineId}/stages/{stageOrder}/artifacts endpoint is returning the "lastDeploymentTime " property with an additional space at the end. This conflicts with the expected format of the Microsoft.PowerBi.Api nuget, which requires "lastDeploymentTime" as specified in the API documentation. Consequently, the LastDeploymentTime field remains empty at all times.386Views0likes0CommentsHOw to import the file with AIP encryped in Power BI.
Anonymous all. Is it possible to import the excel file that is encrypted by AIP? one of my customer is trying to import the excel file with encrypted by AIP. but he has been encountered error message that this encrypted file can not be read. How we can solve this issue?720Views0likes2CommentsPower BI Dataset refresh through REST Api using Python
Hi Team, I am unable to use Python to refresh the Power Bi using REST API. Need quick help. My code snippet is as below: import requests import json import base64 # Set the API endpoint URL url = "https://api.powerbi.com/v1.0/myorg/datasets/{dataset}/refreshes" # Set the user ID and password user_id = "my email ID" password = "my password" # Encode the user ID and password as base64 auth = base64.b64encode(f"{user_id}:{password}".encode()).decode() # Set the request headers with the Content-Type and Authorization headers = { "Content-Type": "application/json", "Authorization": f"Basic {auth}" } # Set the request payload payload = { "notifyOption": "NoNotification" } # Send the POST request with the headers and payload response = requests.post(url, headers=headers, data=json.dumps(payload)) # Print the response print(response)7.1KViews0likes12CommentsWeb Content source (servicenow) - Failed to update data source credentials
I' m new to publishing on powerbi. It's the first time I try. My powerbi desktop file works well with a basic authentication to get date from a web content url (service-now.com) . But once published on powerbi.com I get the following error message : Your data source can't be refreshed because the credentials are invalid. Please update your credentials and try again. Then I click on edit credentials and try to enter the login and password (BASIC authentication) like on powerbi desktop and get rejected with another error message : Failed to update data source credentials. Can anyone help me ? Thanks a lot. Olivier3.2KViews0likes7Comments