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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.

Reply
Anonymous
Not applicable

Problem doing a POST request to download a file with Power Query

Hello. I have made two queries in POSTMAN to be able to download a file from a Rest API.

  • In the first query I obtain the session ID resulting from performing a GET with username and password. The headers obtained from this GET are: Host, UserAgent, Accept, Accept-Encoding, Connection and Cookie (with the session ID).
  • In the second and last query, I did a POST request with some parameters in the body (action, date, id, parameter1, JSONanswer, parameter2) and in the headers: content-type, accept-encoding, conecction, sec-ch-ua, sec-ch-ua-mobile, sec-ch-ua-platform, Upgrade-Insecure-Request, User-Agent, Accept, Host, Content-Lenght)

How can i perform the same process with power query? I could make the GET request and i have now a session ID but i dont know how to do the POST request to obtain the same file that i can download doing the POST request in POSTMAN.

1 ACCEPTED SOLUTION
ImkeF
Community Champion
Community Champion

Hi @Anonymous ,
to transform a GET to a POST request in Power Query you must add a record with a Content-field as a parameter to the call:
Chris Webb's BI Blog: Web Services And POST Requests In Power Query (crossjoin.co.uk)
Transformation of the content can easily be done using the Json.FromValue function:
Easy POST requests with Power BI and Power Query using Json.FromValue – (thebiccountant.com)



Imke Feldmann (The BIccountant)

If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!

How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries

View solution in original post

1 REPLY 1
ImkeF
Community Champion
Community Champion

Hi @Anonymous ,
to transform a GET to a POST request in Power Query you must add a record with a Content-field as a parameter to the call:
Chris Webb's BI Blog: Web Services And POST Requests In Power Query (crossjoin.co.uk)
Transformation of the content can easily be done using the Json.FromValue function:
Easy POST requests with Power BI and Power Query using Json.FromValue – (thebiccountant.com)



Imke Feldmann (The BIccountant)

If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!

How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors