Please enable JavaScript to view this site.

InterFormNG2 Manual

In InterFormNG2 it is possible to call (most) external HTTP REST APIs / Webservices and form submits using workflow components.

 

The calls are based on RFC2616 Hypertext Transfer Protocol HTTP/1.1 https://www.ietf.org/rfc/rfc2616.txt

 

The external HTTP calls can be used to interact with third party software which supports REST API calls, including an almost unlimited number of Open REST APIs or automatization of form submits to a website.

 

This section covers the HTTP Post Request, but these HTTP components are available:

 

HTTP Get Request

HTTP Post body only Request

HTTP Post multipart Request

HTTP Post request

 

An overview/example for use is found in the section, Call external HTTP(s) rest apis

 

Common for all components

All components can convert a returned JSON document to XML for futher processing in NG2. The returned documents are added as the payload in the workflow and the following workflow variable is set: interformng.httpReturnCode=### where ### is the HTTP return code (200=OK, 403=Access denied etc)

 

 

Prerequisites

Basic knowledge on how the HTTP protocol works.

 

This workflow component is similair to the HTTP Get Request, except that the parameters are encoded as the HTTP payload.

 

The HTTP Post request has these parameters:

 

NG2HTTPPost0001

 

The parameters are described in this section.

 

 

Example of use

We can login to InterFormNG2 using the HTTP Post Request.

 

Add the HTTP Post Request Component:

 

Set the following parameters:

URL: http://127.0.0.1:8086/oauth/token

Output type: XML

Convert JSON to XML: Checked

HTTP Method: Post

Header name: authorization  

Header value: concat('basic',' ',ng:base64('interform:Io14oarPPnv3Bso10bagGA9Ovns2lvxt'))

(Header value must be an xpath expression)

 

Parameter names and values:

 

username=default/home

password=password

grant_type=password

 

(These are the default login/password, make sure to use the current ones)

 

When running this request, the following should be returned:

 

<?xml version="1.0" encoding="UTF-8"?>

<xml>

<access_token>eyJhbGciO......</access_token>

<token_type>bearer</token_type>

<refresh_token>eyJhbGciOiJI.....</refresh_token>

<expires_in>3600</expires_in>

<scope>read write</scope>

<pwChangeRequired>false</pwChangeRequired>

<tenantId>home</tenantId>

<jti>9959364f-e103-488e-9c23-aae4a3fd5c5d</jti>

</xml>