http json-lookup()

With this function, you can read in a JSON file via HTTP. The complete file is read in as a JSON object, which you then can query later, see function "execute json xpath()".

The return value of the function is the HTTP response status code if parameter d is not used. With parameter d you can apply a JSONPath expression to the JSON object. The return value of the function is then the result of the JSONPath expression.

Parameters


Parameter

Description

a

The URL from which the JSON file is to be requested. Example: "http://example.com".

b

(optional) If "true", the HTTP request is executed through the DMZ server (if it exists). Default: "false".

c

Key name of the JSON object to be created in the cache.

d

The JSONPath expression.

e

(optional) The HTTP method to be used. Use the three dots to select a value. Default: "GET".

f

If the ID of an "HTTP" channel is specified here, the HTTP request is made using the connection parameters of this channel. This might be necessary if authentication is required. Note: You can select a channel with the button with the three dots and then receive the ID directly.

g

If you want to use additional HTTP headers in the HTTP request (or overwrite existing ones), the name of a map containing those headers can be specified here. The key of an entry in this map must be the name of the HTTP header and the value of the entry then is the value for this HTTP header.

h

Body data (not for GET, HEAD, DELETE).

i

(optional) If false, an occurring exception is ignored. Default: <empty> (== false).

j

(optional) The encoding. Default: UTF-8.

k

(optional) Timeout in seconds. Default: 90.

l

(optional) Number of r etries . Default: 0. Note: This setting only applies if no status code is returned. If a status code 4xx or 5xx is returned, no retry is triggered. In this case, a manual error handling must be implemented.

m

(optional) If true, URL encoding of the query of URL a is performed . Default: false . Example: https://example.com?select id from mytable where num > 500 then becomes https://example.com?select%20id%20from%20mytable%20where%20num%20%3E%20500

n

(optional) If the JSONPath query returns an array containing special characters, such as the / character, these are escaped with the \ character by default. You can prevent this behaviour with settings this parameter to true. Default: false.