Sensor returns sensor data for selected timeframe.

<aside> 📌 GET https://apis.globalreader.eu/api/v1/sensor?sensor_id=SENSOR_ID&end=1650330061&start=1650157261&token=YOUR_TOKEN

</aside>

Parameters

token your API token provided by GlobalReader
sensor_id sensor ID for which timeline is requested. Available in https://passport.globalreader.eu/devices
start UNIX timestamp for period start
end UNIX timestamp for period end. Max query period is 7 days

Success response

HTTP status code 200

{
    "active_min": 78.0,
    "active_value_sum": 1416.0,
    "loading_min": 11.0,
    "runtime": 89,
    "sensor_id": 949,
    "sensor_uid": "207df72a-7ea9-4ed6",
    "stats_made_at": "2022-05-01T19:15:00Z",
    "unit": "pcs"
}

Error response example

Any HTTP status code in 400 to 500

Missing API token key

Response fields

active_min active time in minutes for the selected time period
active_value_sum total measured amount for the selected time period
loading_min loading time in minutes for the selected time period
runtime sum of active min and loading time
sensor_id requested sensor ID
sensor_uid requested sensor uid
stats_made_at time of making the API request
unit sensor unit for the selected sensor

Back to API Documentation