Updates an existing Above/Below or Total Over Time threshold alert's definition
Use this endpoint to change an alert’s TriggerValue, Direction, or Interval. AlertType, UnitId, and the alert’s channel assignments cannot be changed after creation; use the channel association endpoint to manage which channels an alert applies to. Interval is required when the alert is ’total over time’ and must be omitted when it is ‘above/below’. Sentinel alerts cannot be edited.
Direction and Interval both affect which channels are eligible, so the alert’s existing channel assignments are re-checked against the requested values and the update is rejected if any of them would no longer be eligible. Changing Direction from ‘below’ to ‘above’ strands any Min-summarized channel, because Min is allowed only for ‘below’. Changing Interval strands any channel whose own interval no longer divides it a whole number of times. Detach the affected channels with DELETE /esaalert/{esaAlertId}/channel/{esaChannelId} first if the change is still wanted.
Request Headers
| Header | Value | Required | Description |
|---|---|---|---|
| ECI-ApiKey | string | Yes | Your API key. See Authentication. |
| Content-Type | application/json | Yes | All requests must specify JSON content type, including the request body. |
Path Parameters
| Name | Description | Type | Required |
|---|---|---|---|
| esaAlertId | Unique numeric identifier of the alert, supplied via the request path | integer (int32) | Required |
Request Body
| Property | Description | Type |
|---|---|---|
| direction | Direction the threshold is evaluated in. Valid values: ‘above’ or ‘below’. Changing this can invalidate existing channel assignments: a Min-summarized channel is eligible only for ‘below’, so switching to ‘above’ is rejected while any such channel is attached. Required One of ‘above’, ‘below’ | string |
| interval | Must be between 60 and 2147483647 Required (defined) | integer (int32) |
| triggerValue | Threshold value that triggers the alert. Required | number (double) |
{ "direction": "string", "interval": 1, "triggerValue": 1.0
}
Responses
Response Body Parameters
| Property | Description | Type | |||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| alertActive | Whether the alert is active. | boolean | |||||||||||||||||||||||||||||||||
| alertId | Primary key of the EsaAlert record. | integer (int32) | |||||||||||||||||||||||||||||||||
| alertMode | Alert mode. 2 = Manual. Automatic types such as Trend Insights use other values. | integer (int32) | |||||||||||||||||||||||||||||||||
| channels | The channels this alert is attached to, and the meter and place each one sits under. An alert can be attached to any number of channels, so this is a collection rather than a single id. Null and empty mean different things. Null means the endpoint does not supply the association - the create response does not, because the caller supplied the channel ids in the request. Empty means the alert genuinely has no channels attached. On the list endpoint (GET, threshold alerts), this only reports the channels that matched the request’s own filters - not necessarily every channel the alert is attached to. A channel-, meter-, place-, or status filter can each narrow it down to a subset. |
EsaAlertChannel[] | |||||||||||||||||||||||||||||||||
|
EsaAlertChannel properties
|
|||||||||||||||||||||||||||||||||||
| esaAlertSeverityRating | EsaAlertSeverityRating | ||||||||||||||||||||||||||||||||||
|
EsaAlertSeverityRating properties
|
|||||||||||||||||||||||||||||||||||
| esaAlertSeverityRatingId | FK to the alert’s EsaAlertSeverityRating. Create assigns Medium. | integer (int32) | |||||||||||||||||||||||||||||||||
| esaAlertType | EsaAlertType | ||||||||||||||||||||||||||||||||||
|
EsaAlertType properties
|
|||||||||||||||||||||||||||||||||||
| esaThresholdAlert | EsaThresholdAlert | ||||||||||||||||||||||||||||||||||
|
EsaThresholdAlert properties
|
|||||||||||||||||||||||||||||||||||
| unit | EsaAlertUnit | ||||||||||||||||||||||||||||||||||
|
EsaAlertUnit properties
|
|||||||||||||||||||||||||||||||||||
{ "alertActive": false, "alertId": 1, "alertMode": 1, "channels": [
{ "channelId": 1, "enabled": false, "meterId": 1, "placeId": 1
}
], "esaAlertSeverityRating": { "esaAlertSeverityRatingId": 1, "severityRatingDescription": "string", "severityRatingInfo": "string"
}, "esaAlertSeverityRatingId": 1, "esaAlertType": { "alertTypeDescription": "string", "alertTypeInfo": "string", "allowAutomatic": false, "allowManual": false, "canHaveAssignee": false, "esaAlertTypeId": 1, "requiresAssignee": false
}, "esaThresholdAlert": { "alertMode": 1, "esaAlertId": 1, "esaThresholdAlertId": 1, "interval": 1, "notificationTriggerCount": 1, "scheduleId": 1, "triggerValue": 1.0, "triggerValueType": 1, "unitId": 1
}, "unit": { "unitCode": "string", "unitDisplayName": "string", "unitId": 1, "unitInfo": "string", "unitType": { "unitTypeCode": "string", "unitTypeId": 1, "unitTypeInfo": "string"
}
}
}