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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
ngomes
Helper II
Helper II

API

Good afternoon everyone,

I would like to know if anyone has used the BPstat Data API from Banco de Portugal?

 

I appreciate any help you can give me

 

API INFO
https://bpstat.bportugal.pt/data/docs 

2 ACCEPTED SOLUTIONS
Anonymous
Not applicable

Hi @ngomes,

Perhaps you can try to use a web connector to get data from that API, it allows you to send tokens in the request header/body when working with 'anonymous' mode:

Chris Webb's BI Blog: Using The RelativePath And Query Options With Web.Contents() In Power Query An...

let
    authKey = "xxxxx",
    url = "https://bpstat.bportugal.pt/data/v1/",
    body = "xxxxxx",
    GetJson =
        Web.Contents(
            url,
            [
                Headers = [
                    #"Authorization" = authKey,
                    #"Content-Type" = "application/json"
                ],
                RelativePath = "xxxxxx/xxxxx",
                Content = Text.ToBinary(body)
            ]
        ),
    token = Json.Document(GetJson)[access_token],
    series_id = "xxxxxx",
    Result =
        Web.Contents(
            url,
            [
                Headers = [
                    #"Content-Type" = "application/json",
                    Authorization = "Bearer " + token
                ],
                RelativePath = "xxxxxx/xxxxx",
                Query = [
                    lang = "EN",
                    series_ids = series_id
                ]
            ]
        )
in
    Result

Regards,

Moonlight

View solution in original post

v-shex-msft
Community Support
Community Support

Hi @ngomes,

Did the above suggestions help with your scenario? if that is the case, you can consider Kudo or Accept the helpful suggestions to help others who faced similar requirements.

If these also don't help, please share more detailed information to help us clarify your scenario to test.

How to Get Your Question Answered Quickly 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

View solution in original post

4 REPLIES 4
ichavarria
Solution Specialist
Solution Specialist

Hi @ngomes - Probably you can share more details. However, you can definitely try with the Web connector in Power BI Desktop. Just be careful of the privacy level you are selecting in Power BI Desktop to make sure it is similar to what your dataset will experience in Power BI Service. Here is a helpful link you can visit: Understand Power BI Desktop privacy levels - Power BI | Microsoft Learn.

v-shex-msft
Community Support
Community Support

Hi @ngomes,

Did the above suggestions help with your scenario? if that is the case, you can consider Kudo or Accept the helpful suggestions to help others who faced similar requirements.

If these also don't help, please share more detailed information to help us clarify your scenario to test.

How to Get Your Question Answered Quickly 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.
Anonymous
Not applicable

Hi @ngomes,

Perhaps you can try to use a web connector to get data from that API, it allows you to send tokens in the request header/body when working with 'anonymous' mode:

Chris Webb's BI Blog: Using The RelativePath And Query Options With Web.Contents() In Power Query An...

let
    authKey = "xxxxx",
    url = "https://bpstat.bportugal.pt/data/v1/",
    body = "xxxxxx",
    GetJson =
        Web.Contents(
            url,
            [
                Headers = [
                    #"Authorization" = authKey,
                    #"Content-Type" = "application/json"
                ],
                RelativePath = "xxxxxx/xxxxx",
                Content = Text.ToBinary(body)
            ]
        ),
    token = Json.Document(GetJson)[access_token],
    series_id = "xxxxxx",
    Result =
        Web.Contents(
            url,
            [
                Headers = [
                    #"Content-Type" = "application/json",
                    Authorization = "Bearer " + token
                ],
                RelativePath = "xxxxxx/xxxxx",
                Query = [
                    lang = "EN",
                    series_ids = series_id
                ]
            ]
        )
in
    Result

Regards,

Moonlight

lbendlin
Super User
Super User

looks like a standard anonymous API with load throttling.

Please provide a more detailed explanation of what you are aiming to achieve. What have you tried and where are you stuck?

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Power BI Monthly Update - May 2024

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