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: 
fabricecallegari
Partner - Creator
Partner - Creator

API - configure trigger

Hello,

 

I created a task and a trigger using the API (/qrs/reloadtask/update), but I can't configure it to trigger it at a wish date.

Does somebody help me?

schemaEvents = @(@{
name = "trigger_test";
enabled = $true;
eventType = 0;
startDate = "$date";
expirationDate = "9999-12-30T23:59:59.999Z";
schemaFilterDescription = @("* * - * * * * *");
incrementDescription = "0 0 1 0";
incrementOption = "2";
reloadTask = @{
id = $id
}
})

What should I change to configure a reload every day at 1AM for example?

 

regards

Fab

Labels (3)
1 Solution

Accepted Solutions
Levi_Turner
Employee
Employee

Every 15 minutes:

{
   "task":null,
   "compositeEventsToDelete":[

   ],
   "schemaEventsToDelete":[

   ],
   "compositeEvents":[

   ],
   "schemaEvents":[
      {
         "name":"Hourly",
         "enabled":true,
         "eventType":0,
         "timeZone":"America/New_York",
         "daylightSavingTime":0,
         "startDate":"2019-06-19T14:21:41.000",
         "expirationDate":"9999-01-01T00:00:00.000",
         "schemaFilterDescription":[
            "* * - * * * * *"
         ],
         "incrementDescription":"15 0 0 0",
         "incrementOption":"1",
         "privileges":[
            "read",
            "update",
            "create",
            "delete"
         ],
         "reloadTask":{
            "id":"ec0dc99b-53bf-42ff-a70e-3b24f8190bf4"
         }
      }
   ]
}

 

There isn't secret sauce here. Remember you can always:

  • Go into the QMC
  • Have Dev Tools Open
  • Do your action (1)
  • Navigate to the Network tab (in Chrome, but other browsers have similar functionality) (2)
  • Filter by XHR for the REST calls (3)
  • Inspect the body of the call / path / whatever you're interested in (4)

2019-06-19 14_17_43.png

 

View solution in original post

3 Replies
Levi_Turner
Employee
Employee

The easiest way would be to call POST /qrs/ReloadTask/update. For example, this body scopes to a daily trigger starting at 1AM / 01:00 in the EST Timezone:

 

{
   "task":null,
   "compositeEventsToDelete":[

   ],
   "schemaEventsToDelete":[

   ],
   "compositeEvents":[

   ],
   "schemaEvents":[
      {
         "name":"Daily",
         "enabled":true,
         "eventType":0,
         "timeZone":"America/New_York",
         "daylightSavingTime":0,
         "startDate":"2019-06-18T01:00:51.000",
         "expirationDate":"9999-01-01T00:00:00.000",
         "schemaFilterDescription":[
            "* * - * * * * *"
         ],
         "incrementDescription":"0 0 1 0",
         "incrementOption":"2",
         "privileges":[
            "read",
            "update",
            "create",
            "delete"
         ],
         "reloadTask":{
            "id":"9981ae16-a0fa-466e-a2c2-b8588eafe395"
         }
      }
   ]
}

 

You would want to adjust the timezone perhaps and certainly the SchemaEvents > reloadTask element to match the GUID of the reload task in your environment. 

fabricecallegari
Partner - Creator
Partner - Creator
Author

Hello Levi

thank for your answer, but I didn't understand how the planning configuration works.

Can you show another exemple with a loading every 15 minutes for example?

 

regards

fab

Levi_Turner
Employee
Employee

Every 15 minutes:

{
   "task":null,
   "compositeEventsToDelete":[

   ],
   "schemaEventsToDelete":[

   ],
   "compositeEvents":[

   ],
   "schemaEvents":[
      {
         "name":"Hourly",
         "enabled":true,
         "eventType":0,
         "timeZone":"America/New_York",
         "daylightSavingTime":0,
         "startDate":"2019-06-19T14:21:41.000",
         "expirationDate":"9999-01-01T00:00:00.000",
         "schemaFilterDescription":[
            "* * - * * * * *"
         ],
         "incrementDescription":"15 0 0 0",
         "incrementOption":"1",
         "privileges":[
            "read",
            "update",
            "create",
            "delete"
         ],
         "reloadTask":{
            "id":"ec0dc99b-53bf-42ff-a70e-3b24f8190bf4"
         }
      }
   ]
}

 

There isn't secret sauce here. Remember you can always:

  • Go into the QMC
  • Have Dev Tools Open
  • Do your action (1)
  • Navigate to the Network tab (in Chrome, but other browsers have similar functionality) (2)
  • Filter by XHR for the REST calls (3)
  • Inspect the body of the call / path / whatever you're interested in (4)

2019-06-19 14_17_43.png