Current Value
Please read the web service primer to
understand how to provide proper authentication parameters.
For simplicity, authentication parameters are not shown here.
com.nimbits.server.service.CurrentValueService
Description
Records new values and/or returns the last recorded value to a given point.
GET
Parmeters
- point - case sensitive name of the data point
- uuid - optional - unique identifier of a data point can be provided instead of a name
- format -
optional - provide the value double for a plane numeric value without any formatting. Provide json for json
response that includes text, gps, double values. By default this service returns the simple numeric value.
As an added convenience, you can record a value using a GET on this service, it will obviously return that newly
recorded value. The following parameters can be provided to record data to the give point.
- value optional - a numeric value i.e. 3.14
- json - optional - a complete json Value Object.
- note - optional - text data for this recorded value
- lat optional - a GPS latitude coordinate.
- lng optional - a GPS longitude coordinate
- data - xml, json or any other data format.
Sample
http://cloud.nimbits.com/service/currentvalue?point=test&email=example@gmail.com&format=json
Returns a JSON formated Value Object.
{"id":2644002,"lat":0.0,"lng":0.0,"d":104.0,"timestamp":"Oct 29, 2010 9:48:28 PM","pointFK":1929017}
Remove the format parameter for a current value:
http://cloud.nimbits.com/service/currentvalue?point=test&email=example@gmail.com
Returns the number value. The is useful for importing current values into excel.
104.0
POST
- value -
optional - a numeric value i.e. 3.14
- json -
optional - a complete json Value Object.
- note -
optional - text data for this recorded value
- lat -
optional - a GPS latitude coordinate.
- lng -
optional - a GPS longitude coordinate
- point -
case sensitive name of the data point
- timestamp -
optional - the timestamp associated with this newly recorded value in long unix epoch time format.