retrieve_metalib_info

General Purpose

This X-Service enables you to retrieve MetaLib system parameters and run time status of Metalib programs.

The relevant X-Server parameters are gathered from several Metalib configuration sources and returned by logical set.
Note: Parameter names are case sensitive.

Flow

  • login – Called once by the calling application with valid /X user name and password. The session-id retrieved should be passed to all other API calls
  • retrieve_metalib_info

Input Parameters

Mandatory

1. SESSION_ID – X(50)

Optional

1. VIEW – X(9)

Explanation of the mandatory and optional parameters:
Note that you can use either source_full_info_flag or view, but not both.

  • session_id : The session ID is the unique identifier of the login.
  • view: valid values:
    • full – default – returns all the parameters together with the defined value, by logical set
    • customize – retrieves specific parameters by parameter name or subset of parameters by logical set name as requested together with the defined value:
      • Logical sets:
        • ml_sys_info
        • session_limits
        • search_params
        • server_status
        • inst_info
      • Parameter name – See the table below.

 

Logical setParameter name
ml_sys_infoML_VERSION
ml_sys_infoML_REVISION
ml_sys_infoSERVICE_PACK_NUMBER
ml_sys_infoSERVICE_PACK_NUMBER_ITEM
ml_sys_infoaleph_date_time
ml_sys_infodefault_character_conversion
session_limitswww_metalib_search_limit
session_limitswww_metalib_merge_limit
session_limitsWWW_SERVER_TIMEOUT
session_limitsWWW_X_SESSION_TIMEOUT
session_limitsWWW_CONNECTION_TIMEOUT
session_limitsWWW_V_SESSION_TIMEOUT
search_paramsSEARCH_SERVER_TIMEOUT
search_paramsmax_search_wait
search_paramsmax_search_processes
server_statuswww_server_m
server_statussearch_server
server_statusz39_gate
inst_info

Input XML Format

Examples:

1 – Customize

<?xml version = "1.0" encoding = "UTF-8"?>
<x_server_request>
  <retrieve_metalib_info_request>
    <session_id>3N175V44EL8HQI46U9K1QY4BXU488UF215P2R2XAMD4DQX6CCM</session_id>
    <view>customize</view>
      <logical_set>ml_sys_info</logical_set>
      <logical_set>inst_info</logical_set>
      <parameter_name>www_metalib_search_limit<parameter_name>
      <parameter_name>max_search_processes<parameter_name>
  </retrieve_metalib_info_request>
</x_server_request>

2 – Full

<?xml version = "1.0" encoding = "UTF-8"?>
<x_server_request>
  <retrieve_metalib_info_request>
    <session_id>3N175V44EL8HQI46U9K1QY4BXU488UF215P2R2XAMD4DQX6CCM</session_id>
    <view>full</view>
  </retrieve_metalib_info_request>
</x_server_request>

Input URL Syntax

The URL is limited to 2000 chars. If a longer string is required for the input, use the Input XML.

MetalibPath:port/X?op=retrieve_metalib_info_request&view=full/customize&session_id=Login session

Example URL Syntax

http://10.1.235.47:8331/X?op=retrieve_metalib_info_request&view=customize&session_id=3N175V44EL8HQI46U9K1QY4BXU488UF215P2R2XAMD4DQX6CCM&logical_set=ml_sys_info¶meter_name=www_metalib_search_limit

Output XML Format

Examples:

1 – Customize

<?xml version="1.0" encoding="UTF-8" ?>
<x_server_response metalib_version="3.14.00">
  <retrieve_metalib_info_response>
    <logical_set name="ml_sys_info">
      <parameter name="ML_VERSION" value="4" />
      <parameter name="ML_REVISION" value="0" />
      <parameter name="SERVICE_PACK_NUMBER" value="0" />
      <parameter name="SERVICE_PACK_NUMBER_ITEM" value="69" />
      <parameter name="ML_COPY" value="1" />
      <parameter name="aleph_date_time" value="2" />
      <parameter name="default_character_conversion" value="8859_1_TO_UTF" />
    </logical_set>
    <logical_set name="inst_info">
      <institution code="CENTRAL" num_of_portals="02">
        <portals>
          <portal code="CENTRAL" name_instance="INS01" />
          <portal code="POETRY" name_instance="INS02" />
        </portals>
        <eshelf_limits>
          <eshelf usergroup="" limit="0500" />
        </eshelf_limits>
      </institution>
    </logical_set>
    <session_id new_session="N">DKVIA6HGPTHGAIS3S7XXCYG5XP5E5TUJMEL3R34M7JMFNRU747</session_id>
  </retrieve_metalib_info_response>
