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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Kasia_
Regular Visitor

Downloading CSV data via API

Hi,
I am struggling with a data loading issue and I have no idea how to fix it. I hope someone here will be able to help me.

 

Since the beginning of this year, we have been using a new system that was written specifically for us. I received an API from the IT team that downloads data in CSV format. Everything has been working fine so far, but a few days ago, one table stopped refreshing and showed a data authentication error. The IT department informed me that the data loading time had been exceeded and that I needed to limit the amount of data.

Previously, my code looked like this

= Csv.Document(Web.Contents("https://xxx.com/api/v1/sales-invoices/csv?ApiKey=XXXXX"),[Delimiter="|", Columns=21, Encoding=65001, QuoteStyle=QuoteStyle.Csv])

 

and IT suggested this solution

= Csv.Document(Web.Contents("https://xxx.com/api/v1/sales-invoices/csv?ApiKey=XXXXX&modifiedSince=2025-07-01T00:00:00"),[Delimiter="|", Columns=21, Encoding=65001, QuoteStyle=QuoteStyle.Csv])

 

The problem with data certification has indeed disappeared, but I need historical data and cannot limit it to a fixed date.
Do you have any solution to this problem?

Thank you in advance for your help!

1 ACCEPTED SOLUTION
lbendlin
Super User
Super User

Ask your IT department to modify the API so that you can also specify  both FROM and TO dates. Also, "Modified Since"  is not helping you if you want to implement incremental refresh, for example. So the FROM/TO range should be for Created, not for Modified.

View solution in original post

5 REPLIES 5
v-achippa
Community Support
Community Support

Hi @Kasia_,

 

Thank you for reaching out to Microsoft Fabric Community.

 

Thank you @lbendlin and @ibarrau for the prompt response.

 

As we haven’t heard back from you, we wanted to kindly follow up to check if the solution provided by the user's for the issue worked? or let us know if you need any further assistance.

 

Thanks and regards,

Anjan Kumar Chippa

Hi @Kasia_,

 

We wanted to kindly follow up to check if the solution provided by the user's for the issue worked? or let us know if you need any further assistance.

 

Thanks and regards,

Anjan Kumar Chippa

Hi @Kasia_,

 

As we haven’t heard back from you, we wanted to kindly follow up to check if the solution provided by the user's for the issue worked? or let us know if you need any further assistance.

 

Thanks and regards,

Anjan Kumar Chippa

ibarrau
Super User
Super User

Hi. You could workout a strategy for building historical data. You can work locally or with a storage. Make sure you export the csv every day or month and make sure you store the data. That way you can later combine them all.

If you have a pbix file with the historical data. You could copy and paste or export that historical data and start taking "since" that last date. Combine them and you could see all data and query reduced rows to the api. You might need a strategy for that. Otherwise it's like Ibendlin says, talk with IT to manage a strategy together for incremental refresh.

I hope that helps,


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

lbendlin
Super User
Super User

Ask your IT department to modify the API so that you can also specify  both FROM and TO dates. Also, "Modified Since"  is not helping you if you want to implement incremental refresh, for example. So the FROM/TO range should be for Created, not for Modified.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.