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
tondeli
Advocate I
Advocate I

Trying to use open data source that provides REST API with no luck

This is my first time trying to use REST API as a data source and I really have no idea what I'm doing.

 

I'm using open data source provider's api as source:

https://data.fingrid.fi/open-data-api/#

 

 

I use two parameters in my query: pURL and pAPIKey.

 

let
    Source = Json.Document(Web.Contents(pURL, [Headers=[Authorization="api-key "&pAPIKey]])),
    messages = Source[messages]
in 
     Source

I get error message that my credentials are invalid.

  • When I update credentials as Web API and use key that they have provided error message is that API key can only be specified when a web API key name is provided.
  • Anonymous credentials gives me error that access is forbidden.

 

Can anyone suggest material where I can learn how to do this. Any query examples are also useful!

 

There are so many interesting data sources that I'd like to use but I cannot even manage to setup this one.

4 REPLIES 4
kiukiu
Frequent Visitor

Hi, I'm tryin the same with fingrid api, but I have problems with accessing to the data. My url format might be wrong or I try to ad the api key wrong. Did you get streaming dataset?

v-qiuyu-msft
Community Support
Community Support

Hi @tondeli,

 

You can take a look at below samples to call rest API use web data source:

 

How to call REST APIs and parse JSON with Power BI

Calling REST APIs and Parsing JSON made simple with Power BI

 

To create a streaming dataset, you can follow this article: Real-time streaming in Power BI.

 

 

Best Regards,
Qiuyun Yu

Community Support Team _ Qiuyun Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
tondeli
Advocate I
Advocate I

My syntax was incorrect.

 

let
    Source = Json.Document(Web.Contents(pURL, [Headers=[#"x-api-key"=pAPIKey]])),
    messages = Source[messages]
in 
     Source

What should I do next if I'd like to create streaming data set based on this query?

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.