This page describes how to use the Trigger Global Variables in the IoT Bridge.
global.values object.global.set().import protection to control how they can be modified during the import process.global.values, changes are not persisted to other triggers. Use global.set() to change the value of a global variable from a trigger.Global variables can be managed from the management portal by navigating to Triggers -> Global variables.

Global variables can be set via the API
POST /api/v1/triggers/globals HTTP/1.0
...
{
"key":"myvariable",
"value": "foobar"
}
Global variables can be queried from the API as well
GET /api/v1/triggers/globals HTTP/1.0
...
secret variables will export the current value, this behavior may be changed in the future.Import Protection enabled, importing a variable with the same name will fail, preserving the value configured in your account.Import Protection any value will be overwritten by a newly imported value.Global variables can be changed from a trigger using the global.set() function.
global.set('myvariable', 'foobar')
Global variables can be accessed by a trigger as well:
global.values.myvariable
The
global.valuesobject is populated when a trigger begins execution, calls toglobal.set()update values for future executions, but does NOT change theglobal.valuesobject in the running trigger, nor will a value change in any other trigger.