Cumulocity API Services / com.softwareag.jc.cumulocity.services.api / MeasurementSeriesService

MeasurementSeriesService

class MeasurementSeriesService : ConnectionRequest<User, MeasurementSeries>

Access point for retrieving measurements collected over a period of time from Cumulocity, data represented as MeasurementSeries and accessed via API endpoint /measurement/measurements/series

Measurements series are collated differently to measurements, the advantage being that the format is more compact and easier to represent than Measurement. However you need to know the full namespace of the measurement series to retrieve in advance

Constructors

<init>

MeasurementSeriesService(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

Properties

connection

val connection: CumulocityConnectionFactory.CumulocityConnection

Connection referencing cumulocity tenant, instance and credentials to use

Functions

get

fun get(id: String, series: String, from: Date, to: Date, aggregrationType: MeasurementsService.AggregateType, responder: RequestResponder<MeasurementSeries>): Unit

Returns a list of Measurement generated by the asset for the given id parameter.

path

fun path(): String

response

fun response(response: String): MeasurementSeries