Fixed the REST API for posting readings.