LSEG Data Library for TypeScript

Session.Desktop.Definition Object

Used for creating a definition object for a desktop session.

This method returns a definition of the desktop session. This definition holds all the parameters that define the session to be created. Once the session is defined, a call to the getSession() method creates and returns the session.

Desktop sessions are used to connect applications to the data platform through the Workspace desktop application.

Syntax

Session.Desktop.Definition(params: string | Session.DesktopSessionParams)

Parameters

Either appKey: string that could be passed as a single parameter, or an object literal that can include the below-listed properties:

Value Description Data type Optional Default value
appKey Workspace application key, necessary to authenticate the specific application with the session string No -
scope Defines limits, the scope of Elektron data services for this sign on session string Yes trapi
port Optional API Proxy port number Yes 9000
appName Defines an external app name which calls library string Yes LD-TS-JS-LIB

Returned value

A new instance of Session.Definition

Usage

The following example demonstrates how to create a Definition object for desktop session.

import { Session } from '@lsegroup/data';

const desktopSession: Session = Session.Desktop.Definition('appKey').getSession();

await desktopSession.open();
import { Session } from '@lsegroup/data';

const desktopSession: Session = Session.Desktop.Definition({
        appKey: 'appKey',
        port: 9000,
    }).getSession();

await desktopSession.open();

None.

166 words (0:52 mins)