Select to view content in your preferred language

Create single API feed to bring in multiple device data in Velocity

105
2
2 weeks ago
AmberBard
New Contributor

Hello,

I am new to HTTP poller APIs and I am trying to utilize them in Velocity for an initiative within my organization. 
I apologize in advance for any terminology that may not be quite correct in regards to APIs. 

I have been able to leverage the HTTP poller GET request to bring in live sensor data for a single device. I'm hitting a wall in trying to configure it to pull data for multiple devices using their IDs. Velocity has limits on running feeds so I can't create a feed for each individual device when we are projected to have 40 or more. 

I know there has to be a common API workflow for this, I've read about Loops and the such but I'm just unsure about how to go about implementing these strategies or how Velocity handles this. 

Any guidance or suggestions on this would be incredible helpful!

Thank you

Tags (3)
0 Kudos
2 Replies
JeffSilberberg
Frequent Contributor

@AmberBard 

You are correct in that if you want to poll 40 unique endpoints, you would need to create 40 feeds in Velocity.  The way to do this is a Streaming Feed and have an intermediate process running somewhere that polls the units and then refactors the data into a JSON object and Posts to a Velocity Feed.  

Your IoT vendor may have a data concentrator already, or you may need to write a PHP or Python script running on a neutral host somewhere like AWS or Vultr that iterates through a list of endpoints, polls them and then posts the results to Velocity.   

Note: depending on what other logic will be in the Analytics processing the Feed, you might also want to look at Datapipe Lines or an S3-style bucket import. 

 

PeterNasuti
Esri Contributor

@AmberBard Thanks for posting and I agree with @JeffSilberberg above. Most APIs have an endpoint that can return multiple devices with a single call, either as a GET or a POST. Other APIs allow comma separation for a parameter such as https://yourVendorURL.com/data?devices=1,2,3,4,5 

If you can provide documentation from this vendor/provider I'd be happy to skim through to see if any compatible options stand out to me.

0 Kudos