Utility script to trigger a Power BI dataset refresh via the Power BI REST API.
Set the following environment variables before running the script:
PBI_CLIENT_ID
PBI_CLIENT_SECRET
PBI_TENANT_ID
PBI_WORKSPACE_NAME
PBI_REPORT_NAME
Then execute:
pip install requests
python refresh_pbi.py
The script looks up the workspace and report to obtain the dataset ID and starts a refresh. Any HTTP errors will be printed to stderr
.