Add api method to create a measurement.