/gateways/{eui64}/streamer/power-thresholds/configuration
Sets the power thresholds alert configuration in the pt_mgmt shadow for a specific device. Each phase (mains, phase_1, phase_2, phase_3) accepts a list of threshold configurations. When threshold_value is omitted, the previously configured value is reused; if none exists (reset state), threshold_value is required.
put
Authorizations
x-api-keystringRequired
Path parameters
eui64stringRequiredExample:
The EUI64 of the device in hexadecimal format.
000d6f000011bcb3Body
Contains the power thresholds configuration. At least one phase must be provided. Each phase accepts at most 4 threshold configurations.
Responses
200
Successful operation
application/json
messagestringRequired
The success message returned.
400
Invalid request:
- Request body is required but was not provided.
- Schema validation failed due to error: At least one phase must be provided.
- Schema validation failed due to error: Invalid phase: '{phase}'.
- Schema validation failed due to error: Phase '{phase}' must be a non-empty list of threshold configurations.
- Schema validation failed due to error: Phase '{phase}' must contain at most 4 threshold configurations.
- Schema validation failed due to error: Each threshold in '{phase}' must be a dict.
- Schema validation failed due to error: Duplicate 'threshold_id': '{id}' in phase '{phase}'.
- Schema validation failed due to error: Invalid 'threshold_id': '{id}'.
- Schema validation failed due to error: Invalid 'alert_state': '{state}'.
- Schema validation failed due to error: Invalid 'alert_type': '{type}'.
- Schema validation failed due to error: Invalid 'aggregation_method': '{method}'.
- Schema validation failed due to error: Invalid 'cooldown': '{cooldown}'. Must be >= 1.
- Schema validation failed due to error: Invalid 'aggregation_sample_count': '{count}'. Must be between 1 and 120.
- Schema validation failed due to error: Invalid 'aggregation_sample_interval': '{interval}'. Must be >= 1.
- 'threshold_value' is required for '{threshold_id}' when changing 'alert_state' from 'reset' to a non-'reset' value and no previously configured threshold exists for the device.
- Edge events are not enabled for label partner '{labelpartner}'.
application/json
404
Not found:
- 400: The device '{eui64}' is not available in the IoT Thing registry.
application/json
500
Internal server error
application/json
put/gateways/{eui64}/streamer/power-thresholds/configuration
PUT /v2/gateways/{eui64}/streamer/power-thresholds/configuration HTTP/1.1
Host: device-management.n2g-dev.net
x-api-key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 839
{
"mains": [
{
"threshold_id": "threshold_0",
"alert_state": "enabled",
"threshold_value": 1,
"alert_type": "upper",
"cooldown": 1,
"aggregation_method": "mean",
"aggregation_sample_count": 1,
"aggregation_sample_interval": 1
}
],
"phase_1": [
{
"threshold_id": "threshold_0",
"alert_state": "enabled",
"threshold_value": 1,
"alert_type": "upper",
"cooldown": 1,
"aggregation_method": "mean",
"aggregation_sample_count": 1,
"aggregation_sample_interval": 1
}
],
"phase_2": [
{
"threshold_id": "threshold_0",
"alert_state": "enabled",
"threshold_value": 1,
"alert_type": "upper",
"cooldown": 1,
"aggregation_method": "mean",
"aggregation_sample_count": 1,
"aggregation_sample_interval": 1
}
],
"phase_3": [
{
"threshold_id": "threshold_0",
"alert_state": "enabled",
"threshold_value": 1,
"alert_type": "upper",
"cooldown": 1,
"aggregation_method": "mean",
"aggregation_sample_count": 1,
"aggregation_sample_interval": 1
}
]
}{
"message": "text"
}Previous/gateways/{eui64}/streamer/high-resolution
Next/gateways/{eui64}/streamer/capacity-peaks/configuration
Last updated
Was this helpful?

