API Docs
download/csv

Download a CSV file

GET

This endpoint returns data as a CSV file from one or multiple sensors, or sums of sensors for different granularities and time frames.

Using the parameters, the different granularities, time frames, selected fields and sensor IDs can be specified. Additionally, instead of a simple sensor ID, an operation object can be specified to perform calculations with power values. Operation objects can be used to compute sums of power values over multiple sensors. Sums are only calculated over active power (only field "p"). Each sensor in an operation object requires a sign ("POS" / "NEG") allowing for subtraction of individual sensor's power values.

An example operation object looks as follows:

{
  "operation": "SUM",
  "label": "my label",
  "sensor_ids": [
    {
      "sign": "POS",
      "sensor_id": "_id1_"
    },
    {
      "sign": "NEG",
      "sensor_id": "_id2_"
    }
  ]
}

Note that for ten-second values (i.e. granularity="t"), only the fields p, q, and pf are available.

Example Requests:

/download/csv?sensor_ids=["_id1_","_id2_"]&granularity=d&start_time=2023-01-01T00:00:00Z&end_time=2023-01-02T00:00:00Z&fields=["p","i"]

/download/csv?sensor_ids=["_id1_","_id2_",{"operation": "SUM", "label": "my label", "sensor_ids": [{"sign": "POS", "sensor_id": "_id1_"}, {"sign": "NEG", "sensor_id": "_id2_"}]}]&granularity=d&start_time=2021-11-20 00:00:00&end_time=2021-11-21 00:00:00&fields=["u","i","p"]

Limit

The result size is limited depending on the granularity. Note that the limit values apply to the total number of returned lines, not per sensor.

GranularityLimit
d3'650 (10 y)
h4'320 (6 mo)
q2'880 (1 mo)
m2'880 (2 d)
ts4'320 (12 h)
Header Parameters
Authorization
*
Query Parameters
sensor_ids
*
granularity
*
start_time
*
end_time
*
fields
*
utc_offset
Responses
200
400
Bad Request
name
message
code
className
data
errors
401
Unauthorized
name
message
code
className
errors
403
Forbidden
name
message
code
className
errors
Curl
JS
Ruby
Python
Responses
200
400
401
403