monitor

PUT /v1/projects/{projectOrProductUID}/monitors/{monitorUID}

Changed on

Update Monitor

Request

  • Base URL
    https://api.notefile.net
  • URL
    https://api.notefile.net/v1/projects/{projectOrProductUID}/monitors/{monitorUID}
  • Auth
    HTTP bearer

Path parameters

projectOrProductUIDstring required
monitorUIDstring required

Request body

aggregate_function'none' | 'avg' | 'max' | 'min' | 'sum' | 'count'

Aggregate function to apply to the selected values before applying the condition. [none, avg, max, min, sum, count]

aggregate_windowstring

The time window to aggregate the selected values. It follows the format of a number followed by a time unit

alertboolean

If true, the monitor is in alert state.

condition_type'greater_than' | 'greater_than_or_equal_to' | 'less_than' | 'less_than_or_equal_to' | 'equal_to' | 'not_equal_to'

A comparison operation to apply to the value selected by the source_selector. Required for event and usage monitors; set automatically for heartbeat monitors. [greater_than, greater_than_or_equal_to, less_than, less_than_or_equal_to, equal_to, not_equal_to]

descriptionstring
disabledboolean

If true, the monitor will not be evaluated.

fleet_filterstring[]
last_routed_atstring

The last time the monitor was evaluated and routed.

namestring
notefile_filterstring[]
per_deviceboolean

Only relevant when using an aggregate_function. If true, the monitor will be evaluated per device, | rather than across the set of selected devices. If true then if a single device matches the specified criteria, | and alert will be created, otherwise the aggregate function will be applied across all devices.

routing_cooldown_periodstring

The time period to wait before routing another event after the monitor | has been triggered. It follows the format of a number followed by a time unit.

silencedboolean

If true, alerts will be created, but no notifications will be sent.

source_selectorstring

A dot-delimited path to a single numeric value within the event body.

source_type'event' | 'heartbeat' | 'usage'

The type of source to monitor. Defaults to "event".

thresholdnumber double

The value that condition_type compares against. For heartbeat monitors this is seconds of inactivity; for usage monitors it is bytes.

uidstring
usage_scopestring

For usage monitors: the scope of aggregation. Supported values are "device" and "fleet".

usage_typestring

For usage monitors: the type of data usage to monitor. Supported values are "cellular" and "satellite".

usage_windowinteger

For usage monitors: the rolling time window in days to sum usage over (e.g. 30 for 30 days).

Example request

{
  "aggregate_window": "10m or 5h30m40s",
  "alert_routes": [
    {
      "email": "example@blues.com"
    }
  ],
  "routing_cooldown_period": "10m or 5h30m40s",
  "source_selector": "temperature"
}

Response

Successful operation

aggregate_function'none' | 'avg' | 'max' | 'min' | 'sum' | 'count'

Aggregate function to apply to the selected values before applying the condition. [none, avg, max, min, sum, count]

aggregate_windowstring

The time window to aggregate the selected values. It follows the format of a number followed by a time unit

alertboolean

If true, the monitor is in alert state.

condition_type'greater_than' | 'greater_than_or_equal_to' | 'less_than' | 'less_than_or_equal_to' | 'equal_to' | 'not_equal_to'

A comparison operation to apply to the value selected by the source_selector. Required for event and usage monitors; set automatically for heartbeat monitors. [greater_than, greater_than_or_equal_to, less_than, less_than_or_equal_to, equal_to, not_equal_to]

descriptionstring
disabledboolean

If true, the monitor will not be evaluated.

fleet_filterstring[]
last_routed_atstring

The last time the monitor was evaluated and routed.

namestring
notefile_filterstring[]
per_deviceboolean

Only relevant when using an aggregate_function. If true, the monitor will be evaluated per device, | rather than across the set of selected devices. If true then if a single device matches the specified criteria, | and alert will be created, otherwise the aggregate function will be applied across all devices.

routing_cooldown_periodstring

The time period to wait before routing another event after the monitor | has been triggered. It follows the format of a number followed by a time unit.

silencedboolean

If true, alerts will be created, but no notifications will be sent.

source_selectorstring

A dot-delimited path to a single numeric value within the event body.

source_type'event' | 'heartbeat' | 'usage'

The type of source to monitor. Defaults to "event".

thresholdnumber double

The value that condition_type compares against. For heartbeat monitors this is seconds of inactivity; for usage monitors it is bytes.

uidstring
usage_scopestring

For usage monitors: the scope of aggregation. Supported values are "device" and "fleet".

usage_typestring

For usage monitors: the type of data usage to monitor. Supported values are "cellular" and "satellite".

usage_windowinteger

For usage monitors: the rolling time window in days to sum usage over (e.g. 30 for 30 days).

Example response

{
  "aggregate_window": "10m or 5h30m40s",
  "alert_routes": [
    {
      "email": "example@blues.com"
    }
  ],
  "routing_cooldown_period": "10m or 5h30m40s",
  "source_selector": "temperature"
}

Changes

    • breaking

      the response's property type changed from integer to number, and format from int32 to double for status

    • warning

      changed the pattern of the request property from ^[0-9]+[smh]$ to ^(([0-9]+[.]?[0-9]*|[.][0-9]+)(ns|us|µs|ms|s|m|h))+$

    • warning

      changed the pattern of the request property from ^[0-9]+[smh]$ to ^(([0-9]+[.]?[0-9]*|[.][0-9]+)(ns|us|µs|ms|s|m|h))+$

    • info

      the request property type was generalized from integer to number, and format from int32 to double

    • info

      the response's property pattern was changed from ^[0-9]+[smh]$ to ^(([0-9]+[.]?[0-9]*|[.][0-9]+)(ns|us|µs|ms|s|m|h))+$ for the status

    • info

      the response's property pattern was changed from ^[0-9]+[smh]$ to ^(([0-9]+[.]?[0-9]*|[.][0-9]+)(ns|us|µs|ms|s|m|h))+$ for the status

    • breaking

      removed the enum value average of the request property

    • breaking

      removed the enum value count of the request property

    • breaking

      removed the enum value device of the request property

    • warning

      added the new avg enum value to the response property for the response status

    • warning

      added the new count enum value to the response property for the response status

    • info

      added the new avg enum value to the request property

    • info

      added the new count enum value to the request property

    • info

      removed the average enum value from the response property for the response status

    • info

      removed the count enum value from the response property for the response status

    • info

      removed the device enum value from the response property for the response status