API session

Most of the DLS Api method require the DLA Api client to be logged on to DLS Api. Logon to DLS Api is performed by calling the ' openSession ' method with valid credentials for a DLS Api user. A DLS Api user is a user which has the role 'DSL-API'. The 'openSession' method returns a string which serves as session reference during the DLS Api session. This session reference must be passed to all session-dependend DLS Api methods. The session is closed by calling ' closeSession ' passing the session reference as parameter.

Thus, using DLS Api interface requires to perform following steps after DLS installation completed.

DescriptionRemark
Create a user with role 'DLS-API' via DLS gui, and define a session timeout for this user.This step must be performed only once after installation.
Login to DLS Api by calling ' openSession ' with user name and password. This step can be performed once at DLS Api client startup, or when the client starts a business process. Be sure to not open and close a DLS Api session for each DLS Api method call since this is to time and resource consuming.
Retrieve a session reference from 'openSession' return value and store it for subsequent DLS Api method calls.The DLS Api session expires after session timeout which is defined for the user which opened the session. I.e. the session is valid as long as it it not expired, it is not closed by calling 'closeSession' and the DLS server is running.
Call DLS Api methods with stored session reference where ever needed.
Close DLS Api session by calling ' closeSession '. This step should be performed latest when DLS Api client shuts down or when a client business process completed.