NGSI Attribute value
This custom node is a simple node that allows to read or update an attribute value of NGSIv2 entity.
Read attribute value
It allows to read an attribute value of NGSIv2 entity.
Properties
name
: A name for a node instanceContext Broker
: An endpoint of a context brokerServicePath
: FIWARE Service PathAction type
:read
Entity id
: Id of an entity containing an attribute to be read valueEntity type
: Type of an entity containing an attribute to be read a valueAttribute name
: Attribute name of an attribute to be read a valueSkip forwarding
: If true, Context Broker skips forwarding to Context ProvidersEncode / Decode forbidden chars
:off
oron
Input
payload JSON Object
A msg.payload
should contain information related to the attribute vale to read.
The following payload uses value of each property.
{}
The following payload overwrites value of each property.
{
"id": "urn:ngsi-ld:attr-value",
"type: "T",
"attrName": "test",
"skipForwarding": true
}
Output
payload null, Boolean, Number, String or JSON Object
A msg.payload
contains an attribute value.
statusCode Number
A msg.statusCode
contains a status code.
200
Update attribute value
It allows to update an attribute value of NGSIv2 entity.
Properties
name
: A name for a node instanceContext Broker
: An endpoint of a context brokerServicePath
: FIWARE Service PathAction type
:update
Entity id
: Id of an entity containing an attribute to be updated valueEntity type
: Type of an entity containing an attribute to be updated a valueAttribute name
: Attribute name of an attribute to be updated a valueForced update
: If true, it triggers matching subscriptionsFlow control
: If true, it enables flow control mechanismEncode / Decode forbidden chars
:off
oron
Input
payload null, Boolean, Number, String or JSON Object
A msg.payload
should contain an attribute value.
null
true
123
abc
{
"abc": 123
}
["abc", 123]
Output
statusCode Number
A msg.statusCode
contains a status code.
204
Use value of actionType in payload
It allows to read or update an attribute value of NGSIv2 entity.
Properties
name
: A name for a node instanceContext Broker
: An endpoint of a context brokerServicePath
: FIWARE Service PathAction type
:value of actionType in payload
Entity id
: Id of an entity containing an attribute to be read or updated valueEntity type
: Type of an entity containing an attribute to be read or updated a valueAttribute name
: Attribute name of an attribute to be read or updated a valueSkip forwarding
: If true, Context Broker skips forwarding to Context ProvidersForced update
: If true, it triggers matching subscriptionsFlow control
: If true, it enables flow control mechanismEncode / Decode forbidden chars
:off
oron
Input 1
payload JSON Object
The following payload overwrites value of each property.
{
"actionType": "read",
"id": "urn:ngsi-ld:attr-value",
"type: "T",
"attrName": "test",
"skipForwarding": true
}
Output 1
payload null, Boolean, Number, String or JSON Object
A msg.payload
contains an attribute value.
statusCode Number
A msg.statusCode
contains a status code.
200
Input 2
payload JSON Object
A msg.payload
should contain an attribute value with related information.
It overwrites value of each property.
{
"actionType": "update",
"id": "urn:ngsi-ld:attr-value",
"type": "T",
"attrName": "test",
"value": null
}
{
"actionType": "update",
"id": "urn:ngsi-ld:attr-value",
"type": "T",
"attrName": "test",
"value": false
}
{
"actionType": "update",
"id": "urn:ngsi-ld:attr-value",
"type": "T",
"attrName": "test",
"value": 123
}
{
"actionType": "update",
"id": "urn:ngsi-ld:attr-value",
"type": "T",
"attrName": "test",
"value": "abc"
}
{
"actionType": "update",
"id": "urn:ngsi-ld:attr-value",
"type": "T",
"attrName": "test",
"value": {
"abc": 123
}
}
{
"actionType": "update",
"id": "urn:ngsi-ld:attr-value",
"type": "T",
"attrName": "test",
"value": ["abc", 123]
}
Output 2
statusCode Number
A msg.statusCode
contains a status code.
204