Adding an Alert Rule to an App with the API
Use the API to monitor apps by adding alert rules to specific app. Alerts monitor rule criteria such as CPU and memory usage.
Note: Alerts and notifications are supported only for TIBCO BusinessWorks and Flogo apps.
To add alert rules to apps in your organization, 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. - Rules ID — ID or name of the alert rule, such as TIB_APP_HIGH_CPU_GT_80_LE_90. See Alert Rules for a list of rule IDs and definitions.
- App ID — ID of the app to be accessed, which can be retrieved using the
GET /v1/subscriptions/{subscriptionLocator}/apps
method.
- Use the
POST /v1/subscriptions/{subscriptionLocator}/rules/{rulesId}
method to add an alert rule to an app. - Include the
rulesId
parameter to indicate the rule you want to assign to the app. - Include the
appId
parameter for the app you want to associate with the selected rule.
Role Requirements
- Admins can add alerts to apps for their organization.
- Users can add alerts to apps they own.
- Read-only users cannot add alerts to apps.