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
SJMC_LAB
Regular Visitor

Json POST Request through each row

Hi, 

New query user here. I have a table with one column as "start date", and the second column as "end date". I need to make JSON POST query using the two dates as parameters to be passed through in a JSON body. How do I make POST query for each row and combine all data in a single table?

 

I know how to make a single working query, but how do I loop through each row in advanced editor? I have done some research, but i couldn't find similar situations using more than one columns as parameters. My working query is like this:

 

let

          url = " http://www.xxx.xxx/..... ",

          headers=[#"accept"="application/json", #"Content-Type"="application/x-www-form-urlencoded"],

          PostBody = [

                    user_id =  "lasf3sd5423e1dsd2asdsdsdf",

                    startTime = DateTime.ToText("2022-03-01", "yyyy-MM-dd h:mm"),

                    endTime = DateTime.ToText(DateTime.LocalNow(), "yyyy-MM-dd h:mm")

                      ], 

 

          response = Json.Document(Web.Contents(url,

                     [

                               Headers = headers,

                               Content = Text.ToBinary(Uri.BuildQueryString(PostBody))

                     ]

                    )),

 

In

response

 

Thank you!

1 REPLY 1
Anonymous
Not applicable

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Top Kudoed Authors