General Purpose

This X-Service retrieves a list of ‘My Databases’ sets defined for a logged-in user and retrieve information about each set.


  • 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
  • Authentication (either local or remote)
    • bor_auth – for local authentication of the user and to retrieve a valid borrower’s ID
    • PDS authentication – for remote authentication of the user and to obtain a pds handleor bor_info
  • retrieve_my_sets

Input Parameters


1. SESSION_ID – X(50)


  • Option 1
    • SOURCE_ID – X(40).
    • INSTITUTE – X(30).
    • VERIFICATION – X(20).
  • Option 2
    • BOR_ID – X (12).
    • VERIFICATION – X (20).
  • Option 3
    • PDS_HANDLE – X(50)

Explanation of the mandatory and optional parameters:

  • session_id – The session ID is the unique identifier of the login.
  • user id – One of the following:
    1. source_id – source_ID of user requesting My Databases.
      institute – User’s institution.
      verification – User’s password
    2. bor_id – User_ID of the user requesting My Databases.
      verification – User’s password
    3. pds_handle – User’s unique token returned by the remote authentication system

Input XML Format


<?xml version = "1.0" encoding = "UTF-8"?>

Input URL Syntax

In order to retrieve My Databases, the input parameters must be embedded within the appropriate URL syntax:

MetalibPath:port/X?op=retrieve_my_sets_request&bor_id=patron num&verification=***&session_id=session_id

Example URL Syntax


Output XML Format

Information about each MySet:

  • Set sequence – Unique key in MetaLib. Use this key for searching the MySet by the search_my_sets X-Service.
  • Set name – Name of the Set.
  • Set description – Description of the Set.
  • No bases – Number of resources, defined in the Set.


<x_server_response metalib_version="4.00 (20)">
  <session_id new_session="n">32GS85B67MEX93N5PX6AAH8PYEXI1XPNPMQU8SCHJ9QR1R5I5D</session_id>

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_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_text>session timeout</error_text>

3. If the user-id cannot be found:

<error_text>User does not exist</error_text>

4. User ID is mandatory:

<error_text>User Id is mandatory</error_text>

5. If the requested user has no sets:

<error_text>User has no MySets</error_text>

6. If the institution does not exist:

<error_text>Institution does not exist</error_text>

7. If the format of the pds_handle is incorrect:

<error_text>Invalid pds_handle format</error_text>

8. If the pds_handle is not valid:

<error_text>Invalid pds_handle</error_text>

If 7 or 8 above are returned, the request will not terminate in error. The onus is on the calling application as to how to proceed.


Output XML Format example is wrong (or valid only for a very old MetaLib version). There is no set_sequence element, it’s mysets_id.


<?xml version="1.0" encoding="UTF-8"?>
<x_server_response metalib_version="4.4.3 (731)">
      <set_name>Test 1</set_name>
      <set_description>Description 1</set_description>
    <session_id new_session="N">9F6MY1YE6IEU19AV2TP83JNIA483AF4LVTKHA582QB9CH7GBA2</session_id>