Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello all,
The use case : I need to launch Tasks from the script.
What works :
1.on my dev environment, I created a certificate through https://<myserver>/saml/qmc/certificates
2. I set a certificate password and just put a localhost on the certificate name.
3. I copy pasted it from C:\ProgramData\Qlik\Sense\Repository\Exported Certificates
4. I created a connection like that :
5. I use this script
Let vServer = 'localhost';
Let vTaskName = 'Reload task of Extension.Usage.Dashboard';
Let vURL = '"https://$(vServer):4242/qrs/task/start?name=$(vTaskName) "';
LIB CONNECT TO 'REST_local_Task_Launcher';
RestTable:
SQL SELECT
FROM JSON (wrap on) "root"
WITH CONNECTION ( URL $(vURL) );
Drop Table RestTable;
exit script;
So, okay, I somehow cheated a little but that works ! 🙂
And now I have some difficulties doing the same thing on the production environnement. First of all, it's a multi-node.
So what do I have to do with certificate? What machine name? Which certificate do I have to copy on which machine?
Best regards,
Simon
EDIT : detailed procedure on page 2
Hello all,
I made it to work in multi-node. Same process except I also copy the client.pfx certificate from the central node on all nodes.
Best regards,
Simon
Hello all,
I made it to work in multi-node. Same process except I also copy the client.pfx certificate from the central node on all nodes.
Best regards,
Simon
Hi @simonaubert ,
Thanks so much for the response, I have followed your procedure closely but unfortunately I am getting the same error, it does not seem to make sense to me! The connector is definitely recognizing the certificate because if I try and enter the wrong password I get an error for wrong password. Couple more questions
1. Did you export the secret key
2. Did you choose windows format
3. Did you have to restart any services
4. Which version of Qlik Sense are you on
Thanks so much,
Mark
This approach was documented here in qlik support documents: https://support.qlik.com/articles/000048247
Hello all,
The article referenced by Lech was moved to: https://community.qlik.com/t5/Support-Knowledge-Base/How-to-setup-a-Data-Connection-to-the-QRS-API-u...
Thought I'd let you know to prevent any possible future dead-ends.
Hi @Sonja_Bauernfeind & @Lech_Miszkiewicz ,
Thanks so much for your responses, what is very strange is when I follow the steps from the article Lech has posted to create a GET Rest API connection to the repository I am succeeding and getting data from the repository, however when I try and makes a POST Rest API connection using the exact same certificate I am still getting the "HTTP protocol error 403 (No client certificate supplied): The server refused to fulfill the request."
Here is my connection details.
I will make a broader community post to see if anyone else has any thoughts, thanks again.
Mark
Hi @mjperreault
Which version of Qlik Sense are you running ? There were some issues with POST calls using certificates in older versions, such as February 2019, April 2019, June 2019.
I have used different approach and never tried to run POST with URL parameter like "?name=...."
My approach you can see in attached file (have a look at subroutine "QRS_Reload_App_ByName_N_Stream"...).
There are some other subs which are invalid due to fact that I was not able to use "X-HTTP-Method-Override", so please ignore them
thanks
Lech
Thanks for your rsponse @Damien_V , I think this is likely the issue! I am on February 2019 and I am able to make the same POST call using postman so it definitely seems like its an issue with the REST connector, I will try the workarounds mentioned in the article as well as the alternate approach @Lech_Miszkiewicz mentioned below.
Thanks again,
Mark
@Lech_Miszkiewicz will give this approach a shot, thanks so much!