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

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

Reply
Richard_Halsall
Helper IV
Helper IV

Converting Postman Body Request to JSON body

Hi

 

I am facing an issue to replicate the body POST request from Postman into PQ.

 

This works in Postman

{
    "query""query { boards (ids: 123456789) { items_page (limit:500, query_params: {rules: [{column_id: \"person\", compare_value: [\"Alex\"], operator: contains_text}]}) { cursor items { id name column_values { column{title} text}}}}}"
}
 
And here is my PQ

let
Key = MondayKey,
Board = id_board,
ColumnID = ColumnIDPerson,
PM = PMAlex,
 
Source = Web.Contents(MondayBaseURL,
 
[
        RelativePath="v2",
        Headers=[
            #"Method"="POST",
            #"Content-Type"="application/json",
            #"Authorization"= Key,
            #"API-Version" = "2023-10"
            ],
            Content=Text.ToBinary("{""query"": { boards (ids: " & Board & ") {items_page (limit:500, query_params: {rules: [{""column_id"": " & ColumnID & " , ""compare_value"":  " & PM & " , ""operator"": contains_text}]}) { cursor items { id name column_values { column{title} text}}}}}""}")
        ]
    ),
    #"JSON" = Json.Document(Source,65001),
 
Highlighted in red is the problem code. I have 2 parameters both text named
ColumnID value = \"person\"
PM value = \"Alex\"
 
Tried multiple formats but just cannot resolve. Any help would be appreciated
 
Thanks
1 ACCEPTED SOLUTION
lbendlin
Super User
Super User

Have a look at example 2 Web.Contents - PowerQuery M | Microsoft Learn

 

Something like

 

Content = Json.FromValue([query= "query { boards (ids: 123456789) { items_page (limit:500, query_params: {rules: [{column_id: ""person"", compare_value: [""Alex""], operator: contains_text}]}) { cursor items { id name column_values { column{title} text}}}}}"])

View solution in original post

2 REPLIES 2
lbendlin
Super User
Super User

Have a look at example 2 Web.Contents - PowerQuery M | Microsoft Learn

 

Something like

 

Content = Json.FromValue([query= "query { boards (ids: 123456789) { items_page (limit:500, query_params: {rules: [{column_id: ""person"", compare_value: [""Alex""], operator: contains_text}]}) { cursor items { id name column_values { column{title} text}}}}}"])

@lbendlin Many thanks

Helpful resources

Announcements
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.

Top Kudoed Authors