The Web service connector has the capability to connect and retrieve data from a web service request.
To create a connection to a Web Service endpoint, right-click on the Data Sources group, then click “Cloud”, and select “Web service”.
To successfully retrieve data from a Web Service, the following properties need to be set.
||Name to identify the data source.|
||Address of the web service endpoint.|
||Selection for the type of authentication to use to connect to the Web service. Default is "None".|
||Username to use to connect to the endpoint.|
||Password to use to connect to the endpoint.|
||Security Key to connect to the endpoint.|
||Supply any headers if required to the endpoint request.|
||Select to cache the connection details. Default is "True".|
||Maximum concurrent count for connections. Default is "20".|
To create a measure from data points that are returned from a web-service call, a custom namespace must be created. Flow does not create a namespace automatically as it first needs to understand the dataset that would be retrieved from the web service endpoint.
As an example, to create a namespace, data will be retrieved from a weather service web service endpoint. The endpoint address that needs to be configured is:
To get a key to connect to the API, register an account for a free key at https://darksky.net/dev/. Paste your key into “Endpoint Key”.
In the blank namespace, create a custom namespace by adding a folder and custom tag. In this case we will be creating a tag for temperature in Charlotte.
Right-click custom “Charlotte Temperature” tag and click ”Edit”.
The endpoint for the particular temperature tag at Charlotte is:
Endpoint: forecast/[Key]/35.225049, -80.839375,[PeriodEnd]
The components of the endpoint are discussed below:
- These are Charlotte’s coordinates
- The default endpoint provides Fahrenheit. If you want Celcius, add “?units=si” to the end of the Endpoint.
- [Key] will be replaced by the “Endpoint Key” configured at the Data Source level.
- [PeriodEnd] will be replaced by the Date and Time of local Flow System time. Use [PeriodEndUTC] for UTC.
Other setting to configure include:
||This is the path in the JSON returned where Flow will search for the result set.|
||This is the path within the data path where Flow will pick the value (or values if Data path is an array).|
||This is the path within the data path where Flow will pick the quality (or values if Data path is an array).|
||This is the path within the Data path where Flow will pick the timestamps (this will only be used if the Aggregation property is not “None”).|
||Scaling to be applied to the retrieved value.|