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 assignment cannot be changed here; use the channel association endpoints to detach or attach the alert’s channel. 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 assignment is re-checked against the requested values and the update is rejected if it would no longer be eligible. Changing Direction from ‘below’ to ‘above’ strands a Min-summarized channel, because Min is allowed only for ‘below’. Changing Interval strands a channel whose own interval no longer divides it a whole number of times. Detach the affected channel with DELETE /esaalert/{esaAlertId}/channel/{esaChannelId} first if the change is still wanted, or create a new alert with the wanted definition for a channel that is eligible.
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. Required (defined) | boolean | |||||||||||||||||||||||||||||||||
| alertId | Primary key of the EsaAlert record. Required (defined) | integer (int32) | |||||||||||||||||||||||||||||||||
| alertMode | Alert mode. 2 = Manual. Automatic types such as Trend Insights use other values. Required (defined) | integer (int32) | |||||||||||||||||||||||||||||||||
| channels | The channels this alert is attached to, and the meter and place each one sits under. Alerts are currently limited to one channel each, so this holds at most one entry. It stays a collection because the data model supports an alert spanning several channels, and alerts created before that limit may still have more than one. Null and empty mean different things. Null means the endpoint does not supply the association. Empty means the alert genuinely has no channels attached. The create response always supplies it, holding the one channel each alert was created for. 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. Required (defined) |
EsaAlertChannel[] | |||||||||||||||||||||||||||||||||
|
EsaAlertChannel properties
|
|||||||||||||||||||||||||||||||||||
| esaAlertSeverityRating | EsaAlertSeverityRating | ||||||||||||||||||||||||||||||||||
|
EsaAlertSeverityRating properties
|
|||||||||||||||||||||||||||||||||||
| esaAlertSeverityRatingId | FK to the alert’s EsaAlertSeverityRating. Create assigns Medium. Required (defined) | 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"
}
}
}