LOGON API

A LOGON request passes a user ID and associated password to the API in order to perform a logon for that user ID to the Content Manager OnDemand server. The user ID and password must be defined on the General tab of the user definition in the OnDemand Administrator client. As part of performing the LOGON function, the API will also request a list of folders from the Content Manager OnDemand server that the user is authorized to access. The folder list can be narrowed by specifying a fully or partially qualified folder name in the CS-FolderName field.

The fields listed in Table 1 must be specified by the customer application in the CS-CommonStructure and LO-LogonStructure fields before issuing the LOGON function request.

Table 1. CS-CommonStructure and LO-LogonStructure fields for the LOGON function
Field Description Required or optional?
CS-SocketType TCP/IP socket type. Valid values are:
0
Short socket . The socket is active only for REQUEST. This is the default value.
1
Persistent socket. The socket remains active from LOGON through LOGOFF.
Optional
CS-Eyeball Common Structure Eyeball value of ARSLSCCO. Required
CS-Length Length of the CS-CommonStructure. Required
CS-APILevel Reserved for future use. Reserved
CS-Request Function request value of LOGON. Required
CS-MidTierIPAddr TCP/IP address for the mid-tier server. The "Host Name" representation of the TCP/IP address is supported in all environments. Required
CS-MidTierPort TCP/IP port number for the mid-tier server. Required
CS-LibServIPAddr TCP/IP address for the Content Manager OnDemand library server. The "Host Name" representation of the TCP/IP address is supported in all environments. Required
CS-LibServPort TCP/IP port number for the library server. Required
CS-CodePage Content Manager OnDemand server code page. Default value is 500.
Note: The API does not edit this field for valid code page values.
Required
CS-FolderListMax An input value of zero requests that the LOGON function return all folder names that the user is authorized to access that match the CS-FolderName input value. Required
CS-FolderName Folder name. Valid values are:
  • blank - return all folder names (up to maximum) the user has permission to access.
  • Folder name prefix ending with a percent (%) - return all folder names (up to maximum) with this prefix value that the user has permission to access.
  • full folder name - return only the folder indicated.
Optional
CS-APITraceLevel Midserver trace flag:
0
No trace
1
Summary tracing
2
Full trace
Required
CS-NumSecs-to-Wait A non-zero number may be entered to specify the wait time for a LOGON request to complete. Default is 300 seconds.
Note: Once a non-zero value has been specified, it remains in effect for all subsequent API requests until a new value is specified.
Optional
LO-Eyeball Logon Structure Eyeball value of ARSZSCLO. Required
LO-Length Length of the LO-LogonStructure. Required
LO-UserID Content Manager OnDemand user ID. The user ID provided must match a user defined to the Content Manager OnDemand server database. Required
LO-Password User password. The password must match the password for the user defined to the Content Manager OnDemand server database for the user ID in field LO-UserID Required

Table 2 and Table 3 list the fields that are returned from the Content Manager OnDemand server following the LOGON request. The fields are provided in the CS-CommonStructure and FL-FolderListStructure (pointed to by CS-pFolderList).

Values returned in the storage area addressed by pointer CS-pFolderList include a table whose entries consist of folder names and descriptions. A count field is supplied that indicates the number of entries in the table.

Note: Following a successful LOGON, the customer application program must execute the following statement to gain access to the fields: Set address of FL-FolderListStructure to CS-pFolderList
Table 2. CS-CommonStructure fields returned by the LOGON function
Field Description Field set by
CS-pFolderList Pointer to the Content Manager OnDemand folder list. The folder list returned at this address is defined by the fields under group item name FL-FolderListStructure. API
CS-ReturnCode Function Request Return Code.
Valid values are:
0
LOGON and folder list were successful
4 or greater
LOGON and folder list were unsuccessful; examine the return message for further diagnostic information
API
CS-Message This field contains a text string suitable for display. An informational message might be returned when CS-ReturnCode is equal to zero.
Note: CS-Message should be set to "spaces" before each Structured APIs request.
API
CS-ConnectionID Connection identifier associated with the signed-on user. Content Manager OnDemand server
Table 3. FL-FolderListStructure fields returned by the LOGON function
Field Description Field set by
FL-Count Number of folder names returned.

The following fields represent a table of folders (equal to the FL-Count) to which the user has permission to access.

Content Manager OnDemand server
FL-Name Folder name. This value is returned by selecting Folders > General > Folder Namein the OnDemand Administrator client. Content Manager OnDemand server
FL-Description Folder description. This value is matched against the description found when you select Folders > General > Folder Descriptionin the OnDemand Administrator client. Content Manager OnDemand server