In this section are described iEnergy API

Here are described API for drain registry management and system configuration.

/registry/drains

This api allows the management of drain registry configuration in the system. Be careful table population is automatic for real drains, not for virtual ones (that are obtained from the sum of several variables).

GET

Returns the list of system drain, with the specification of their configuration and the formula in case of a virtual drain.

Result

POST

Allows to create or modify a drain. If the id is already present in the database, the system proceeds updating of related information. In case the drain is not present the system proceeds with the creation of a virtual drain.

Request

/registry/drains/{drain}

This API allows the management of detailes registry of a drain.

GET

Returns the detail of a drain with the indication of the formula in casa of a virtual drain.

Result

Back to top

In this section are described the API for reading the measures in the database

/measure/instants/{drain}

GET

Returns the valus of a virtual or real drain.

Result

/measure/details/{drain}

/measure/history/{drain}

GET

Both API behave in the same way. The only thing that chages is the detail level: details returns data every 10 minutes while history return data every hour.

Allowed parameters are:

Parameter Values Description Optional
start Date (yyyy-MM-dd'T'HH:mm:ssZ)
Format ISO 8601
Indicates the date of start for the request
(default: one hour before end for details and 2 hour before end for 10 hour for history)
Yes
end Date (yyyy-MM-dd'T'HH:mm:ssZ)
Format ISO 8601
Indicates the date of end for the request
(default: now)
Yes
timeAggregation Indicates the temporal aggregation level of data
Possible values: YEAR, MONTH, DAY, HOUR, MINUTE
(default: MINUTE)
Yes
measureArregation Indicate the aggregation function. Supported function are AVG, SUM, MAX, MIN.
Overrides the aggregationFunction of the measure
Yes

Result

/measure/details/time

/measure/history/time

GET

Returns the range of time of stored measures. In such a way it is possible to know the date of start and end of measures.

Result

Back to top

Management of indicators of climatic confort

/confort/indicators

GET

Returns the list of all the indicators present in the system:

Parameter Values Description
start Date (dd-MM-yyyy HH:mm:ss) Indicates the start datetime for calculating the result of a votation
(default: datetime at the moment of GET request)
end Date (dd-MM-yyyy HH:mm:ss) Indicates the end datetime for calculating the result of a votation
(default: datetime start less 1 hour)

Result

If start and end are not present in the request, the result refers to last hour.

POST

Request

Allows to modify/create data of a confort indicator

If the id is already present in the database, the system proceeds updating of related information.

/confort/indicators/{name}

Detail management of a confort indicator

GET

Returns the details of a certain indicator

Result

/confort/indicators/{name}/options

Management of vote option for a certain indicator

GET

Return the available option for votation of a certain indicator (options depends on indicator type)

Result

/confort/indicators/{name}/votes

Management of votes of an indicator

GET

Returns the list of votes for an indicator

Parameter Value Description
start Date (dd-MM-yyyy HH:mm:ss) Indicates the start datetime for votes selection
(default: datetime at the moment of GET request)
end Date (dd-MM-yyyy HH:mm:ss) Indicates the end datetime for votes selection
(default: datetime less 1 hour)

Result

If start and end are not present in the request, the result refers to last hour.

POST

Allow users to express theri opinio about an indicator. Allowed values are supplied by the request confort/indicators/{name}/options:

Request

Back to top

The communication channel is used to pass data between dog and ienergy, compatible with https://xively.com/.

POST

Allows you to insert a new measure in the monitoring system based on the name of the desired drain

Request