The following describes the InterFormNG2 APIs.
<NG2_URL> is used to denote the base URL of InterFormNG2, by default https://localhost:8086
Swagger documentation for external API, authorization and webservice input is available for the InterFormNG2 apis. This documentation is available on: https://localhost:8086/swagger-ui.html
You need to sign on to InterFormNG2 first in order to access this documentation. One way to do that is to sign on to InterFormNG2 first via https://localhost:8086
and then add this: "/swagger-ui.html" (without "") to the address in the browser. Then you will see this:
The API can for instance be tested with Postman.
The attached zip file contains an environment definition and a request collection for Postman. This can be unzipped and then the two files can be imported to a Postman workspace.
The token request returns an access token that is used for authentication/authorization on all other requests. The access_token must be used as an authorization HTTP header of "bearer" type on all other requests.
The request Content-Type header must be "application/x-www-form-urlencoded".
The Authorization header must be basic auth with username "interform" and password "Io14oarPPnv3Bso10bagGA9Ovns2lvxt".
POST <NG2_URL>/oauth/token
Input:
Key | Value |
username | <username>[/tenantId] |
password | password of the user above |
grant_type | "password" |
For username, it is enough to specify user name if the user is only associated with one tenant. If the user is associated with multiple tenants, then the tenant id must also be specified.
Note that the grant_type is the constant value "password".
JSON example output:
{
"access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJwd0NoYW5nZVJlcXVpcmVkIjp0cnVlLCJ1c2Vy
X25hbWUiOiJyZW1vdGVAaW50ZXJmb3JtNDAwLmNvbSIsInNjb3BlIjpbInJlYWQiLCJ3cml0ZSJdL
CJ0ZW5hbnRJZCI6ImltcG9ydCIsImV4cCI6MTYxOTUyMzM0MSwiYXV0aG9yaXRpZXMiOlsiUk9MRV
9XRUJfU0VSVklDRSJdLCJqdGkiOiJhMGE1ZjcyZi02Mzc0LTRhZDEtYWZkNy0wZjZhODdlZDUyOTU
iLCJjbGllbnRfaWQiOiJpbnRlcmZvcm0ifQ.G9-gN51l3TbShPOdydCJND88xgHdlQUawpanQUDKcHo",
"token_type": "bearer",
"refresh_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJwd0NoYW5nZVJlcXVpcmVkIjp0cnVlLCJ1c2VyX
25hbWUiOiJyZW1vdGVAaW50ZXJmb3JtNDAwLmNvbSIsInNjb3BlIjpbInJlYWQiLCJ3cml0ZSJdLCJ
hdGkiOiJhMGE1ZjcyZi02Mzc0LTRhZDEtYWZkNy0wZjZhODdlZDUyOTUiLCJ0ZW5hbnRJZCI6Imltc
G9ydCIsImV4cCI6MTYxOTU1NTc0MSwiYXV0aG9yaXRpZXMiOlsiUk9MRV9XRUJfU0VSVklDRSJdLCJ
qdGkiOiJkNmFjYTRhYi0zOTk2LTRkNDctOTNlOC1iYWY1YWIyMGQ3YzYiLCJjbGllbnRfaWQiOiJpb
nRlcmZvcm0ifQ.6H3CvvMnbukeKktwT61gJuIAaDVxmkcKQNdlJKz9uQY",
"expires_in": 3599,
"scope": "read write",
"pwChangeRequired": true,
"tenantId": "default",
"jti": "a0a5f72f-6374-4ad1-afd7-0f6a87ed5295"
}
The access_token must be used as Authorization bearer token on subsequent requests.
expires_in is the number of seconds until the token expires and must be renewed.
Other values are irrelevant for API usage.
These sections of APIs are available: