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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
userabd1234
Regular Visitor

GET API Request with JSON Body

I am trying to use a GET API that has a query parameter & json body content needed for the GET request. I am getting a 405 error. Any help is appreciated

 

let

url = "",

body = "",

response = Web.Contents(url,

[

Headers=[#"Content-Type"="application/json", #"Accept"="*/*"],
Content = Text.ToBinary(body),
Query = reportFormat = "csv"

]
),

Source = Csv.Document(response)
in

Source

2 REPLIES 2
Anonymous
Not applicable

Hi @userabd1234 ,

 

The 405 error generally occurs because the request method is not allowed. If content exists, change the request method to POST and pass JSON data in the request body. To use a GET request, attach the parameters to the end of the URL using the symbol ? to append the parameters to the end of the URL.

 

vlinhuizhmsft_2-1736912976978.png

 

Here's the relevant link:  Web.Contents - PowerQuery M | Microsoft Learn

 

Best Regards,
Zhu

 

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

Hi, @Anonymous 

 

I can't change the API to post, and the JSON body cannot live within the URL. Is there not a way to call a GET API that requires a JSON body within powerbi? I've read other situations where using web contents with content automatically turns the call into a POST. How do you get around this limitation if you have a GET API with a json body?

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

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.