FLOW is an open platform. It was designed to easily interact with third-party applications and devices through HTTP and UDP protocols. These advanced guides will show you how you can integrate your own solution with it. If you're not familiar with FLOW and FLOW Insights, we recommend reading the introductory articles first.
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.
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.
Learn the basics of authentication and communication with FLOW's REST API in the next guide.
Then learn more about REST sinks.
To handle any errors that you might encounter, see the Error reference.
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.
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.
Updated almost 2 years ago