Data views
Publish data from a flow at its own URL with the View endpoint and View response components.
Questa pagina non è ancora tradotta. Stai leggendo l’originale.
In questa pagina
A data view gives a flow its own URL. A request to that URL starts the flow, and the flow sends back JSON. You build it with two components of the Databases group:
- View endpoint receives the request. Its output is called Request.
- View response sends the data it receives back as JSON. Its input is called Response.
Create a data view
1. Open a flow in the designer. You cannot use these two components in the User interface flow.
2. Drag View endpoint onto the area. Double-click it if you want to change its View name.
3. Add the components that produce the data, for example a database component.
4. Drag View response onto the area and connect the last component to it.
5. Select APPLY and then Continue.
The address of a data view
The address is made of the ID of the flow and the ID of the View endpoint component:
https://your-tas-server/<flow id>/<component id>/TAS records every data view with its full address in the tbl_view table of your PostgreSQL database:
SELECT name, url FROM tbl_view WHERE isremoved = false;The designer also shows the ID of a component in its top right corner when you select the component.
The message that View endpoint sends holds the query string in query. For example, ?id=123 arrives as data.query.id in a database component.
Make sure every path of the flow reaches View response. When the flow stops before it, for example on the Error output of a component, the request ends with 408: Request Timeout.