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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
prees959
Creator II
Creator II

Dynamically build REST request body

Hi,

I need to post many rows to an API and rather than individually loop through each record I was wondering if I can dynamically create the request body.

My data or QueryList to POST is set up in the following way :

ID                      DESC

xxxxxxxx           Blue Buckets

aaaaaaa           Red Buckets

rrrrrrrrrrrr           Green Buckets

My REST connection when manually configured resembles this:

CUSTOM CONNECT TO "Provider=QvRestConnector.exe;url=https://xxxx.com/queryapi.php;timeout=30;method=POST;requestBody={

%3Query%3:

{

  %3Key%3: %xxxxxxxxxxxxxxxxxxxxx%3

},

  %3QueryListList%3: {

  %31%3: %3xxxxxxxx,Blue Buckets%3,

  %31%3: %3aaaaaaa,Red Buckets%3,

  %31%3: %3rrrrrrrrrrrr,Green Buckets%3

}

}

I have about 500 values to pass to the API service.  Rather than manually build the request body - is there a dynamic solution I could utilise?  Also, the QueryList will most likely change on a daily basis so the more automation we can build in the better.

Many thanks,

Phil

0 Replies