Access your data
To access your data, you will need the following information:
- Product ID
- API key
Authentication
The API key is used to secure the access to your data. You will need to add your API key to the request using the header "Authorization: Bearer XXXXX", where XXXXX is the API key string.
Access data
URL: https://api.reuniwatt.com/v1/{id_product}
-
Time series
- JSON format
curl -X GET "https://api.reuniwatt.com/v1/{id_product}" -H "accept: application/json" -H "Authorization: Bearer XXXXX" - CSV format (delimiter: comma)
curl -X GET "https://api.reuniwatt.com/v1/{id_product}" -H "accept: text/csv" -H "Authorization: Bearer XXXXX"
- jpeg2000 format
curl -X GET "https://api.reuniwatt.com/v1/{id_product}" -H "accept: image/jp2" -H "Authorization: Bearer XXXXX"
Access data for a specific date
The Reuniwatt API allows you to get data for dates in the past. URL: https://api.reuniwatt.com/v1/{id_product}?reference_date={reference date} The reference date must conform with ISO8601 format. For example, the date "Tuesday the 29 th 2019, at 6:35 UTC" will be written as "2019-10-29T06:35:00+00:00".
-
Time series
- JSON format
curl -X GET "https://api.reuniwatt.com/v1/{id_product}?reference_date=2019-10-29T06:35:00+00:00" -H "accept: application/json" -H "Authorization: Bearer XXXXX" - CSV format (delimiter: comma)
curl -X GET "https://api.reuniwatt.com/v1/{id_product}?reference_date=2019-10-29T06:35:00+00:00" -H "accept: text/csv" -H "Authorization: Bearer XXXXX"
- jpeg2000 format
curl -X GET "https://api.reuniwatt.com/v1/{id_product}?reference_date=2019-10-29T06:35:00+00:00" -H "accept: image/jp2" -H "Authorization: Bearer XXXXX"
Output format
- JSON format
The API will return the following JSON object:
{
"Site1": {
"Variable1": {
"2020-09-30T00:15:00+00:00": 0.0,
"2020-09-30T00:30:00+00:00": 0.0,
"2020-09-30T00:45:00+00:00": 0.0,
...
"2020-09-30T23:15:00+00:00": 0.0,
"2020-09-30T23:30:00+00:00": 0.0,
"2020-09-30T23:45:00+00:00": 0.0
},
"Variable2": {
"2020-09-30T00:15:00+00:00": 0.0,
"2020-09-30T00:30:00+00:00": 0.0,
"2020-09-30T00:45:00+00:00": 0.0,
...
"2020-09-30T23:15:00+00:00": 0.0,
"2020-09-30T23:30:00+00:00": 0.0,
"2020-09-30T23:45:00+00:00": 0.0
}
}
}
The API will return the following CSV string:
time,site,Variable1,Variable2
2020-09-30T00:15:00+00:00,Site1,0.0,0.0
....
2020-09-30T23:45:00+00:00,Site1,0.0,0.0