User Tools

Site Tools


You are not allowed to perform this action
fdata_designer_datagroup_settings_api

API (Text or Json)

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.

Basic Settings

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).

Open API Parameters

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.

Non Open API Parameters

If the Source does not have an Open API JSON file you will need to know the appropriate parameters and add them manually

Header Values

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.

Form Values

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.

Query String Values

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

Placeholders are each of the following:

  • External inputs to the DSD
  • Inputs added to this data group or its parent and antecedents
  • Security details (User Id, AD Login or Caller Id)
  • A function entered using the Function Builder

Root

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.