Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. Register Now

Reply
kemosully
Frequent Visitor

Get Dataflow Transactions REST API retrieves 10 transactions the first time, but only the 11th after

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}"  )

3 REPLIES 3
ibarrau
Super User
Super User

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.


If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Happy to help!

LaDataWeb Blog

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.

Helpful resources

Announcements
Fabric Community Conference

Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

February 2024 Update Carousel

Power BI Monthly Update - February 2024

Check out the February 2024 Power BI update to learn about new features.

Fabric Career Hub

Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.

Fabric Partner Community

Microsoft Fabric Partner Community

Engage with the Fabric engineering team, hear of product updates, business opportunities, and resources in the Fabric Partner Community.

Top Solution Authors
Top Kudoed Authors