Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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.
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?
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.
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.
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.
Probably best to inform Qlik so they can address it, but this is a fairly reasonable workaround at least.
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.