Forum Discussion
Dynamically pass query in POST API BODY
Hi Anuj6 ,
How about the result after you follow the suggestions mentioned in my original post?Could you please provide more details about it If it doesn't meet your requirement?
Best regards,
Hi Dong_li,
No , it didnt work for me , i was trying to pass some of the Body parameters dynamically.
Though i achieved it using below code
GetTable1 = (url as text,DS_ID as text,tb_nm as text) =>
let
body =
"{""queryConfigurationDto"": {
""configurationName"":""TEST"",
""applicationId"":""ABT_4ba6bf1d-f1ac-4efd-a58e-4c79234dse"",
""configAdgroups"":[""ALL_ACCESS""],
""readAdgroups"":[""ALL_ACCESS""],
""decryptionAccessAdGroups"":[],
""configurationType"":""QUERY"",
""dataSourceConfigurationId"":"""& DS_ID &""",
""query"":""select * from "& tb_nm &" LIMIT 1000"",
""mandatoryParams"":[],
""encryptedParams"":[],
""paramValues"":{}},
""dataAccessRequest"":{""parameters"":{},""responseFormat"":"" ""}}",
Thanks!
Anuj