Update Alert Rule
PUT/v1/alert-rule/:alertRuleUid
Update one existing alert rule by alertRuleUid.
Parameters
| Field | Type | Required | Description |
|---|---|---|---|
alertRuleUid | string | required | Unique Alert Rule Identification |
Body
| Field | Type | Required | Description |
|---|---|---|---|
name | string | optional | New name of the updated alert rule, at least two visible characters |
description | string | optional | New description |
alertType | string | optional | Accepted values 'DEVICE', 'POLICY', 'APPLET' |
organizationUids | array | optional | Organizations which is checked against the rule |
filter | object | optional | Pre-filter of devices which the alert will be checked against. It's used for percentage threshold of alert creation as base. The mandatory filter is organization set above. This is extended filter for example device applicationType (tizen, webos, etc.). Send {} to evaluate every device; a rule whose filter is null is not evaluated. |
conditions | object | optional | Specify all conditions which devices has to match to state alert as applicable. |
threshold | object | optional | Specify threshold of rule. It is comparing number of devices matched the conditions above relatively against the total number devices filtered by filter above |
periodicity | object | optional | Specify how often the rule will be checked against the current state of devices, and when: inside weekly time windows or, with followDeviceTimers, while each device's own on/off timers keep it on. See Periodicity below. |
action | object | optional | Optionally specify the action of alert rule. This action will happen when alert rule is creating an alert. |
Filter
| Field | Type | Required | Description |
|---|---|---|---|
applicationType | string | optional | Type of application one of ('sssp', 'tizen', 'webos', 'android', 'chrome', 'brightsign', 'linux', 'windows', 'default' ) |
applicationVersion | array | optional | Semver comparison of core app version [SemverOperator, string] - ([">", "3.12.0"]) |
frontDisplayVersion | array | optional | Semver comparison of internal front-display library version[SemverOperator, string] - ([">", "9.15.0"]) |
firmwareType | string | optional | Partial matching of string |
firmwareVersion | string | optional | Partial matching of string |
managementPackageVersion | array | optional | Semver comparison of core management package version ([">", "3.12.0"]) |
frontPackageVersion | array | optional | Semver comparison of core front package version ([">", "3.12.0"]) |
tagUids | string | optional | List of tags. Device has match all tags in list |
model | string | optional | Partial matching of string |
name | string | optional | Partial matching of string |
extendedManagement | boolean | optional | Filter device with or without extended management |
extendedManagement | Date | optional | Filter only devices provisioned since the date |
supportedResolutions | ResolutionItem | optional | Filter only devices supporting specified resolution |
locationUids | array | optional | Filter only devices in specified locations |
locationTagsUids | array | optional | Filter only devices in specified location tags |
Conditions
NumericOperator
| Operators |
|---|
| > |
| < |
| < |
| >= |
| = |
| != |
TimeRangeOperator
| Operators |
|---|
| > |
| < |
Conditions values types
| Condition type | Type | Example |
|---|---|---|
OCCURRENCES_IN_TIME_RANGE_TO_PAST | array | [operator: NumericOperator, occurrences: number, rangeInPastMs: number] -([">", 12, 36000]) |
NUMERIC_RANGE | array | [operator: NumericOperator, nmbr: number] - (">", 12) |
STRING_OCCURRENCES_IN_TIME_RANGE_TO_PAST | array | [str: string, operator: NumericOperator, occurrences: number, rangeInPastMs: number] - ("action", ">" 12, 36000) |
TIME_RANGE_TO_PAST | array | [operator: TimeRangeOperator, rangeInPastMs: number] - ("<", 36000) |
PERCENTAGE_RANGE | array | [operator: NumericOperator, percentage: number] - ("<", 50) |
NUMERIC_RANGE | array | [operator: NumericOperator, nmbr: number] - ("<", 50) |
NUMERIC_RANGE | string | 'DEVICE' |
MATCH_SEMVER | array | [operator: SemverOperator, version: string] - (">", "3.12.0") |
STRING_LIST | array | ["string1", "string2"] |
POLICY_LIST | string | One of ('VOLUME', 'BRIGHTNESS', 'TIMERS', 'PROPRIETARY_TIMERS', 'RESOLUTION', 'ORIENTATION', 'REMOTE_CONTROL', 'APPLICATION_VERSION', 'FIRMWARE_VERSION', 'DEBUG', 'DATETIME', 'POWER_ACTIONS_SCHEDULE', 'TEMPERATURE', 'BUNDLED_APPLET') |
WIFI_OR_ETHERNET | string | One of ('wifi', 'ethernet') |
INPUT_SOURCE | string | One of ('urlLauncher', 'hdmi1', 'hdmi2', 'hdmi3', 'hdmi4') |
TIMERS | array | TimerSettings[] |
RESOLUTION | object | ResolutionItem |
ORIENTATION | object | OrientationSettings |
Device condition
| Condition | Condition values | Description |
|---|---|---|
INCORRECT_TIME | BOOLEAN | Is used when device has incorrect time based on current time & timezone of device |
INVALID_SSL_CERTIFICATE | BOOLEAN | Is used when device is detected having some problems with SSL certificates (it can be even time related) |
FAILED_ACTIONS | BOOLEAN | Is used when device performing/executing action has failed for amount of time in past |
CONNECTIONS | BOOLEAN | Is used when device performing/executing action has failed for amount of time in past |
MODEL | array | BOOLEAN if device has model or not |
SERIAL_NUMBER | BOOLEAN | Check if device has serial number or not |
NAME | string | Check if device partially match some string |
PIN_CODE | boolean | Check if device has PIN code reported |
MANAGEMENT_PACKAGE_VERSION | MATCH_SEMVER | Check if device match semver version |
FRONT_PACKAGE_VERSION | MATCH_SEMVER | Check if device match semver version |
FRONT_DISPLAY_VERSION | MATCH_SEMVER | Check if device match semver version |
FIRMWARE_TYPE | string | Check if device match semver version |
TAG_UIDS | STRING_LIST | Check if device has selected tags |
POLICIES | POLICY_LIST | Check if device has selected policy settings |
LAST_PROVISION_AT | TIME_RANGE_TO_PAST | Check if device was provisioned in specified time range in past. Useful to detect new devices are provisioned |
LAST_DEPROVISION_AT | TIME_RANGE_TO_PAST | Check if device was deprovisioned in specified time range in past. Useful to detect devices are re-provisioned |
EXTENDED_MANAGEMENT | BOOLEAN | Check if device has access to extended management |
ALIVE_AT | TIME_RANGE_TO_PAST | Check if device last ping in specified time range in past |
NETWORK_INTERFACES | WIFI_OR_ETHERNET | Check if device is connected using WiFi or Ethernet |
BATTERY_STATUS | PERCENTAGE_RANGE | Check if device has enough or not enough battery |
STORAGE_STATUS | PERCENTAGE_RANGE | Check if device has or has not enough free storage |
CURRENT_TIMEZONE | MATCH_STRING | Check if timezone match the string |
DISPLAY_SETTING_BACKLIGHT | PERCENTAGE_RANGE | Check if match expected value of display settings |
DISPLAY_SETTING_CONTRAST | PERCENTAGE_RANGE | Check if match expected value of display settings |
DISPLAY_SETTING_SHARPNESS | PERCENTAGE_RANGE | Check if match expected value of display settings |
DISPLAY_SETTING_MAX_TEMPERATURE | NUMERIC_RANGE | Max temperature in celsius |
INPUT_SOURCE | INPUT_SOURCE | Check if current input source is set to specified source |
VOLUME | PERCENTAGE_RANGE | Check if current volume is expected |
BRIGHTNESS | PERCENTAGE_RANGE | Check if current brightness is expected |
TIMERS | TIMERS | Check if current native timers are set as expected |
PROPRIETARY_TIMERS | TIMERS | Check if current proprietary timers are set as expected |
RESOLUTION | RESOLUTION | Check if current resolution is set as expected |
ORIENTATION | ORIENTATION | Check if current orientation is set as expected |
REMOTE_CONTROL | BOOLEAN | Check if current RC is locked or not |
APPLICATION_VERSION | MATCH_SEMVER | Check if current core app version is correct |
FIRMWARE_VERSION | MATCH_STRING | Check if current FW version match some string |
DEBUG | BOOLEAN | Check if debug is enabled or not |
POWER_ACTIONS_SCHEDULE | SCHEDULED_POWER_ACTIONS | Check if current scheduled power actions are correctly set |
TEMPERATURE | NUMERIC_RANGE | Check if current temperature in degrees Celsius is in specified range |
CPU_USAGE | PERCENTAGE_RANGE | Check if the latest reported CPU usage percentage is in specified range |
MEMORY_USAGE | PERCENTAGE_RANGE | Check if the latest reported memory usage percentage is in specified range |
UPTIME | NUMERIC_RANGE | Check if the device's latest reported boot uptime in seconds (UPTIME telemetry bootUptimeSeconds) is in specified range |
INSTALLED_PACKAGE | MATCH_STRING | Check if specified package is installed |
SCREENSHOT | OCCURRENCES_IN_TIME_RANGE_TO_PAST | Check if number of screenshots was received in time |
FEATURE_TESTS | BOOLEAN | Check if feature tests has passed |
Policy condition
Set op to true to match devices that are violating the policy item, or false to match devices that comply with it. This is the inverse of the success field returned by GET /v1/device/{deviceUid}/policy-status.
| Condition | Condition values | Description |
|---|---|---|
POLICY_VIOLATION_VOLUME | BOOLEAN | Check violation of any of existing policy device settings type |
POLICY_VIOLATION_BRIGHTNESS | BOOLEAN | Check violation of any of existing policy device settings type |
POLICY_VIOLATION_TIMERS | BOOLEAN | Check violation of any of existing policy device settings type |
POLICY_VIOLATION_PROPRIETARY_TIMERS | BOOLEAN | Check violation of any of existing policy device settings type |
POLICY_VIOLATION_RESOLUTION | BOOLEAN | Check violation of any of existing policy device settings type |
POLICY_VIOLATION_ORIENTATION | BOOLEAN | Check violation of any of existing policy device settings type |
POLICY_VIOLATION_REMOTE_CONTROL | BOOLEAN | Check violation of any of existing policy device settings type |
POLICY_VIOLATION_APPLICATION_VERSION | BOOLEAN | Check violation of any of existing policy device settings type |
POLICY_VIOLATION_FIRMWARE_VERSION | BOOLEAN | Check violation of any of existing policy device settings type |
POLICY_VIOLATION_DEBUG | BOOLEAN | Check violation of any of existing policy device settings type |
POLICY_VIOLATION_DATETIME | BOOLEAN | Check violation of any of existing policy device settings type |
POLICY_VIOLATION_POWER_ACTIONS_SCHEDULE | BOOLEAN | Check violation of any of existing policy device settings type |
POLICY_VIOLATION_TEMPERATURE | BOOLEAN | Check violation of any of existing policy device settings type |
Applet condition
| Condition | Condition values | Description |
|---|---|---|
APPLET_COMMAND | STRING_OCCURRENCES_IN_TIME_RANGE_TO_PAST | Is used when to check custom user defined commands occurrences in time |
Threshold
| Field | Type | Required | Description |
|---|---|---|---|
type | string | required | Currently only percentage implemented - percentage' |
percentage | number | required | The number of percent from 0 to 99 (100 is never matched) |
Periodicity
| Field | Type | Required | Description |
|---|---|---|---|
interval | integer | required | How often the rule is checked against the current state, in seconds, from 30 to 3600 |
activeTimeWindows | array | required | Weekly windows, in each device's local time, outside of which the rule is not checked. With none, the rule is checked at any time. Ignored while followDeviceTimers is true, but still required: send []. |
followDeviceTimers | boolean | optional | When true, each device is checked only while its on/off timers keep it on, in the device's local time, and activeTimeWindows are ignored. Default false. |
periodicity is replaced as a whole: send interval, activeTimeWindows and, to keep it on, followDeviceTimers every time.
With followDeviceTimers:
- A device with no timers set is always checked, at any hour, as if the rule had no time windows. That covers a device that never reported timers and one whose timers were all cleared. For example, when a rule covers a display with a timer from 08:00 to 20:00 and a player with no timers, at 23:00 only the player is checked.
- Native and proprietary timers are both read, as the device last reported them. A device is off when either list says so, and it still counts as off for 5 minutes after a timer turns it on.
- A device whose timers only have off times is never checked.
- A device that is off raises no alert and is left out of the threshold percentage. A device that is already in an open alert stays there until it is on again and no longer matches.
nullis rejected; sendfalseto turn it off.
Action
Account alert actions
| Action type | Type | Required | Description |
|---|---|---|---|
type | string | required | All specified accounts are notified using account notification settings' - (type: 'accounts') |
accountIds | array of accountIds | required | AccountIds in array, which will be notified about alert |
Organization accounts alert actions
| Action type | Type | Required | Description |
|---|---|---|---|
type | string | required | All accounts assigned to organization of creating rule are notified using account notification settings' (type: 'organization_accounts') |
Email alert actions
| Action type | Type | Required | Description |
|---|---|---|---|
type | string | required | All accounts assigned to organization of creating rule are notified using account notification settings' (type: 'emailAddresses') |
emailAddresses | array of emails | required | Array of email addresses, which will be notified about alert |
Request
Responses
- 200
- 400
- 401
- 402
- 404
Success
Bad request
Bad request
Payment Required - Feature entitlement missing
Not Found