DS data retrieval web services - AIoTES/DataLayer-DataLake-QueryExecution GitHub Wiki

To be able to use the Data Lake query component, deployment sites provide access to their databases through web services. These web services should return the data to the SIL following IoT-platform-specific data models. It has to be noted that even if two Deployment Sites are using the same IoT Platform, this doesn't mean that they are using the same mechanism for storing their data. For example, the Deployment Sites of Madrid and Greece are using universAAL, but Madrid is using universAAL’s own database and Greece is using MQTT and InfluxDB. For that reason, each Deployment Site needs to define its own web service.

In order to have a common call to these web services, it is necessary to implement a common API to make the calls to any deployment site. This web service must have the following properties:

  • Receive a common set of input parameters to perform the queries to its databases.
  • Accessing to their-specific Databases.
  • Transform the data obtained in the call to the database following the IoT-platform data model that is used in their Deployment Site.
  • Provide the data in the IoT Platform syntactic format (for real-time data) in the Data Model of the Deployment Site.

The historical data web service of a DS would implement a method with the following specifications:

  • HTTP GET method
  • HTTP basic authentication
  • Input parameters (all of them are optional):
    • startDate: start date for historical data retrieval, in format yyyy-MM-dd'T'HH:mm:ss.SSSZ
    • endDate: end date for historical data retrieval, in format yyyy-MM-dd'T'HH:mm:ss.SSSZ
    • deviceId: unique identifier of the device of interest in the platform.
    • deviceType: device type identifier (defined by the DS).

An example of a call to a web service is the following:

http://[url_webservice]/api?deviceType=[value]&startDate=[date]&endDate=[date]

⚠️ **GitHub.com Fallback** ⚠️