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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
karl184
Frequent Visitor

Post Api Call in Power Qwery

Hello All ,

I need to get data from this web call :

karl184_0-1688716065198.png

the blank space are names of company .

The Headers are :

#"Accept" = "application/json",
#"connector-name" = "sql",
#"Content-Type" = "application/json"

 

The Body :

{ "parameters": [ { "LIMIT": "55" }, { "OFFSET": "0" } ] }

 

Furthermore I have an Authorization Key .

I wrote this in advance editor :

let

Key = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",

URL = "karl184_1-1688716096524.png",

headers=
[
#"Authorization" = Key,
#"Accept" = "application/json",
#"connector-name" = "sql",
#"Content-Type" = "application/json"
],

Body=
"{""parameters"": [{""LIMIT"": ""55""},{""OFFSET"": ""0""}]}",

source = Json.Document(Web.Contents(URL, [Headers = headers,Content = Text.ToBinary(Body)]))

in
source

 

But it doesnt work : "name could not be resolved" 

 

 

Whereas when I test this api call online works :

Body :

karl184_4-1688715564743.png

 

Key :

karl184_1-1688714908743.png

 

Headers :

karl184_3-1688715513697.png

 

Works :

karl184_5-1688715662725.png

 

Could someone help me ? 

Thank you 

 

2 REPLIES 2
karl184
Frequent Visitor

I tried as well in Postman :

karl184_0-1688718936834.png

In Api Key Value I pasted the key .

Here the headers :

karl184_1-1688718990536.png

Then the body :

karl184_2-1688719033094.png

 

When I send the call is working :

karl184_3-1688719079060.png

Could someone help me ? 

Thank you 

Hello , any help ? 😭

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors
Top Kudoed Authors