Skip to main content

Power BI

New

Dataset Refresh from API

Vote (17) Share
Kristers's profile image

Kristers on 23 May 2017 21:31:12

Allow refreshing of datasets through the API.
It's quite an issue for us. After I have updated my database i either have to a) wait for the scheduled refresh to execute
b) go online and press refresh on every dataset manully

Would save a lot of time if i could call the API to do the refresh after i have updated my data

Comments (5)
Kristers's profile image Profile Picture

1b28b54b 024b-4c82-82bd-7190c11cff3c on 06 Jul 2020 00:16:26

RE: Dataset Refresh from API

The requested API endpoint already exists. This idea should be closed.

Kristers's profile image Profile Picture

bcb8cc63 b272-4eb2-8510-615e5f03612e on 05 Jul 2020 23:26:56

RE: Dataset Refresh from API

'Not sure why this is still open. We should close this one, get the votes back, and then we can vote for fixes to the refresh API implementation.
thanks
-e

Kristers's profile image Profile Picture

0a471a63 de64-4d08-a366-342dd0521e2e on 05 Jul 2020 23:24:28

RE: Dataset Refresh from API

Isn't this done? https://powerbi.microsoft.com/en-us/blog/announcing-data-refresh-apis-in-the-power-bi-service/

However, it really would be much better if we could define schedules via the API

Kristers's profile image Profile Picture

9bed56d1 99cf-4147-a040-df74afc76168 on 05 Jul 2020 23:16:32

RE: Dataset Refresh from API

'@Craig Porteous:
I have built a PowerShell based solution on this , but even when the POST call for REST API is successful, some of my published datasets still show a refresh failure.

Can we collaborate on this ?

Kristers's profile image Profile Picture

b1e288db 0c2d-467e-804c-34cb528a10ef on 05 Jul 2020 23:06:07

RE: Dataset Refresh from API

Hey! You can refresh from the API.

This is basically what's needed in PowerShell:

$uri2 = "https://api.powerbi.com/v1.0/$groupsPath/datasets/$($dataset.id)/refreshes"
Invoke-RestMethod -Uri $uri2 -Headers $authHeader -Method POST

You'll need to build the auth first but I've got a blog post on that in the works. I will post a link here for you if needed