Updating Smart Engine Triggers with the API
Use the API to update trigger settings used to populate report data. To view a list of available triggers and their current settings use the GET /v1/subscriptions/{subscriptionLocator}/apps/{appId}/instances/{instanceId}/bw/smartengine/triggers method
. For additional information on triggers, see Smart Engine Trigger List.
To modify Smart Engine triggers you need the following:
- Subscription Locator — The Subscription Locator of the Organization you want to access. To find Subscription Locators for your organizations use the
GET /v1/userinfo
method to return a list of all of the organizations for your OAuth Token with their Subscription Locators. You can use 0 as the Subscription Locator for the organization that owns the OAuth token. -
App ID — ID of the app to be accessed, which can be retrieved using the
GET /v1/subscriptions/{subscriptionLocator}/apps
method. -
App Instance ID — ID of the app instance to be accessed, which can be retrieved using the
GET /v1/subscriptions/{subscriptionLocator}/apps/{appId}/instances
method. - Trigger ID — ID of the trigger to be updated for the specified app instance.
Use the PUT /v1/subscriptions/{subscriptionLocator}/apps/{appId}/instances/{instanceId}/bw/smartengine/triggers/{triggerId}
method to update the trigger settings for an app instance. Only the property being updated needs to be included. Properties that are not in the model are not updated.
Example
For trigger ID bw.montr.trigger.HighCPUTrigger
, the request body is as follows:
{
"highCpuDurationMins": 5,
"highCpuThresholdPercent": 80
}
Related Topics
Monitoring Apps with the TIBCO Cloud™ Integration API
Reporting with the TIBCO Cloud™ Integration API Using TIBCO BusinessWorks Smart Engine