NGSI attribute
This custom node is a simple node that allows to read, update or delete an attribute in NGSIv2 entity.

Read an attribute
It allows to read an attribute in NGSIv2 entity.
Properties

name: A name for a node instanceContext Broker: An endpoint of a context brokerServicePath: FIWARE Service PathAction type:readEntity id: Id of an entity containing an attribute to be readEntity type: Type of an entity containing an attribute to be readAttribute name: Attribute name of an attribute to be readMetadata: List of metadata namesSkip forwarding: If true, Context Broker skips forwarding to Context ProvidersEncode / Decode forbidden chars:offoron
Input
payload JSON Object
A msg.payload should contain information related to the attribute to read.
{}
{
"attrName": "relativeHumidity"
}
{
"id": "E",
"type": "T",
"attrName": "relativeHumidity"
}
Output
payload JSON Object
A msg.payload contains an object representing the attribute.
{
"type":"Number",
"value":45,
"metadata":{}
}
statusCode Number
A msg.statusCode contains a status code.
200
Update an attribute
It allows to update an attribute in NGSIv2 entity.
Properties

name: A name for a node instanceContext Broker: An endpoint of a context brokerServicePath: FIWARE Service PathAction type:updateEntity id: Id of an entity containing an attribute to be updatedEntity type: Type of an entity containing an attribute to be updatedAttribute name: Attribute name of an attribute to be updatedOverride metadata: If true, it replaces the existing metadataForced update: If true, it triggers matching subscriptionsFlow control: If true, it enables flow control mechanismEncode / Decode forbidden chars:offoron
Input
payload JSON Object
A msg.payload should contain an object representing the attribute to update.
{
"type": "Number",
"value": 1234.5
}
Output
statusCode Number
A msg.statusCode contains a status code.
204
Delete an attribute
It allows to delete an attribute in NGSIv2 entity.
Properties

name: A name for a node instanceContext Broker: An endpoint of a context brokerServicePath: FIWARE Service PathAction type:deleteEntity id: Id of an entity containing an attribute to be deletedEntity type: Type of an entity containing an attribute to be deleteAttribute name: Attribute name of an attribute to be deletedEncode / Decode forbidden chars:offoron
Input
payload JSON Object
A msg.payload should contain information related to the attribute to delete.
{}
{
"attrName": "relativeHumidity"
}
{
"id": "E",
"type": "T",
"attrName": "relativeHumidity"
}
Output
payload Number or null
A msg.payload contains a status code.
204
Use value of actionType in payload
It allows to read, update or delete an attribute in 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 payloadEntity id: Id of an entity containing an attribute to be read, updated or deleteEntity type: Type of an entity containing an attribute to be read, updated or deleteAttribute name: Attribute name of an attribute to be read, updated or deleteMetadata: List of metadata namesSkip forwarding: If true, Context Broker skips forwarding to Context ProvidersOverride metadata: If true, it replaces the existing metadataForced update: If true, it triggers matching subscriptionsFlow control: If true, it enables flow control mechanismEncode / Decode forbidden chars:offoron
Input 1
payload JSON Object
When reading an attribute, a msg.payload should contain a JSON Object with actionType and related information the attribute to be read.
{
"actionType": "read",
"attrName": "relativeHumidity"
}
Output 1
payload JSON Object
A msg.payload contains an object representing the attribute.
{
"type":"Number",
"value":45,
"metadata":{}
}
Input 2
payload JSON Object
When updating an attribute, a msg.payload should contain a JSON Object with actionType and attribute with related information the attribute to be updated.
{
"actionType": "update",
"attribute": {
"type": "Number",
"value": 1234.5
}
}
Output 2
payload Number or null
A msg.payload contains a status code.
204
Input 3
payload JSON Object
When deleting an attribute, a msg.payload should contain a JSON Object with actionType and related information the attribute to be deleted.
{
"actionType": "delete",
"attrName": "relativeHumidity"
}
Output 3
payload JSON Object
payload Number or null
A msg.payload contains a status code.
204