Skip to content

Get device consumption

Deprecated
GET
/devices/consumption.json
curl --request GET \
--url 'https://example.com/api/v1.25f/devices/consumption.json?time_from=2026-01-15T00%3A00%3A00Z&time_to=2026-01-15T23%3A00%3A00Z&include=object&device_id=210404%20210405&object_id=31021%2031022' \
--header 'Authorization: <Authorization>'

Deprecated. For new integrations, use POST /measurements together with GET /queries/{query_id}/result and compute business values from the returned measurement rows. Returns consumption for devices over a time range.

time_from
required
string format: date-time

Example

2026-01-15T00:00:00Z

Start of time range (inclusive), RFC3339 Zulu, aligned to hour. The requested window must span at least 1 hour and at most 31 days.

time_to
required
string format: date-time

Example

2026-01-15T23:00:00Z

End of time range (inclusive), RFC3339 Zulu, aligned to hour. The requested window must span at least 1 hour and at most 31 days.

include

Space-separated includes. Supported values: object, consumption_detail.

string
Allowed values: object consumption_detail

Example

object consumption_detail
device_id

Space-separated list of device IDs to filter by. Cannot be combined with object_id.

string

Example

210404 210405
object_id

Space-separated list of object IDs to filter by. Requires include=object and is mutually exclusive with device_id.

string

Example

31021 31022

Successful response containing consumption data

Media typeapplication/json
object
data
required

Array of device consumption objects

Array<object>
object
device_id
required

Unique identifier for the device

integer format: int64
device_name
required

Human-readable name of the device

string
object
object
object_id
required

Unique identifier for the object

integer format: int64
object_name
required

Human-readable name of the object

string
consumption_kwh
required
One of:

Positive active energy (kWh). Returned when consumption_detail is not included.

number

Examples

Exampleconsumption_data

Example consumption response

{
"data": [
{
"device_id": 210404,
"device_name": "Main Feed - Building 3",
"object": {
"object_id": 31021,
"object_name": "Riga Plant - Building 3"
},
"consumption_kwh": {
"active_pos": 482.7,
"active_neg": 3.2,
"reactive_pos": 91.4,
"reactive_neg": 18.6
}
},
{
"device_id": 210405,
"device_name": "Solar Inverter - Roof A",
"consumption_kwh": 128.4
}
]
}

Error response with details

Media typeapplication/json
object
error
required

Description of the error

string
parent

Parent error if this is a nested error

string

Examples

Invalid time range error

{
"error": "time_to must be after time_from"
}