This is best Fabric, Power BI, SQL and AI community event. How do we know? The last event sold out! Save €200 with code FABCMTY200.
Register nowA new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.
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