NGSI timeseries
This custom node is a simple node that allows to obtain timeseries context from Quantumleap.
Entities
It allows to list of all the entity id available.
Properties
name
: A name for a node instanceQuantumLeap
: An endpoint of QuantumLeapServicePath
: FIWARE Service PathAction Type
:Entities
Entity type
: Type of entityform Date
: Starting date and time (inclusive) from which the context information is queriedUnit for date
: Unit for from Dateto Date
: Final date and time (inclusive) from which the context information is queriedUnit for date
: Unit for to dateLimit
: Maximum number of results to retrieve in a single responseOffset
: Offset to apply to the response resultsDecode forbidden chars
:off
oron
Input
payload JSON Object
{}
Output
payload JSON Object
[
{
"timeseriesId": "urn:ngsi-ld:WeatherObserved:sensor001",
"timeseriesType": "Sensor",
"index": "2023-02-19T10:37:15.797+00:00"
}
]
statusCode Number
A msg.statusCode
contains a status code.
200
Entity
It allows to query history of attribute(s) (values only) of a given entity.
Properties
name
: A name for a node instanceQuantumLeap
: An endpoint of QuantumLeapServicePath
: FIWARE Service PathAction Type
:Entity
Value
: If true, values onlyEntity id
: Id of entityEntity type
: Type of entityAttribute name
: A name of an attributeAggrMethod
:count
,sum
,avg
,min
ormax
AggrPeriod
:year
,month
,day
,hour
,minute
orsecond
LastN
: Used to request only the last N values that satisfy the request conditionsform Date
: Starting date and time (inclusive) from which the context information is queriedUnit for date
: Unit for from Dateto Date
: Final date and time (inclusive) from which the context information is queriedUnit for date
: Unit for to dateGeorel
: Specifies a spatial relationship between matching entities and a reference shape (geometryGeometry
: Specifies the reference shape to be used for geographical queriesCoords
: Specifies the reference shape (geometry) in terms of WGS 84 coordinatesLimit
: Maximum number of results to retrieve in a single responseOffset
: Offset to apply to the response resultsDecode forbidden chars
:off
oron
Entity attributes
Input
payload JSON Object
It allows to query history of N attributes of a given entity.
{
"id": "urn:ngsi-ld:WeatherObserved:sensor001",
"lastN": 3
}
Output
payload JSON Object
{
"attributes": [
{
"attrName": "atmosphericPressure",
"values": [
1005.3,
1005.3,
1005.3
]
},
{
"attrName": "relativeHumidity",
"values": [
49.7,
49.7,
49.7
]
},
{
"attrName": "temperature",
"values": [
19.8,
19.9,
19.8
]
}
],
"timeseriesId": "urn:ngsi-ld:WeatherObserved:sensor001",
"timeseriesType": "Sensor",
"index": [
"2023-02-19T10:38:51.841+00:00",
"2023-02-19T10:38:53.842+00:00",
"2023-02-19T10:38:55.845+00:00"
]
}
statusCode Number
A msg.statusCode
contains a status code.
200
Entity attributes value
It allows to query history of N attributes (values only) of a given entity.
Input
payload JSON Object
{
"id": "urn:ngsi-ld:WeatherObserved:sensor001",
"value": true,
"lastN": 3
}
Output
payload JSON Object
{
"attributes": [
{
"attrName": "atmosphericPressure",
"values": [
1005.3,
1005.3,
1005.3
]
},
{
"attrName": "relativeHumidity",
"values": [
49.7,
49.6,
49.7
]
},
{
"attrName": "temperature",
"values": [
19.8,
19.9,
19.9
]
}
],
"index": [
"2023-02-19T10:40:35.897+00:00",
"2023-02-19T10:40:37.910+00:00",
"2023-02-19T10:40:39.911+00:00"
]
}
statusCode Number
A msg.statusCode
contains a status code.
200
Entity attribute
It allows to query history of an attribute of a given entity.
Input
payload JSON Object
{
"id": "urn:ngsi-ld:WeatherObserved:sensor001",
"attrName": "temperature",
"lastN": 3
}
Output
payload JSON Object
{
"attrName": "temperature",
"timeseriesId": "urn:ngsi-ld:WeatherObserved:sensor001",
"timeseriesType": "Sensor",
"index": [
"2023-02-19T10:41:00.000+00:00",
"2023-02-19T10:42:00.000+00:00",
"2023-02-19T10:43:00.000+00:00"
],
"values": [
19.8899995803833,
19.89333292643229,
19.895832935969036
]
}
statusCode Number
A msg.statusCode
contains a status code.
200
Entity attribute value
It allows to query history of an attribute (values only) of a given entity.
Input
payload JSON Object
{
"id": "urn:ngsi-ld:WeatherObserved:sensor001",
"attrName": "temperature",
"value": true,
"lastN": 3
}
Output
payload JSON Object
{
"index": [
"2023-02-19T10:43:00.000+00:00",
"2023-02-19T10:44:00.000+00:00",
"2023-02-19T10:45:00.000+00:00"
],
"values": [
19.896551329514075,
19.896666272481283,
19.899999618530273
]
}
statusCode Number
A msg.statusCode
contains a status code.
200
Type
It allows to query history of attribute(s) (values only) of N entities of the same type.
Properties
name
: A name for a node instanceQuantumLeap
: An endpoint of QuantumLeapServicePath
: FIWARE Service PathAction Type
:Type
Value
: If true, values onlyEntity id
: Id of entityEntity type
: Type of entityAttribute name
: A name of an attributeAggrMethod
:count
,sum
,avg
,min
ormax
AggrPeriod
:year
,month
,day
,hour
,minute
orsecond
LastN
: Used to request only the last N values that satisfy the request conditionsform Date
: Starting date and time (inclusive) from which the context information is queriedUnit for date
: Unit for from Dateto Date
: Final date and time (inclusive) from which the context information is queriedUnit for date
: Unit for to dateGeorel
: Specifies a spatial relationship between matching entities and a reference shape (geometryGeometry
: Specifies the reference shape to be used for geographical queriesCoords
: Specifies the reference shape (geometry) in terms of WGS 84 coordinatesLimit
: Maximum number of results to retrieve in a single responseOffset
: Offset to apply to the response resultsDecode forbidden chars
:off
oron
Type entity
It allows to query history of N attributes of N entities of the same type.
Input
payload JSON Object
{
"type": "Sensor",
"lastN": 3
}
Output
payload JSON Object
{
"entities": [
{
"attributes": [
{
"attrName": "atmosphericPressure",
"values": [
1005.2,
1005.3,
1005.3
]
},
{
"attrName": "relativeHumidity",
"values": [
49.5,
49.6,
49.5
]
},
{
"attrName": "temperature",
"values": [
19.9,
19.9,
19.9
]
}
],
"timeseriesId": "urn:ngsi-ld:WeatherObserved:sensor001",
"index": [
"2023-02-19T10:47:56.116+00:00",
"2023-02-19T10:47:58.119+00:00",
"2023-02-19T10:48:00.118+00:00"
]
}
],
"timeseriesType": "Sensor"
}
statusCode Number
A msg.statusCode
contains a status code.
200
Type entity value
It allows to query history of N attributes (values only) of N entities of the same type.
Input
payload JSON Object
{
"type": "Sensor",
"lastN": 3,
"value": true
}
Output
payload JSON Object
{
"values": [
{
"attributes": [
{
"attrName": "atmosphericPressure",
"values": [
1021.5,
1021.5,
1021.5
]
},
{
"attrName": "relativeHumidity",
"values": [
30.8,
30.8,
30.8
]
},
{
"attrName": "temperature",
"values": [
17.8,
17.8,
17.8
]
}
],
"entityId": "urn:ngsi-ld:WeatherObserved:sensor001",
"index": [
"2023-02-21T07:47:25.616+00:00",
"2023-02-21T07:47:27.613+00:00",
"2023-02-21T07:47:29.616+00:00"
]
}
]
}
statusCode Number
A msg.statusCode
contains a status code.
200
Type attribute
It allows to query history of an attribute of N entities of the same type.
Input
payload JSON Object
{
"type": "Sensor",
"attrName": "temperature",
"lastN": 3
}
Output
payload JSON Object
{
"attrName": "temperature",
"entities": [
{
"timeseriesId": "urn:ngsi-ld:WeatherObserved:sensor001",
"index": [
"2023-02-01T00:00:00.000+00:00"
],
"values": [
104122.2
]
}
],
"timeseriesType": "Sensor"
}
statusCode Number
A msg.statusCode
contains a status code.
200
Type attribute value
It allows to query history of an attribute (values only) of N entities of the same type.
Input
payload JSON Object
{
"type": "Sensor",
"attrName": "temperature",
"lastN": 3,
"value": true
}
Output
payload JSON Object
{
"values": [
{
"timeseriesId": "urn:ngsi-ld:WeatherObserved:sensor001",
"index": [
"2023-02-01T00:00:00.000+00:00"
],
"values": [
104719.2
]
}
]
}
statusCode Number
A msg.statusCode
contains a status code.
200
Attributes
It allows to query history of N attribute(s) (values only) of N entities of N types.
Properties
name
: A name for a node instanceQuantumLeap
: An endpoint of QuantumLeapServicePath
: FIWARE Service PathAction Type
:Attribute
Value
: If true, values onlyEntity id
: Id of entityEntity type
: Type of entityAttribute name
: A name of an attributeAggrMethod
:count
,sum
,avg
,min
ormax
AggrPeriod
:year
,month
,day
,hour
,minute
orsecond
LastN
: Used to request only the last N values that satisfy the request conditionsform Date
: Starting date and time (inclusive) from which the context information is queriedUnit for date
: Unit for from Dateto Date
: Final date and time (inclusive) from which the context information is queriedUnit for date
: Unit for to dateGeorel
: Specifies a spatial relationship between matching entities and a reference shape (geometryGeometry
: Specifies the reference shape to be used for geographical queriesCoords
: Specifies the reference shape (geometry) in terms of WGS 84 coordinatesLimit
: Maximum number of results to retrieve in a single responseOffset
: Offset to apply to the response resultsDecode forbidden chars
:off
oron
Attributes
It allows to query history of N attributes of N entities of N types.
Input
payload JSON Object
{
"lastN": 3
}
Output
payload JSON Object
{
"attrs": [
{
"attrName": "atmosphericPressure",
"types": [
{
"entities": [
{
"timeseriesId": "urn:ngsi-ld:WeatherObserved:sensor001",
"index": [
"2023-02-19T10:52:18.253+00:00",
"2023-02-19T10:52:20.247+00:00",
"2023-02-19T10:52:22.252+00:00"
],
"values": [
1005.3,
1005.3,
1005.3
]
}
],
"timeseriesType": "Sensor"
}
]
},
{
"attrName": "relativeHumidity",
"types": [
{
"entities": [
{
"timeseriesId": "urn:ngsi-ld:WeatherObserved:sensor001",
"index": [
"2023-02-19T10:52:18.253+00:00",
"2023-02-19T10:52:20.247+00:00",
"2023-02-19T10:52:22.252+00:00"
],
"values": [
49.5,
49.5,
49.5
]
}
],
"timeseriesType": "Sensor"
}
]
},
{
"attrName": "temperature",
"types": [
{
"entities": [
{
"timeseriesId": "urn:ngsi-ld:WeatherObserved:sensor001",
"index": [
"2023-02-19T10:52:18.253+00:00",
"2023-02-19T10:52:20.247+00:00",
"2023-02-19T10:52:22.252+00:00"
],
"values": [
19.9,
19.9,
19.9
]
}
],
"timeseriesType": "Sensor"
}
]
}
]
}
statusCode Number
A msg.statusCode
contains a status code.
200
Attributes value
It allows to query history of N attributes (values only) of N entities of N types.
Input
payload JSON Object
{
"value": true,
"lastN": 3
}
Output
payload JSON Object
{
"values": [
{
"attrName": "atmosphericPressure",
"types": [
{
"entities": [
{
"timeseriesId": "urn:ngsi-ld:WeatherObserved:sensor001",
"index": [
"2023-02-19T10:52:46.261+00:00",
"2023-02-19T10:52:48.262+00:00",
"2023-02-19T10:52:50.265+00:00"
],
"values": [
1005.3,
1005.3,
1005.3
]
}
],
"timeseriesType": "Sensor"
}
]
},
{
"attrName": "relativeHumidity",
"types": [
{
"entities": [
{
"timeseriesId": "urn:ngsi-ld:WeatherObserved:sensor001",
"index": [
"2023-02-19T10:52:46.261+00:00",
"2023-02-19T10:52:48.262+00:00",
"2023-02-19T10:52:50.265+00:00"
],
"values": [
49.5,
49.5,
49.5
]
}
],
"timeseriesType": "Sensor"
}
]
},
{
"attrName": "temperature",
"types": [
{
"entities": [
{
"timeseriesId": "urn:ngsi-ld:WeatherObserved:sensor001",
"index": [
"2023-02-19T10:52:46.261+00:00",
"2023-02-19T10:52:48.262+00:00",
"2023-02-19T10:52:50.265+00:00"
],
"values": [
19.9,
19.9,
19.9
]
}
],
"timeseriesType": "Sensor"
}
]
}
]
}
statusCode Number
A msg.statusCode
contains a status code.
200
Attribute
It allows to query history of an attribute of N entities of N types.
Input
payload JSON Object
{
"attrName": "temperature",
"lastN": 3
}
Output
payload JSON Object
{
"attrName": "temperature",
"types": [
{
"entities": [
{
"timeseriesId": "urn:ngsi-ld:WeatherObserved:sensor001",
"index": [
"2023-02-01T00:00:00.000+00:00"
],
"values": [
106749
]
}
],
"timeseriesType": "Sensor"
}
]
}
statusCode Number
A msg.statusCode
contains a status code.
200
Attribute value
It allows to query history of an attribute (values only) of N entities of N types.
Input
payload JSON Object
{
"attrName": "temperature",
"value": true,
"lastN": 3
}
Output
payload JSON Object
{
"values": [
{
"entities": [
{
"timeseriesId": "urn:ngsi-ld:WeatherObserved:sensor001",
"index": [
"2023-02-01T00:00:00.000+00:00"
],
"values": [
107127.1
]
}
],
"timeseriesType": "Sensor"
}
]
}
statusCode Number
A msg.statusCode
contains a status code.
200