User Guide - SINTEF-9012/proasense-storage GitHub Wiki

Storage Reader Service

The Storage Reader Service supports a request/response interaction though a REST API. Specific REST methods can be designed for easy access to specific data resources required by the ProaSense system components. For the 1st release of the reader service we have defined a simple API for the standard queries described above. To use the API you invoke an HTTP GET method on the Web resource

  • [storage_reader_url]/query/[event_type]/[operation_type]

indicating the event type (i.e., simple, derived, predicted, anomaly, recommendation and feedback) and the operation type (i.e., default, average, minimum and maximum). The query parameters vary slightly depending on the event type. The table below describes the API in more details. The response type for all query methods are JSON.

Method Resource Description
GET /query/simple/default Lists the simple events for the specified time period.
  • Query parameters:
    • sensorId – The sensor ID.
    • startTime – The start of the time period.
    • endTime – The end of the time period.
  • Output: List of simple events.
GET /query/simple/average
/query/simple/minimum
/query/simple/maximum
Calculates the average, minum or maximum value over the specified time period for the specified property.
  • Query parameters:
    • sensorId – The sensor ID.
    • startTime – The start of the time period.
    • endTime – The end of the time period.
    • propertyKey – The property for which to calculate.
  • Output: The calculated value.
⚠️ **GitHub.com Fallback** ⚠️