Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
I'm building out a bash script using the Power BI REST API to check when a dataflow completes its refresh. I need to bash rather than powershell due to the manner in which we will deploy the solution.
I've found that the first time I call the Get Dataflow Transactions for my target dataflow, it returns the 10 most recent transactions. GREAT! However, when I run my script a second or any further time, I only get the 11th transaction returned.
Ideally, I'd like to run a loop that checks the most recent transaction status until it's completed, but this won't work if I can't get the most recent transactions each time I make the call. Are there any ways to fix this?
Below is my code snippet:
transactions="https://api.powerbi.com/v1.0/myorg/groups/$dev_group/dataflows/$dev_dataflow/transactions"
refresh_transaction=$(curl -X GET $transactions -H "Authorization: $token" -d "{notifyOption: NoNotification}" )
Hi! it looks like an API limitation. It doesn't have pagination but it limits the response to 10 transactions. I'll leave feedback at the docs specifing that it doesn't say anything about limiting the response 😞
I hope that change in a near future, but for now, it looks like you won't be able to get more transactions.
I hope that make sense.
Happy to help!
Hii Any idea, if this limitation has been resolved?
I have recently been encountering this same error wherein the latest refresh isnt being being pulled in the top 10 transactions.
Hello,
today I tried to add top parameter to an api call request:
groups/{GroupId}/dataflows/{DataflowId}/transactions?$top=100
Then the api call returns more than 10 transactions. Unfortunately this option is not described in Microsoft documentation.
The $top parameter doesn't seem to work for me. I get an error stating "No HTTP resource was found that matches the request url". This is really frustrating as the call seems to return an almost random set of Dataflow transactions which makes it hard to validate that our Dataflows are working as expected.
Any other thoughts on how to ensure we get the latest 10 or even the full set of transactions?
I need your help as you are working on this. How you are generating the token. I am using a service principle but it gives me 401 error when trying to all this API.
I was aware that it would limit the responses, but I think I was more confused about why it would not return all 10 most recent transactions each time it was called in bash.
I've changed tactics to work on this in python because it gets all 10 most recent transactions each time I call the api.
User | Count |
---|---|
47 | |
31 | |
28 | |
27 | |
26 |
User | Count |
---|---|
58 | |
55 | |
36 | |
33 | |
28 |