AnsweredAssumed Answered

Basic question about how to pull data using the RESTFul API

Question asked by skedastic on Feb 14, 2015
Latest reply on Mar 13, 2015 by aseck

I’m very new to OSI, and have some hopefully basic questions about using the RESTFul API. 

Our goal is to poll all devices for data on an interval, say every 100 ms and gather key metrics.

 

It looks you can use the GET on  '/elements', and start drilling down into each of its 'children', to determine what devices are available that can provide data.

 

So we can use that to build a map of the ids of each of the sensors, but the question is, what is the most effective way to get the current data for an element?

 

I can see that when I have an ID I can request its snapshot.. which gives all attributes for an element, so now I have all devices and their possible readings (temperature, ect..), plus the current value.

 

GET /snapshot

 

Is there a different way to do this, or a more effective way to poll all sensors for data in realtime?

 

I see there are also APIs for points and eventFrames, are either of them preferred?

Is getting a Point via an ID the best programmatic way to get data?

Whats the difference between a point and an eventFrame?

 

GET /points

 

GET /eventFrames

Outcomes