My favorites | Sign in
Project Home Downloads Wiki Issues Source
Search
for
CurrentValueService  
Updated Feb 26, 2011 by bsautner@gmail.com

Back to RestApi

Current Value Service

com.nimbits.server.service.CurrentValueService

Description

Records new values and 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 formating. 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

Sample

These samples should work in your browser, since the data point being used in this sample has its public setting set to true.

http://app.nimbits.com/service/currentvalue?point=test&email=bsautner@gmail.com&format=json

This will return 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://app.nimbits.com/service/currentvalue?point=test&email=bsautner@gmail.com

and the current value will be returned.

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.

Sign in to add a comment
Powered by Google Project Hosting