Skip to main content

Invoking a third-party REST API with Nooxl Apps

To start automation processes outside of the Nooxl Apps, you can call an external REST API from a Nooxl model and pass data from Nooxl Apps. First, a data connection of the type “REST-API” is created in the Nooxl data integration as well as a data query with parameters. This can then be used in a Nooxl model in a data query section.

Create a data integration in Nooxl Apps

The data integration can be found under the corresponding app tab.

Data integration

  • (1) Create data integration
  • (2) Edit data integration
  • (3) Data query command
  • (4) Data query parameters

(1) Create data integration

Provided you have sufficient authorization and the license, you can store the URL and parameters of the third-party provider for the call here.

(2) Data integration REST_API with URL

Data integration

  • [A] The connection type REST_API must be selected here.
  • [B] A JSON string with headers and url is entered as the connection string. Parameters can be used: {{parameter name}}. The parameters must be created in step (4).

(3) Data retrieval command with body

Data retrieval command

  • [A] Select 'NO_RESULT' here.
  • [B] Enter a JSON string with 'method' and 'body' as the command text. Currently, only the 'post' method can be used. Parameters can be used: {{parameter name}}. The parameters must be created in step (4).

(4) Data query parameter definition

Data query parameter

  • [A] The name of the parameter in brackets {{parameter name}} is used to replace it in the command text of the data query command as well as in the connection string of the data connection with values from a Nooxl model or the default values when executing.
  • [B] In addition to the classic data types, a CellRange passes a string array of rows with the string arrays of columns: [[“R1C1-Value”], [“R1C2-Value”] ], [[“R2C1-Value”], [“R2C2-Value”] ] for a 2 rows x 2 columns array.
  • [C] If the parameter is not assigned in the Nooxl model section, the default value is inserted instead.
  • [D] The following options are possible for parameters:
    • Option Optional: The parameter does not have to be assigned in the Nooxl model section. OptionNot changeable: The parameter cannot be assigned in the Nooxl model section. The default value is always used. OptionAllow null values: Null values are not interpreted as errors.

Using data integration in a model section

After defining a data connection with a data query command, it can be used in a Nooxl model.

Markings in the Nooxl model

For our example in the Nooxl model “Acquisition Quick Check”, key figures for a property acquisition are determined. The key figures and a status text are to be transmitted to a third-party system. This requires 3 markups: 2 parameter areas and 1 trigger area.

Markups of the section with model in design mode
Markups of the data query section with the Nooxl model in design mode

  • (1) The “KPIs” marker points to a range of cells with result values for the KPIs parameter.
  • (2) The “Next Step” marker contains values for the State parameter.
  • (3) The “Start flow” marker points to the “Start” cell for triggering the call.

Setting up the data retrieval section in the Nooxl model

Edit section with model in design mode

  • (1) The data connection from the data integration is selected here.
  • (2) An associated data retrieval command with its parameters is selected from the data integration here.
  • (3) The parameter definitions are assigned markers from which values for the parameter are read from the Nooxl model.
  • (4) Options can be specified for parameters of the CellRange data type:
    • Option Text: All values are read as text. Option 'Headers': The range contains headers. Option 'Types': The data type of the values is automatically determined from the first row. (5) This is where the trigger for the call is set. The call can be made manually, for example, by clicking on the cell range, or automatically when saving.

Calling the third-party API

Calling the third-party provider API

In our example model, after setting the “Next step” (1) to “Forward to management”, you can now click on the “Start” cell (2). The API call to the third-party provider is made with the KPI values (3).