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 Providers
Example
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.
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 mechanism
Example
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
Payload Number or null
A msg.payload
contains a status code.
204
null
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 mechanism
Examples
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.
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
Payload Number or null
A msg.payload
contains a status code.
204
null