Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
Is there a way to trigger a Qlik Sense reload using AWS Lambda?
Anyone has a some sample code to share?
Thank you
I've done this using the qsAPI package GitHub - rafael-sanz/qsAPI: QlikSense python API client for QPS and QRS interfaces
I added a "StartTask" method to the library. I suppose I should submit a pull request to GitHub, but for now here is the method I added:
'''
@Function: Start a task by name
@param pName: Task Name
@return : json response
'''
return self.driver.post('/qrs/task/start/synchronous', param={'name':pName}).json()
And here's my AWS Lambda function:
def lambda_handler(event, context):
import qsAPI
import os
PROXY = os.environ['proxy']
qrs=qsAPI.QRS(proxy=PROXY, certificate='client.pem')
qrs.StartTask('ReloadCallCenterStatus')
"proxy" is an environment variable that contains my Qlik Sense server address.
-Rob
Where did you copy the 'client.pem' file? Furthermore, I was able to generate a 'client.pfx' file but not .pem file.
It doesn't even have the .pfx extension on file name, but it just shows in file properties.