Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
RVeitch_84
Creator
Creator

tREST how to loop and pass fixed and global variables in the HTTP Body?

I have some fixed variables which are as follows:

"{\"location_ids\":[\"1122\", \"1123\", \"1124\", \"1125\",\"1126\",\"1127\"]}"

And are working fine in the tREST component

0695b00000F6Y8QAAV.png

, but I would also like to get a fixed variable in as well for the cursor:

(String) globalMap.get("abcd")

Here is a basic overview of the job:

0695b00000F6Y8uAAF.png

Labels (4)
2 Replies
Anonymous
Not applicable

@Robert Veitch​ , Sorry, I think I don't understand your requirement well, where you will use the global variable? Can you show an example? and explain why you need to loop the API call? As I see there is no tLoop component in the job or no multiple input records.

 

Regards

Shong

RVeitch_84
Creator
Creator
Author

 

Shong, Thanks for the reply, see updaded job, I threw it into a pdf to hopefully explain my thoughts, see attached?

Here are the basic steps:

  • Pass location_ids which are fixed into the body
  • Pass cursor if avaiable into the body as well, and the cursor isn't present the first time you run the job?
  • Next step is to loop through until no more cursors are present?

 

Please let me know if you have any other questions.

Thanks

~Bob