The ApiText and ApiJson data groups are similar except for the way in which the data is returned.
An ApiText data group returns a single row with a single column called “Response” containing the text returned. This is typically used to gather a security token to pass to a further ApiJson data group.
An ApiJson data group returns one or more rows of data based on the Json. Data is returned in the form of a flattened Json file, in which the field names are dot notation representations of the root to a value. If the Json at the root (or top) is an array, each element will be one row in the resulting data. Otherwise a single row will be returned. The columns in the row(s) are the flattened Json values.
If the API Source has an Open API JSON file loaded then the form assists you in setting up the Data Group. It is able to offer valid Resources instead of expecting you to enter the correct value; similarly the parameters expected by the API are known and so the form has pre-set parameters instead of expecting you to add the appropriate keys.
Select an API Source from the list available.
For Open API sources, a Path may be selected from those available.
Otherwise enter the Resource within the API that will return the data and the Method as POST (may require a form) or GET (uses query string parameters only).
The parameters are grouped into Path Values, Header Values, Form Values and Query String Value. Enter the required value (using placeholders if necessary) for each parameter.
If the Source does not have an Open API JSON file you will need to know the appropriate parameters and add them manually
If the API requires header values (e.g. an Authorization bearer token) click “Add Header Value” and add a key/value pairs. The value may be made up of the placeholder values (including functions) that are shown to the right.
If the Method is POST and the APi requires a form, add key/value pairs of form values. The value may be made up of the placeholder values (including functions) that are shown to the right.
If the Api requires query string values, add key/value pairs of values. The value may be made up of the placeholder values (including functions) that are shown to the right.
Placeholders are each of the following:
The Root lets you navigate down from the returned Json to the position in the Json from which data is required. The root is expressed with dot notation and using indexes for arrays. So Manufacturers[0].Products[0].Price would get the first manufacturer's first product's price. There are more complex ways in which this can be used, see https://www.newtonsoft.com/json/help/html/SelectToken.htm for more details.