Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

WITH CONNECTION + POST method + custom body message

Hi everyone,

I am looking for a working example of a REST connection using the WITH CONNECTION + POST method + a custom body message.

The online manual shows the following only "as far as I can see":

WITH CONNECTION(Url "https://content.googleapis.com/calendar/v3/calendars/primary/events?key=AIzaS...");

But nothing about how the syntax looks like if we want to add a POST and a body message in the case of a REST connection for example.

Any feedback will be very much appreciated

Regards, Youness

3 Replies
Not applicable
Author

Hello everyone,

I got help with my query and here I am sharing the code snippet:

Dummy:

SQL SELECT

    *

FROM CSV (header off, delimiter ",", quote """") "CSV_source"

WITH CONNECTION (

  URL "https://hooks.mysite.com/services/XYZXYZXYZ/ETC",

  HTTPHEADER "Content-Type" "application/json",

  BODY "{""text"": ""Posting from loadscript""}"

);

Enjoy and thumbs up for Alex Karlsson

// Youness

alis2063
Creator III
Creator III

Can we add table  fields in "with connection" body so in Email body it should be reflect as below

 

ID Amount

23,10000

 

with connection (
QUERY "to" "v@gmail.com "
,QUERY "message" "Total Sales greater than >20000 for $(vID)"
//,QUERY "subject" "$(vID)"
,QUERY "fromName" "NoReply"
,QUERY "fromEmail" "v@hotmail.com"

 


)

QFabian
MVP
MVP

excelent!!!, works for me!! thanks

Greetings!! Fabián Quezada (QFabian)
did it work for you? give like and mark the solution as accepted.