linksmart / historical-datastore

Lightweight time-series storage on the Edge of IoT
Apache License 2.0
13 stars 2 forks source link

Define the simplified SensorThings API #38

Closed ghost closed 6 years ago

ghost commented 6 years ago

Discuss and improve the simplified API:
https://docs.linksmart.eu/display/HDS/Simplified+SensorThings+API

[LS-246] created by tavakoli

ghost commented 6 years ago
{
  "@iot.id": 5,
  "@iot.selfLink": "http://toronto-bike-snapshot.sensorup.com/v1.0/Things(5)",
  "description": "Ft. York / Capreol Crt. Toronto bike share station with data of available bikes and available docks",
  "name": "7000:Ft. York / Capreol Crt.",
  "properties": {},
  "Datastreams@iot.navigationLink": "http://toronto-bike-snapshot.sensorup.com/v1.0/Things(5)/Datastreams",
  "HistoricalLocations@iot.navigationLink": "http://toronto-bike-snapshot.sensorup.com/v1.0/Things(5)/HistoricalLocations",
  "Locations@iot.navigationLink": "http://toronto-bike-snapshot.sensorup.com/v1.0/Things(5)/Locations"
}

I removed nested navigationLinks because they do not add any meta information that is not part of the specification. The links should already be known to clients.

by tavakoli

ghost commented 6 years ago

Also, the `@iot.` prefix for control information makes the handling of JSON keys more difficult.

In addition, because of the dot we lose the ability to search objects using jsonpath expressions. Escaping may not always work.

My suggestion is to remove the `iot.` part and change to @id and @selfLink or remove `@iot.` all together. 

by tavakoli

ghost commented 6 years ago

+ `@iot.selfLink` is redundant and is difficult to set if service is behind a reverse proxy.

by tavakoli

ghost commented 6 years ago

José Ángel Carvajal Soto Marco Jahn Raphael Ahrens Karl Catewicz Hassan Rasheed Any comments?

https://docs.linksmart.eu/display/HDS/Simplified+SensorThings+API

by tavakoli