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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

How to trigger a Task reload using AWS Lambda

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

2 Replies
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

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:


def StartTask(self, pName=None😞

  '''

  @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

http://masterssummit.com

http://qlikviewcookbook.com

blithenaresh
Contributor II
Contributor II

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.