Liquit.Initialize

Prev Next

The Liquit.Initialize function allows you to connect to the Application Workspace. It determines the version of the targeted Application Workspace zone. Then the Application Workspace API translates the API calls to the correct syntax/endpoints.

Request parameters

The first parameter is the Application Workspace zone, for which you need to specify a string containing the URL to which you want to connect.

The following extra options are available for the API as the second parameter:

Name Description Default value
version The version number of the API layer to use. it is automatically detected if it is not set or it is set to null. Use the following versions to support certain feature sets:
  • 3.0 - This enables the feature set for 3.x.
  • 3.10- This enables the feature set for 4.x. It works only for Application Workspace 4.0 and later, otherwise, it returns errors on subsequent API calls.
null
relogin Executes a custom login process when a session has expired. This can be used to trigger a new Liquit.Login/Liquit.SSO call. If this option is not configured, the page is refreshed. null
token Specify a token previously provided by the Login/SSO functions. It will be reused for the current session. If the token is invalid or expired, relogin will be triggered on the first API call. null

Example

Liquit.Initialize('https://workspace.recastsoftware.com', {
  version: '3.0',
  relogin: function () { console.log('Session has expired'); },
  token: null
});

If the version of the server you specify is incorrect, the API call returns an error. The error is not returned by the Liquit.Initialize function.