Qlik Community

Qlik Sense Integration, Extensions, & APIs

Discussion board where members can learn more about Integration, Extensions and API’s for Qlik Sense.

Announcements
Qlik® Product Spotlight: Discover what’s possible. Get more from our products.
See for yourself. Register today.
margiro29
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

1 Reply
rwunderlich
Not applicable

Re: How to trigger a Task reload using AWS Lambda

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'Smiley TongueName}).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