# Session Transactions

{% hint style="warning" %}
**Limited Support/End of Life Capabilities**

The Classic API has been replaced by the Alemba RestFul API.  While we will continue to support the Classic API for clients that are still using it, no further development will be done.

If you need to request a hotfix or support for these features, please contact [<mark style="color:blue;">**Alemba Support**</mark>](https://alemba.help/production/Portal.aspx)
{% endhint %}

The ASM web service also gives the option of providing the login details to each transaction instead of calling the LogIn and LogOut transactions. If the web service transactions are called in this way, the analyst is logged in, the transaction executed after which the analyst is logged out.

The ASM web service allows multiple concurrent sessions for one analyst. This means that an analyst can be logged in to the main application and also be calling an API transaction at the same time without automatically logging out of the original main application session.  This will only take up one concurrent license.

### LogIn Transaction

The LogIn transaction logs the analyst into the system specified and generates a session ID for their session.  This session ID can then be passed to each transaction called through the API web service.

The LogIn transaction follows the same license checks as the main application. If an analyst is already logged on to ASM, an API session will not log them out of that session.

#### Input Parameters: LoginRequest

<table data-header-hidden><thead><tr><th width="179"></th><th width="83"></th><th width="126"></th><th width="101"></th><th></th></tr></thead><tbody><tr><td>Argument</td><td>Type</td><td>Mandatory</td><td>Default</td><td>Description</td></tr><tr><td>sLoginUserID</td><td>String</td><td>Yes</td><td>N/A</td><td>Analyst’s Login ID</td></tr><tr><td>sLoginPassword</td><td>String</td><td>Yes</td><td>N/A</td><td>Analyst’s Password</td></tr><tr><td>sDatabase</td><td>String</td><td>Yes</td><td>N/A</td><td>Name of the ASM System for logging in.</td></tr></tbody></table>

#### Return Values: LoginResponse

<table data-header-hidden><thead><tr><th width="160.33333333333331"></th><th width="125"></th><th></th></tr></thead><tbody><tr><td>Argument</td><td>Type</td><td>Description</td></tr><tr><td>sID</td><td>String</td><td>Session ID returned.  Will be “” if login failed</td></tr><tr><td>sMessage</td><td>String</td><td>Error/Warning Message returned from the API transaction.</td></tr><tr><td>Ret</td><td>APIReturn</td><td>Error/Warning Number returned from the API transaction.</td></tr></tbody></table>

### LogOut Transaction

The LogOut transaction logs a selected analyst out of ASM.

As soon as the analyst is logged out of the system, their Session ID becomes invalid. A warning will be returned if an invalid session ID or no session ID is passed to the transaction.

#### Input Parameters: LogOutRequest

<table data-header-hidden><thead><tr><th width="124"></th><th width="113"></th><th></th><th width="101"></th><th></th></tr></thead><tbody><tr><td>Argument</td><td>Type</td><td>Mandatory</td><td>Default</td><td>Description</td></tr><tr><td>sID</td><td>String</td><td>Yes</td><td>N/A</td><td>Analyst’s current Session ID</td></tr></tbody></table>

#### Return Values: LogOutResponse

<table data-header-hidden><thead><tr><th width="163.33333333333331"></th><th width="115"></th><th></th></tr></thead><tbody><tr><td>Argument</td><td>Type</td><td>Description</td></tr><tr><td>sMessage</td><td>String</td><td>Error/Warning Message returned from the API Transaction</td></tr><tr><td>Ret</td><td>APIReturn</td><td>Error/Warning Message returned from the API Transaction</td></tr></tbody></table>
