This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. We're covering it all. You won't want to miss it.
Learn moreLevel up your Power BI skills this month - build one visual each week and tell better stories with data! Get started
Hello,
I try to refresh a Power BI dataset programmatically by sending post request to PBI API endpoint: datasets/<datasetid>/refreshes.
The documentation (https://docs.microsoft.com/en-us/power-bi/connect-data/asynchronous-refresh) states: The response also includes a location response-header field to point the caller to the refresh operation that was just created/accepted. Location is that of the new resource which was created by the request, which includes the refreshId.
I used following Powershell code to refresh the dataset, but I don't receive a Location header. Is this a bug or expected behaviour?
Login-PowerBI
$XmlaQuery = @"
{
"refresh": {
"type": "full",
"objects": [
{
"database": "<Datamodel>",
"table": "<Table>"
}
]
}
}
"@
# URL is a relative or absolute URL of the Power BI entity to access.
Invoke-PowerBIRestMethod -Url 'datasets/<datasetid>/refreshes' -Method Post -Body $XmlaQuery
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Anonymous
I’ve tested on this API. As you can see, I run this API with Post request method and get Location and RequestId contained in Response Header.
Best Regards,
Community Support Team _ Caiyun