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: 
Anonymous
Not applicable

Calling a Rest URL that contains Hash value

Hi,

I'm trying to execute a REST call using tRESTClient.

I used this before, and it works fine, but for this specific service, where the authentication contains a hashed value that expires every 5 minutes.

So I need to have this value created at runtime.

 

0683p000009MaWZ.png

 

I found the following code that needs to be used to create te hash : 

 

var auth = accountId + ':' + apiKeyId + ':' + (new Date()).getTime();
var authHash = auth + ':' + CryptoJS.SHA512(auth + apiKey).toString(CryptoJS.enc.Hex);

 

I have the values for accountId,apiKeyId & apiKey

 

How (and where) do I create 'authHash' value in my job ?

BTW. I'm not a seasoned developer, 

thanks for any help.

G.

 

Labels (3)
2 Replies
root
Creator II
Creator II

Before invoking the tRestClient, you can use a tJava/ tMap or similar to generate this value, save it in a context/ globalMap and use that value in your query parameters.
root
Creator II
Creator II

Before invoking the tRestClient, you can use a tJava/ tMap or similar to generate this value, save it in a context/ globalMap and use that value in your query parameters.