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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
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

3 Replies
rwunderlich
MVP
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. 

Ana31
Partner - Contributor III
Partner - Contributor III

Hey, Did you get any solution for the above? Do you know how to map the certificates to the 'user' created to access QRS in QMC. as I am getting 403 error in lambda