Web APIs
A REST data provider (RestDataProviderConfig or RestDataSourceUserConfig) can be used to perform GET requests to a configured API URL.
Required parameters:
restApiUrl
: string - Specifies the url where to perform the GET request. Optional parameters:isRss
: boolean - Specifies if the result is an RSS feed.itemsExpression
: ConfiguredExpression - An expression that will be evaluated while retrieving the items. You can access the result using theresult
variable which is bound to the scope.connectableKey
: string - A connectable key for the data provider.propertyMappings
: ConfiguredPropertyMappings - Property mapper for the data.useProxy
: boolean - Set this to true in order to use our Proxy-endpoint. This will enable sources that have CORS-restrictions to work.conditionsProvider
: IConditionsProviderConfig - Allows you to connect to a widget filter and filter the information in the widget based on desired properties.
Integration with Widget Filters
After the latest extension, the data provider now also has the option to filter information by connecting to a Widget Filter. To be able to do this, two parameters play important roles:
restApiUrl
- if adding conditions to the url is necessary for filtering, please use tokens of type{number}
eg.{0}
starting always from{0}
which represents the first property. It is also important to respect the convention where in a query param of type?{0}={1}
,{0}
is always the property and{1}
is always the value. e.g. of more complex filtering:- for
?{1}&{2}={3}
,{2}
represents a property and{1}
,{3}
values - for
?{0}={1}&{2}={3}&{4}
,{0}
,{2}
,{4}
represent properties and{1}
,{3}
values
- for
conditionsProvider
- while configuring this, be aware that itsconnectableKey
property needs to be the connectable key of the widget filter.