NGSI attributes
This custom node is a simple node that allows to append, update, upsert or replace attributes of NGSIv2 entity.

Append attributes
It allows to append attributes of NGSIv2 entity.
Properties

name: A name for a node instanceContext Broker: An endpoint of a context brokerServicePath: FIWARE Service PathAction type:appendEntity id: Id of an entity containing attributes to be appendedEntity type: Type of an entity containing attributes to be appendedRepresentation: normalized or keyValuesOverride metadata: If true, it replaces the existing metadataForced update: If true, it triggers matching subscriptionsFlow control: If true, it enables flow control mechanismEncode forbidden chars:offoron
Input
payload JSON Object
A msg.payload should contain an object with the attributes.
{
"temperature": {
"type": "Number",
"value": 17,
"metadata": {}
}
}
Output
statusCode Number
A msg.statusCode contains a status code.
204
Update attributes
It allows to update attributes of 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 attributes to be updatedEntity type: Type of an entity containing attributes to be updatedRepresentation: normalized or keyValuesOverride metadata: If true, it replaces the existing metadataForced update: If true, it triggers matching subscriptionsFlow control: If true, it enables flow control mechanismEncode forbidden chars:offoron
Input
payload JSON Object
A msg.payload should contain an object with the attributes.
{
"temperature": {
"type": "Number",
"value": 20,
"metadata": {}
}
}
Output
statusCode Number
A msg.statusCode contains a status code.
204
Upsert attributes
It allows to upsert attributes of NGSIv2 entity.
Properties

name: A name for a node instanceContext Broker: An endpoint of a context brokerServicePath: FIWARE Service PathAction type:upsertEntity id: Id of an entity containing attributes to be upsertedEntity type: Type of an entity containing attributes to be upsertedRepresentation: normalized or keyValuesOverride metadata: If true, it replaces the existing metadataForced update: If true, it triggers matching subscriptionsFlow control: If true, it enables flow control mechanismEncode forbidden chars:offoron
Input
payload JSON Object
A msg.payload should contain an object with the attributes.
{
"temperature": {
"type": "Number",
"value": 25,
"metadata": {}
},
"humidity": {
"type": "Number",
"value": 42.9,
"metadata": {}
}
}
Output
statusCode Number
A msg.statusCode contains a status code.
204
Replace attributes
It allows to replace attributes of NGSIv2 entity.
Properties

name: A name for a node instanceContext Broker: An endpoint of a context brokerServicePath: FIWARE Service PathAction type:replaceEntity id: Id of an entity containing attributes to be replacedEntity type: Type of an entity containing attributes to be replacedRepresentation: normalized or keyValuesOverride metadata: If true, it replaces the existing metadataForced update: If true, it triggers matching subscriptionsFlow control: If true, it enables flow control mechanismEncode forbidden chars:offoron
Input
payload JSON Object
A msg.payload should contain an object with the attributes.
{
"temperature": {
"type": "Number",
"value": 25,
"metadata": {}
},
"relativeHumidity": {
"type": "Number",
"value": 45,
"metadata": {}
},
"atmosphericPressure": {
"type": "Number",
"value": 1003.5,
"metadata": {}
}
}
Output
statusCode Number
A msg.statusCode contains a status code.
204
Use value of actionType in payload
It allows to append, update, upsert or replace attributes 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 payloadEntity id: Id of an entity containing attributes to be appended, updated, upserted or replacedEntity type: Type of an entity containing attributes to be appended, updated, upserted or replacedRepresentation: normalized or keyValuesOverride metadata: If true, it replaces the existing metadataForced update: If true, it triggers matching subscriptionsFlow control: If true, it enables flow control mechanismEncode forbidden chars:offoron
Input
payload JSON Object
A msg.payload should contain a JSON Object with actionType and an object with the attributes.
{
"actionType": "append",
"id": "E2",
"attributes": {
"temperature": {
"type": "Number",
"value": 17,
"metadata": {}
}
}
}
{
"actionType": "update",
"id": "E2",
"attributes": {
"temperature": {
"type": "Number",
"value": 20,
"metadata": {}
}
}
}
{
"actionType": "upsert",
"id": "E2",
"attributes": {
"temperature": {
"type": "Number",
"value": 25,
"metadata": {}
},
"humidity": {
"type": "Number",
"value": 42.9,
"metadata": {}
}
}
}
{
"actionType": "replace",
"id": "E2",
"attributes": {
"temperature": {
"type": "Number",
"value": 25,
"metadata": {}
},
"relativeHumidity": {
"type": "Number",
"value": 45,
"metadata": {}
},
"atmosphericPressure": {
"type": "Number",
"value": 1003.5,
"metadata": {}
}
}
}
Output
statusCode Number
A msg.statusCode contains a status code.
204