</x_server>

2 – Full 

<?xml version="1.0" encoding="UTF-8" ?> 
<x_server_response metalib_version="3.14.00">
  <retrieve_metalib_info_response>
    <logical_set name="ml_sys_info">
      <parameter name="ML_VERSION" value="4" /> 
      <parameter name="ML_REVISION" value="0" /> 
      <parameter name="SERVICE_PACK_NUMBER" value="0" /> 
      <parameter name="SERVICE_PACK_NUMBER_ITEM" value="69" /> 
      <parameter name="ML_COPY" value="1" /> 
      <parameter name="aleph_date_time" value="2" /> 
      <parameter name="default_character_conversion" value="8859_1_TO_UTF" /> 
    </logical_set>
    <logical_set name="session_limits">
      <parameter name="www_metalib_search_limit" value="10" /> 
      <parameter name="www_metalib_merge_limit" value="150" /> 
      <parameter name="WWW_SERVER_TIMEOUT" value="60" /> 
      <parameter name="WWW_X_SESSION_TIMEOUT" value="3600" /> 
      <parameter name="WWW_CONNECTION_TIMEOUT" value="120" /> 
      <parameter name="WWW_V_SESSION_TIMEOUT" value="900" /> 
    </logical_set>
    <logical_set name="search_params">
      <parameter name="max_search_wait" value="90" /> 
      <parameter name="max_search_processes" value="150" /> 
      <parameter name="SEARCH_SERVER_TIMEOUT" value="60" /> 
    </logical_set>
    <logical_set name="server_status">
      <process name="www_server_m">
        <port>4331</port> 
        <pid>4226</pid> 
        <child /> 
        <start_at>Oct 06 12:45:27</start_at> 
        <status>Free</status> 
      </process>
      <process name="www_server_m">
        <port>4331</port> 
        <pid>4228</pid> 
        <child>0</child> 
        <start_at>Oct 06 12:45:27</start_at> 
        <status>Busy for 0 seconds</status> 
      </process>
      <process name="www_server_m">
        <port>4331</port> 
        <pid>4229</pid> 
        <child>0</child> 
        <start_at>Oct 06 12:45:27</start_at> 
        <status>Free</status> 
      </process>
  ...
      <process name="search_server">
        <port>0</port> 
        <pid>2172</pid> 
        <child /> 
        <start_at>Oct 06 12:45:27</start_at> 
        <status>Free</status> 
      </process>
      <process name="search_server">
        <port>0</port> 
        <pid>4227</pid> 
        <child>c3</child> 
        <start_at>Oct 06 12:45:27</start_at> 
        <status>Free</status> 
      </process>
  ...
      <process name="z39_gate">
        <port>7331</port> 
        <pid>30081</pid> 
        <child /> 
        <start_at>Oct 06 09:09:45</start_at> 
        <status>Free</status> 
      </process>
    </logical_set>
    <logical_set name="inst_info"> 
      <institution code="CENTRAL" num_of_portals="02"> 
        <portals> 
          <portal code="CENTRAL" name_instance="INS01" /> 
          <portal code="POETRY" name_instance="INS02" /> 
        </portals> 
        <eshelf_limits> 
          <eshelf usergroup="" limit="0500" /> 
        </eshelf_limits> 
      </institution> 
    </logical_set>
    <session_id new_session="N">DKVIA6HGPTHGAIS3S7XXCYG5XP5E5TUJMEL3R34M7JMFNRU747</session_id> 
  </retrieve_metalib_info_response>
</x_server_response>

Possible Error Codes

1. If the session_id, provided as an input parameter, is not valid, the following error message appears in the XML output:

<error_code>0151</error_code>
<error_text>You are not authorized to use this function</error_text>

This can be caused by not using the session_id returned from the Login X-Service.

2. If this X-Service was activated after the session had timed out:

<error_code>2050</error_code>
<error_text>Session timeout</error_text>

3. If an invalid view is specified:

<error_code>6029</error_code>
<error_text>The view must be either 'full' or 'customize'</error_text>

4. If customized view is requested, but no further parameters are specified:

<error_code>6030</error_code>
<error_text>It is mandatory to specify a logical_set or parameter_name with 'customize' view</error_text>

5. If a parameter value is missing:

<error_code>6031</error_code>
<error_text>The $1 parameter value is empty</error_text>

6. If no relevant info is found:

<error_code>6042</error_code>
<error_text>No info was found</error_text>

7. If an invalid parameter is specified:

<error_code>6043</error_code>
<error_text>Parameter '$1' does not exist</error_text>