Closed dschowta closed 4 years ago
Note: in order to avoid the misuse of the parent-child relationships, the "parent" field should be a prefix of the "name" field. Other strings should not be allowed
Include meta data inside data api for knowing the dimensions that may come in follow up pages:
{
"items": [ ], // results
"series": [ "a/b/c" ]
}
{
"items": [ ], // results
"links": [
{
"rel": "self",
"href": "",
},
{
"rel": "next",
"href": "",
},
{
"rel": "serie1",
"href": "",
},
{
"rel": "serie2",
"href": "",
},
...
]
}
This looks good. The heirarchical querying should not be enabled by default in order to avoid load on the server. Instead the client can query the streams the way it is done in registry with operations namely: prefix
, suffix
, contains
, equals
. for example,
http:localhost:8085/data/de:Fraunhofer:fit:building1:kitchen?prefix
or http:localhost:8085/data/de:Fraunhofer:fit:building1:kitchen?suffix
etc.
The operation equals, is the operation which is performed by default where only exactly matching time series are returned.
Since the URL has no size limit by specification, we can assume that the client can query multiple streams by providing their IDs inside the URL without facing issues.
For convenience, we may add a "data" link inside registry with a prepared URL to query listed streams.
Data streams can be hierarchical. For example,
de:Fraunhofer:fit:building1:kitchen
can return the data streams which are under it, such asde:Fraunhofer:fit:building1:kitchen:lamp
,de:Fraunhofer:fit:building1:kitchen:refrigerator:power
,de:Fraunhofer:fit:building1:kitchen:temperature
These relations can be part of the data stream element by adding fields to the children such as
parent
an example: