Introduction to data sinks and FLOW Insights' public API

Learn how FLOW's public API can help you receive traffic data in your own application quickly and on demand through sinks and webhooks.

DataFromSky avatar
Written by DataFromSky
Updated over a week ago

FLOW is an open platform. It was designed to easily interact with third-party applications and devices through HTTP and UDP protocols.

If you’re interested in receiving the output of any FLOW operator in your own application, you first need to set this up in a client application like FLOW Insights. Consider the following setup: 

There’s a zone spatial filter named ZONE 1 on one of the lanes on the left. It considers only traffic objects that are within the marked zone in a given time frame. Any operator lets you assign a sink to it. This lets the server know that you intend to query for the operator’s output. Simply drag the desired sink type onto the filter.

Then you can define the sink’s name and select an attribute the sink will be tied to.

Select Apply settings and the sink will be assigned.

Afterward, any client application can start communicating and querying the server as long as it's done right. There are two types of sinks based on the way data is obtained from them. 


REST sinks

With REST sinks, your applications would use the HTTP protocol to send queries to the server and obtain responses. FLOW API conforms to the style and constraints of REST and message bodies use the JSON syntax. For example, the distribution sink shown above lets you retrieve a color or category distribution of trajectories that pass through the corresponding operator. 

Start your learning tour at the FLOW's API reference site.


​    

UDP sinks

UDP sinks let applications subscribe to their output via the UDP protocol. All status updates are automatically sent to every device that has subscribed until a timeout expires. Therefore UDP sinks are suitable in applications where it’s critical to know about every situation update as fast as possible. Some UDP sinks also support the query-response mode of communication, but options regarding the types of outputs are not as wide. Learn more about UDP sinks at the FLOW's API reference site.

Webhooks

With webhooks, you can have widget data sent to your server automatically each time its value changes. Its output is very similar to REST sinks. Learn more about them here.

Want to learn more? Contact us!


​   
​       

Did this answer your question?