If you want to provide some external partners/users with your Insights Hub data though a customizable API endpoint, this is how you get started on this. The example shows how you can
- specify a dedicated Insights Hub RestAPI endpoint
- select the method the endpoint should support (GET, PUT, POST, DELETE)
- choose who has access to this endpoint (only users of the flow, all users on the tenant, public access)
- develop the API functionality using VFC nodes
This flow demonstrates a simple getting-started example on how to provide machine data via an API for external access of the last 15min interval of machine data as JSON object.
- Import the flow in Visual Flow Creator
- Setup the API endpoint in the HTTP-IN node (blue node)
- Select an Asset / Aspect / Variable(s) where you want to read the time series data from (yellow node)
- Save the flow
Service-URL: The URL to access the endpoint can be found in the HTTP IN node and has the schema as follows
https://[TenantName]-visualflowcreatorhttp.eu1.mindsphere.io/public/presiot/machinedata/v1?key=[generatedKey]
☁️ ✔️ You're ready to access the service via the URL shown in the HTTP IN node - enjoy!
When querying the service URL e.g. via a Browser/Postman/Python/... the JSON-object with the timeseries data will be received.