class MeasurementsService : ConnectionRequest<User, List<Measurement>>
Access point for retrieving and sending measurements to/from Cumulocity, data represented as Measurement and accessed via API endpoint /measurement/measurements
enum class AggregateType
Specifies how the measurements results to be grouped, by minute, hour or 24 hours (DAILY) |
MeasurementsService(connection: CumulocityConnectionFactory.CumulocityConnection)
Creates a single use instance that cab be used to launch a query, do not reuse the same instance for multiple queries |
val connection: CumulocityConnectionFactory.CumulocityConnection
Connection referencing cumulocity tenant, instance and credentials to use |
fun get(id: String, from: Date, to: Date, aggregrationType: MeasurementsService.AggregateType, reverseDateOrder: Boolean, responder: RequestResponder<List<Measurement>>): Unit
Returns a list of Measurement generated by the asset for the given id parameter. fun get(id: String, type: String, from: Date, to: Date, aggregrationType: MeasurementsService.AggregateType, reverseDateOrder: Boolean, responder: RequestResponder<List<Measurement>>): Unit
Returns a list of Measurement generated by the asset for the given external id |
|
fun path(): String |
|
fun post(measurements: Array<Measurement>, responder: RequestResponder<List<Measurement>>): Unit
Posts measurements to cumulocity |
|
fun response(response: String): List<Measurement> |