2 Replies Latest reply: Mar 8, 2013 4:15 AM by Filippo Nicolussi Paolaz RSS

    how to reload document using QMS API



      We would like to reload a .qvw using the QMS API


      This code explained here: http://community.qlik.com/thread/47997 does not work for us since I guess because we don't have the publisher license so we cannot pass the QDS ID


      However, the following code works and reloads the document!

      // Initiate backend client
      var backendClient = new QMSClient();
      // Get a time limited service key
      ServiceKeyClientMessageInspector.ServiceKey = backendClient.GetTimeLimitedServiceKey();
      // refresh document with task id = 7fb52271-6625-48d8-ba2f-a17127c4b5b0
      backendClient.RunTask(new Guid("7fb52271-6625-48d8-ba2f-a17127c4b5b0"));




      To do this I manually copy pasted the Task ID output from the Task Log, from the QlikView management Console, e.g.

      (2012-07-04 12:20:30) Information: Starting task 'xx.qvw'. Id:61d6b167-01f7-4c3c-aaae-8a557a0fb7c5. Triggered by 'ScheduleTrigger'. Id:3518c856-f2ae-4ff7-8424-41819db8f835
      (2012-07-04 12:20:30) Information: Entering Task Execution. 
      (2012-07-04 12:20:30) Information: ClusterID=1
      (2012-07-04 12:20:30) Information: QDSID=3a12e466-2c80-5a0b-5486-8296623af820
      (2012-07-04 12:20:30) Information: TaskID=7fb52271-6625-48d8-ba2f-a17127c4b5b0
      (2012-07-04 12:20:30) Information: MaxRunTime=06:00:00
      (2012-07-04 12:20:30) Information: Max attempts:1
      (2012-07-04 12:20:30) Information: Current Attempt=0



      Is there a way to get the task ID by document?


      Note I tried many times with some methods of the QMSClient with no success.


      E,g, this does not work for me, it returns an empty list, even if the document has one reload schedule:




      Thanks in advance!