Update a Guardrail

When circumstances change, then you can update the Guardrail specifications.

Reference:

Field Option Description
Control Enabled/Disabled or true/false This enables or disables the guardrail
Min/Max Value Number Number
Increase Min/Max Value Number The minimum or maximum value increase change allowed from the current value for the asset / data stream pair
Decrease Min/Max Value Number The minimum or maximum value decrease change allowed from the current value for the asset / data stream pair

In this brief demo you can see the basic method;

To start, click on Guardrails in the Contextualization section of the left side bar, find the Guardrail you want to update and click on the edit icon on that row.

In Step 1 you can select whether to enable the guardrail immediately and set the minimum and maximum values allowed.

Control

This option allows you to immediately enable this guardrail or opt to keep is disabled and enable it later.

Basic - Min/Max Values

This option sets the minimum and maximum values allowed for the Asset / Data Stream pair.

Warning

Any values sent to the Asset / Data Stream pair outside of this range will be automatically rejected and the original value will remain in the Asset's data.

Option Description
Static Value A fixed value
Data Stream A dynamic value set by the last value of a selected Asset / Data Stream pair

Advanced - Increase/Decrease Min/Max Values

This option defines the minimum or maximum allowable change in a data value for the Asset / Data Stream pair.

Warning

Any values sent to the Asset / Data Stream pair outside of this allowable change range will be automatically rejected and the original value will remain in the Asset's data.

Option Description
Static Value A fixed value
% of Last Value The min / max change rate will be base on the percentage of the last value of the Asset / Data Steam range

Then click the Save button.

Congratulations, you have updated an Asset / Data Stream pair Guardrail.

Warning

Any values sent to the Asset / Data Stream pair outside of this min/max range will be automatically rejected and the original value will remain in the Asset's data.

Any values sent to the Asset / Data Stream pair outside of the defined allowable change range will be automatically rejected and the original value will remain in the Asset's data.

API cURL Example
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
curl -X 'POST' \
'https://<url.kelvin.ai>/api/v4/guardrails/krn%3Aad%3Apress_line_05%2Fmotor_speed_setpoint/update' \
-H "Authorization: Bearer <Your Current Token>" \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
        "control_disabled":false,
        "updater":{
            "number":{
                "max":{
                    "source":"krn:ad:press_line_05/speed_limit",
                    "inclusive":false
                }
            }
        },
        "number":{
            "relative":{

            },
            "min":{
                "value":900,
                "inclusive":true
            }
        }
    }'

You will get a response similar to this;

API cURL Example Response
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
{
"number": {
    "min": {
    "updated_at": "2024-10-03T04:26:20.672076Z",
    "updated_by": "krn:user:user@example.com",
    "inclusive": true,
    "value": 900
    },
    "max": null,
    "relative": {
    "increase": null,
    "decrease": null
    }
},
"updater": {
    "number": {
    "min": null,
    "max": {
        "source": "krn:ad:press_line_05/speed_limit",
        "inclusive": false
    }
    }
},
"created_by": "krn:user:user@example.com",
"created_at": "2024-10-03T03:42:57.674851Z",
"updated_by": "krn:user:user@example.com",
"updated_at": "2024-10-03T04:26:20.672076Z",
"resource": "krn:ad:press_line_05/motor_speed_setpoint",
"control_disabled": false
}

Currently this is not possible in the Kelvin Python API client.