2 years ago
#46723

Priyanka Chaudhari
How to export powerbi report .pbix using rest api in python | Reports - Export Report In Group using powerbi API
The error I am getting in postman is 500 error. { "Message": "An error has occurred." }
Target URL: The target API is GET - https://api.powerbi.com/v1.0/myorg/groups/b7a888be-fcf3-4abd-b95c-2972171bc480/reports/9a8bef1b-e5b5-4504-a7db-17185f2703f0/Export
Header: { Authorization: bearer 'access_tocken', Content-Type: application/zip}
I am able to download report in powershell, want to convert it into python API. Find below working code:
$ApiUrl = "https://api.powerbi.com/v1.0/$groupsPath/reports/$reportId/Export"
Export power BI file to current directory
$export_id = Invoke-PowerBIRestMethod -Url $ApiUrl -Headers $auth_header -Method GET -ContentType "application/zip" -OutFile $filePath -TimeoutSec 0 -Verbose
python
powerbi
azure-devops-rest-api
power-bi-report-server
0 Answers
Your Answer