Liquit.Initialize
  • 12 Dec 2023
  • 1 Minute to read
  • Dark
    Light
  • PDF

Liquit.Initialize

  • Dark
    Light
  • PDF

Article summary

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

Request parameters

The first parameter is the Liquit 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:

NameDescriptionDefault value
versionThe 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 Liquit Workspace 4.0 and later, otherwise, it returns errors on subsequent API calls.
null
reloginExecutes 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
tokenSpecify 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.liquit.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.


Was this article helpful?