NGSI types
This custom node is a simple node that allows to retrieve a list of entity types or entity information for a given type.
List Entity Types
It allows to retrieve a list of entity types.
Properties
name
: A name for a node instanceContext Broker
: An endpoint of a context brokerServicePath
: FIWARE Service PathAction Type
:List Entity Types
Values
: If true, the response payload is a JSON array with a list of entity typesNoAttrDetail
: If true, the request does not provide attribute type detailsDecode forbidden chars
:off
oron
Input
payload JSON Object
A msg.payload
should contain an empty JSON Object.
{}
Output
payload JSON Array
A msg.payload
contains a list of entity types.
[
{
"type": "Sensor",
"attrs": {
"TimeInstant": {
"types": [
"DateTime"
]
},
"atmosphericPressure": {
"types": [
"Number"
]
},
"dateObserved": {
"types": [
"DateTime"
]
},
"location": {
"types": [
"geo:json"
]
},
"relativeHumidity": {
"types": [
"Number"
]
},
"temperature": {
"types": [
"Number"
]
}
},
"count": 1
},
]
statusCode Number
A msg.statusCode
contains a status code.
200
Retrieve entity information for a given type
It allows to retrieve entity information for a given type.
Properties
name
: A name for a node instanceContext Broker
: An endpoint of a context brokerServicePath
: FIWARE Service PathAction Type
:Entity information for a given type
Entity type
: Type of Entity to retrieve an entity informationNoAttrDetail
: If true, the request does not provide attribute type detailsDecode forbidden chars
:off
oron
Input
payload String
A msg.payload
should contain an Entity type.
Sensor
Output
payload JSON Object
A msg.payload
contains the entity information.
{
"attrs": {
"TimeInstant": {
"types": [
"DateTime"
]
},
"atmosphericPressure": {
"types": [
"Number"
]
},
"dateObserved": {
"types": [
"DateTime"
]
},
"location": {
"types": [
"geo:json"
]
},
"relativeHumidity": {
"types": [
"Number"
]
},
"temperature": {
"types": [
"Number"
]
}
},
"count": 1
}
statusCode Number
A msg.statusCode
contains a status code.
200
Use value of actionType in payload
It allows to retrieve a list of entity types or entity information for a given type.
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 type
: Type of Entity to retrieve an entity informationValues
: If true, the response payload is a JSON array with a list of entity typesNoAttrDetail
: If true, the request does not provide attribute type detailsDecode forbidden chars
:off
oron
Input (types)
payload JSON Object
When retrieving a list of entity types, a msg.payload
should contain a JSON Object with actionType types
.
A msg.payload
should contain actionType with types
.
{
"actionType": "types"
}
Output (types)
payload JSON Array
A msg.payload
contains a list of entity types.
[
{
"type": "Sensor",
"attrs": {
"TimeInstant": {
"types": [
"DateTime"
]
},
"atmosphericPressure": {
"types": [
"Number"
]
},
"dateObserved": {
"types": [
"DateTime"
]
},
"location": {
"types": [
"geo:json"
]
},
"relativeHumidity": {
"types": [
"Number"
]
},
"temperature": {
"types": [
"Number"
]
}
},
"count": 1
},
]
statusCode Number
A msg.statusCode
contains a status code.
200
Input (type)
payload JSON Object
When retrieving entity information for a given type, a msg.payload
should contain a JSON Object with actionType type
and an entity type.
A msg.payload
should contain an Entity type and actionType with type
.
{
"actionType": "type",
"type": "Sensor"
}
Output (type)
payload JSON Object
A msg.payload
contains the entity information.
{
"attrs": {
"TimeInstant": {
"types": [
"DateTime"
]
},
"atmosphericPressure": {
"types": [
"Number"
]
},
"dateObserved": {
"types": [
"DateTime"
]
},
"location": {
"types": [
"geo:json"
]
},
"relativeHumidity": {
"types": [
"Number"
]
},
"temperature": {
"types": [
"Number"
]
}
},
"count": 1
}
statusCode Number
A msg.statusCode
contains a status code.
200