NGSI Batch update
This custom node is a simple node that allows to append, appendStrict, update, replace or delete several entities in a single batch operation.
Entity data shall be provided as part of the msg.payload.

Append entities
It allows to append several entities.
Properties

name: A name for a node instanceContext Broker: An endpoint of a context brokerServicePath: FIWARE Service PathAction type:appendRepresentation:normalizedorkeyValuesOverride 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 Array or JSON Object
A msg.payload should contain NGSIv2 entities as JSON Array or JSON Object.
[
{
"id": "urn:ngsi-ld:WeatherObserved:sensor001",
"type": "Sensor",
"temperature": {
"type": "Number",
"value": 20.6,
"metadata": {}
}
},
{
"id": "urn:ngsi-ld:WeatherObserved:sensor002",
"type": "Sensor",
"temperature": {
"type": "Number",
"value": 20.6,
"metadata": {}
}
}
]
Output
statusCode Number
A msg.statusCode contains a status code.
204
AppendStrict entities
It allows to append several entities strictly.
Properties

name: A name for a node instanceContext Broker: An endpoint of a context brokerServicePath: FIWARE Service PathAction type:appendStrictRepresentation:normalizedorkeyValuesOverride 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 Array or JSON Object
A msg.payload should contain NGSIv2 entities as JSON Array or JSON Object.
[
{
"id": "urn:ngsi-ld:WeatherObserved:sensor003",
"type": "Sensor",
"temperature": {
"type": "Number",
"value": 20.6,
"metadata": {}
}
},
{
"id": "urn:ngsi-ld:WeatherObserved:sensor004",
"type": "Sensor",
"temperature": {
"type": "Number",
"value": 20.6,
"metadata": {}
}
}
]
Output
statusCode Number
A msg.statusCode contains a status code.
204
Update entities
It allows to update several entities.
Properties

name: A name for a node instanceContext Broker: An endpoint of a context brokerServicePath: FIWARE Service PathAction type:updateRepresentation:normalizedorkeyValuesOverride 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 Array or JSON Object
A msg.payload should contain NGSIv2 entities as JSON Array or JSON Object.
[
{
"id": "urn:ngsi-ld:WeatherObserved:sensor001",
"type": "Sensor",
"temperature": {
"type": "Number",
"value": 30.6,
"metadata": {}
}
},
{
"id": "urn:ngsi-ld:WeatherObserved:sensor002",
"type": "Sensor",
"temperature": {
"type": "Number",
"value": 30.6,
"metadata": {}
}
}
]
Output
statusCode Number
A msg.statusCode contains a status code.
204
Replace entities
It allows to replace several entities.
Properties

name: A name for a node instanceContext Broker: An endpoint of a context brokerServicePath: FIWARE Service PathAction type:replaceRepresentation:normalizedorkeyValuesOverride 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 Array or JSON Object
A msg.payload should contain NGSIv2 entities as JSON Array or JSON Object.
[
{
"id": "urn:ngsi-ld:WeatherObserved:sensor001",
"type": "Sensor",
"humidity": {
"type": "Number",
"value": 31,
"metadata": {}
}
},
{
"id": "urn:ngsi-ld:WeatherObserved:sensor002",
"type": "Sensor",
"humidity": {
"type": "Number",
"value": 31,
"metadata": {}
}
}
]
Output
statusCode Number
A msg.statusCode contains a status code.
204
Delete entities
It allows to delete several entities.
Properties

name: A name for a node instanceContext Broker: An endpoint of a context brokerServicePath: FIWARE Service PathAction type:deleteRepresentation:normalizedorkeyValuesOverride 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 Array or JSON Object
A msg.payload should contain NGSIv2 entities as JSON Array or JSON Object.
[
{
"id": "urn:ngsi-ld:WeatherObserved:sensor001",
"type": "Sensor",
"humidity": {
"type": "Number",
"value": 31,
"metadata": {}
}
},
{
"id": "urn:ngsi-ld:WeatherObserved:sensor002",
"type": "Sensor",
"humidity": {
"type": "Number",
"value": 31,
"metadata": {}
}
}
]
Output
statusCode Number
A msg.statusCode contains a status code.
204
Use value of actionType in payload
It allows to append, appendStrict, update, replace or delete several entities.
Properties

