How to hit the Power BI API

The Power BI REST API lives at https://api.powerbi.com/v1.0/myorg. Workspaces are called groups.

Authentication

Power BI uses Microsoft Entra ID tokens for the https://analysis.windows.net/powerbi/api resource. For testing, the REST API docs' Try It panel signs you in. Send the token as Authorization: Bearer <token>, written {{POWERBI_TOKEN}}.

Full reference: https://learn.microsoft.com/en-us/rest/api/power-bi/

List workspaces

curl https://api.powerbi.com/v1.0/myorg/groups \
  -H "Authorization: Bearer {{POWERBI_TOKEN}}"
Run in PostTaco

Reports in a workspace

curl https://api.powerbi.com/v1.0/myorg/groups/{{GROUP_ID}}/reports \
  -H "Authorization: Bearer {{POWERBI_TOKEN}}"
Run in PostTaco

Refresh a dataset

curl -X POST https://api.powerbi.com/v1.0/myorg/groups/{{GROUP_ID}}/datasets/{{DATASET_ID}}/refreshes \
  -H "Authorization: Bearer {{POWERBI_TOKEN}}" \
  -H "Content-Type: application/json" \
  -d '{"notifyOption": "NoNotification"}'
Run in PostTaco