Return to Common Add-in functions

Creating an ICWS Connection

If you would like to create an add-in with more advanced customization features than are available in the Add-in API, you can tap into the ICWS API by creating an ICWS session. The following steps and example code will show you how to go about creating an ICWS session:

  1. Determine the base URL.
  2. Get the ICWS connection request settings.

Note:

  • In order to access the ICWS API, an ICWS Feature License must be installed on the IC Server.
  • When you use the ICWS API, keep in mind that the IC Server and the session managers will incur additional load that could effect overall system performance.

Determine the base URL

Because the base URL is subject to custom administrative control, rather than providing a specific base URL, we have provided a function called ININ.Addins.IC.getIcwsBaseUrl that will determine and return the best base URL to use for the ICWS connection.

var baseUrl = ININ.Addins.IC.getIcwsBaseUrl();

Get the ICWS connection request settings

To get the ICWS connection request settings, you'll need to call ININ.Addins.IC.requestIcwsConnectionRequestSettings:

ININ.Addins.IC.requestIcwsConnectionRequestSettings().then(function(connectionRequestSettings) {
   // POST icws/connection
});

You can then make the connection request using either the ICWS SDK library or an AJAX HTTP manual request using XMLHttpRequest. For more information on making the connection, see the Getting Started > Initial Steps > Connecting topic in the ICWS documentation.