A webservice lookup allows you to perform a GET operation to a REST based webservice. It is executed by the Lookup & Data Cleanse Functions .
The id of the lookup. The ID value forms the first argument in the WebserviceLookup function.
A description of the lookup.
The webservice behaviour used for authentication, base url, paging & throttling.
If the webservice behaviour is configured to use Pagination, lookups will firstly paginate all records before returning a response. Lookups returning paginated reponses should either refine the query to return the specific record OR cache the response to prevent large numbers of large requests & responses.
Select whether the webservice responds with Xml or JSON.
This is the Url sent to the webservice.
If a webservice behaviour is specified the Query Url will be combined with the Base Url of the Webservice Beahviour to make the full Url. If no Webservice Behaviour is defined this must be the full Url.
The Url may be parameterised using by specifying in the form of %, %, %, and so on, where the each parameter is replaced with the corresponding values passed from the wherevalues argument of WebserviceLookup function.
In comparison to other lookups each parameter must be enclosed in square brackets e.g. %, % (as shown above).
Http Headers to be sent with each lookup request.
The return path specifies the path of the value being returned from the lookup.
The return path should be in the either syntax of XPath or JPath dependent on the return content type of the lookup.
In the example above, the return path is returning the “id” property from the first object of the “customers” array.
The return path is optional and can be overridden from the returnpath parameter of the WebserviceLookup function.
Parameterised Return Path
The return path may also be parametrised using the same syntax as the Query, thereby allowing you to dynamically substitute sections of return path.
This can be useful when a response from a service contains a collection of results instead of the specific record desired. Parametrising the return path provides the means to return the matching record with a specific criteria.
It is important to note that placeholder numbers continue from the Query Url. E.g. if the Query Url had placeholders % and % the first parameter in the return path would be %.
In the below screenshot illustrates a parameter in the return path to return the value of the 'id' node where the 'name' property matches a specific value.
When enabled the function saves (or caches) the result of the function so subsequent calls to the lookup are checked prior to querying the webservice. Caching is improves performance markedly as it means any similar request does not issue a webservice request.