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

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
coengiesberts_anva
Partner - Contributor III
Partner - Contributor III

Sending reload variables to app

Given the new functionality to add variables parameter to the reload API, I am eager to use that. I have written an automation that launches an app reload. Unfortunately I can't find a way the variables are accepted by the reloads API. 

Updated API - The Reloads API supports reload-time variable updates, and the Engine API supports con...

I am using the RAW API request block with the following input:

{ "path": "reloads", "HTTP_method": "POST", "body": { "appId": "04ea9dba-5d4a-45bc-aadf-9440fcf74da6", "weight": 10, "variables": { "var1": -2034 } }, "query_parameters": [], "blendr_on_error": "stop", "datasource": "18040b90-8932-11ee-bc7c-a11c13759a38" }

This results in RELOADS-001 : Invalid request.

If I leave the variables parameter out, there is no error. How can I make this work with variables?

Labels (2)
1 Solution

Accepted Solutions
coengiesberts_anva
Partner - Contributor III
Partner - Contributor III
Author

Well noticed. In the block editor I have entered "var1" : "2034" which gets converted to "var1" : 2034 in the automation log.

I've changed this into a string: "var1" : "text2034", which is properly accepted as "var1" : "text2034". Now the reload starts!

So there is thingy with numbers between quotes being converted to number without quotes, whereas strings are properly sent.

View solution in original post

4 Replies
Or
MVP
MVP

Not sure if that's the issue here, but { "var1": -2034 } should be { "var1": "-2034" } according to the documentation, near as I can tell. I don't have an environment to test in at the moment so I can't confirm. 

coengiesberts_anva
Partner - Contributor III
Partner - Contributor III
Author

Well noticed. In the block editor I have entered "var1" : "2034" which gets converted to "var1" : 2034 in the automation log.

I've changed this into a string: "var1" : "text2034", which is properly accepted as "var1" : "text2034". Now the reload starts!

So there is thingy with numbers between quotes being converted to number without quotes, whereas strings are properly sent.

Or
MVP
MVP

Probably best to inform Qlik so they can address it, but this is a fairly reasonable workaround at least. 

DaveChannon
Employee
Employee

Thanks for sharing - we have updates to the reload blocks in the backlog, so I'll add this to see if we can address it there.