name: A name for a node instanceContext Broker: An endpoint of a context brokerServicePath: FIWARE Service PathAction type:value of actionType in payloadRepresentation:normalizedorkeyValuesOverride 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 (append)
payload JSON Object
When appending entities, a msg.payload should contain actionType and NGSIv2 entities as JSON Object.
A msg.payload should contain actionType and entities as JSON Object.
{
"actionType": "append",
"entities": [
{
"id": "urn:ngsi-ld:WeatherObserved:sensor001",
"type": "Sensor",
"temperature": {
"type": "Number",
"value": 20.6,
"metadata": {}
}
},
{
"id": "urn:ngsi-ld:WeatherObserved:sensor002",
"type": "Sensor",
"temperature": {
"type": "Number",
"value": 20.6,
"metadata": {}
}
}
]
}
Output
statusCode Number
A msg.statusCode contains a status code.
204
Input (append strictly)
payload JSON Object
When appending entities strictly, a msg.payload should contain actionType and NGSIv2 entities as JSON Object.
A msg.payload should contain actionType and entities as JSON Object.
{
"actionType": "appendStrict",
"entities": [
{
"id": "urn:ngsi-ld:WeatherObserved:sensor003",
"type": "Sensor",
"temperature": {
"type": "Number",
"value": 20.6,
"metadata": {}
}
},
{
"id": "urn:ngsi-ld:WeatherObserved:sensor004",
"type": "Sensor",
"temperature": {
"type": "Number",
"value": 20.6,
"metadata": {}
}
}
]
}
Output (append strictly)
statusCode Number
A msg.statusCode contains a status code.
204
Input (update)
payload JSON Object
When updating entities, a msg.payload should contain actionType and NGSIv2 entities as JSON Object.
A msg.payload should contain actionType and entities as JSON Object.
{
"actionType": "update",
"entities": [
{
"id": "urn:ngsi-ld:WeatherObserved:sensor001",
"type": "Sensor",
"temperature": {
"type": "Number",
"value": 30.6,
"metadata": {}
}
},
{
"id": "urn:ngsi-ld:WeatherObserved:sensor002",
"type": "Sensor",
"temperature": {
"type": "Number",
"value": 30.6,
"metadata": {}
}
}
]
}
Output (update)
statusCode Number
A msg.statusCode contains a status code.
204
Input (replace)
payload JSON Object
When replacing entities, a msg.payload should contain actionType and NGSIv2 entities as JSON Object.
A msg.payload should contain actionType and entities as JSON Object.
{
"actionType": "replace",
"entities": [
{
"id": "urn:ngsi-ld:WeatherObserved:sensor001",
"type": "Sensor",
"humidity": {
"type": "Number",
"value": 31,
"metadata": {}
}
},
{
"id": "urn:ngsi-ld:WeatherObserved:sensor002",
"type": "Sensor",
"humidity": {
"type": "Number",
"value": 31,
"metadata": {}
}
}
]
}
Output (replace)
statusCode Number
A msg.statusCode contains a status code.
204
Input (delete)
payload JSON Object
When deleting entities, a msg.payload should contain actionType and NGSIv2 entities as JSON Object.
A msg.payload should contain actionType and entities as JSON Object.
{
"actionType": "delete",
"entities": [
{
"id": "urn:ngsi-ld:WeatherObserved:sensor001",
"type": "Sensor",
"humidity": {
"type": "Number",
"value": 31,
"metadata": {}
}
},
{
"id": "urn:ngsi-ld:WeatherObserved:sensor002",
"type": "Sensor",
"humidity": {
"type": "Number",
"value": 31,
"metadata": {}
}
}
]
}
Output (delete)
statusCode Number
A msg.statusCode contains a status code.
204