Agent Config: Get Node
The Agent Config: Get Node allows you to retrieve the values of one or all of the configuration settings for the instance of the Gateway Edge Agent. This node is only available in edge workflows.
Configuration
There is one main configuration section for this node:
- Fetch the entire configuration object: This options returns every configuration option that has a value defined, either explicitly or by the property’s default.
- Fetch a single configuration field: This option returns a specific edge configuration option, even if it has no value defined.
Result
Specify a payload path for where the requested agent configuration value(s) should be stored on you payload.
Depending on the provided configuration, the object placed at this path will take many different shapes …
Entire Configuration Object
When requesting the entire configuration object, the value at your payload path is an object with a key of .
and a value of a deeply nested object; for example …
{
"key": ".",
"value": {
"gateway": {
"host": "broker.losant.com",
...
},
...
}
}
Specific Configuration (Object)
Similar to requesting the entire configuration object, when requesting the value of a property that contains sub-properties (i.e. gateway
), the response takes the following shape:
{
"key": "gateway",
"value": {
"host": "broker.losant.com",
...
}
}
Specific Configuration (Single Value)
When requesting a single configuration value that contains no sub-properties (i.e. gateway.host
), the response takes the following shape:
{
"key": "gateway.host",
"value": "broker.losant.com"
}
Undefined Configuration Field
If you enter a configuration property that does not exist, the result takes the following shape:
{
"key": "nonexistentkey",
"value": undefined
}
Node Example
In the example above, the workflow will retrieve the value of the workflow.directory
config option. If the result path is set to working.edgeConfig
, and the read operation was successful, your output would look like the following:
{
"working": {
"edgeConfig": {
"key": "workflow.directory",
"value": "/data/flows"
}
}
}
Was this page helpful?
Still looking for help? You can also search the Losant Forums or submit your question there.