Holdings
General Purpose
The Holdings resource may be accessed with a GET method to retrieve a specific BIB record’s holdings (HOL records) list, or a specific holding record. The record’s holdings are exported in MARCXML format.
Product Version Compatibility
Versions 18, 20.1 and later
Interface Type
RESTful API
Hierarchy
Input Parameters
REST Resource IDs:
Record ID: The Aleph BIB record identifier. The identifier is composed of the BIB library code + the system number. For example, USM01000050362
Holding ID: The Aleph HOL record identifier. The holding ID may be used to fetch a specific holding’s information. The identifier is composed of the HOL library code + the HOL record key. For example, USM60000049565.
URL Parameters:
institution: The ID of an institution (ADM library) for which the information is requested. Optional.
view: The format in which the holding record will be displayed. May be used to expand the HOL information when a holdings list is exposed. Possible values are full, for exposing the full HOL records in MARCXML format, and items, for listing all of the items that are attached to the HOL record. Optional.
sublibrary: May be used to filter the list to include only holdings of a specific sublibrary. Optional.
Input URI
Items List:
<Base URL>:/record/<record ID>/holdings
For example:
To retrieve the holdings list for the BIB record 000028084, use:
http://server.name:1892/rest-dlf/record/USM01000028084/holdings
To view the holdings list in full view, use:
http://server.name:1892/rest-dlf/record/USM01000028084/holdings?view=full
To view the holdings list with the holdings’ attached items, use:
http://server.name:1892/rest-dlf/record/USM01000028084/holdings?view=items
To retrieve the holdings list for BIB record 00028084 and for a specific institution, use:
http://server.name:1892/rest-dlf/record/USM01000028084/holdings?institution=USM50
To retrieve the items list for BIB record 00028084, viewing only items of a specific sublibrary, use:
http://server.name:1892/rest-dlf/record/USM01000028084/holdings?sublibrary=WID
Specific Holding:
<Base URL>:/record/<record ID>/holdings/<holding ID>
For example:
To retrieve a specific holding’s information for BIB record 000028084, use:
http://server.name:1892/rest-dlf/record/USM01000028084/holdings/USM60000049565
To retrieve a specific holding’s information for BIB record 000028084 with the attached items, use:
http://server.name:1892/rest-dlf/record/USM01000028084/holdings/USM60000049565?view=items
Output XML Format
The returned XML includes the holdings lists or a specific item’s information. The holdings list is returned in MARCXML format. The items list is exported as in the brief view of the items list.
Holdings list example (full):
<?xml version="1.0" encoding="UTF-8"?> <get-hol-list> <reply-text>ok</reply-text> <reply-code>0000</reply-code> <holdings> <holding href="http://server.name:1892/rest-dlf/record/USM01000028084/holdings/USM60000049565"> <leader>00272nu 22001211n 4500</leader> <controlfield tag="001">000049565</controlfield> <controlfield tag="005">20020423151852.0</controlfield> <controlfield tag="008">930525|| | ||||uu |930916</controlfield> <datafield tag="852" ind1="0" ind2=" "> <subfield code="b">WID</subfield> <subfield code="c">WIDLC</subfield> <subfield code="h">PQ2631.R63</subfield> <subfield code="i">T413 1993</subfield> </datafield> </holding> </holdings> </get-hol-list>
Specific holdings example:
<?xml version="1.0" encoding="UTF-8"?> <get-hol> <reply-text>ok</reply-text> <reply-code>0000</reply-code> <holding> <leader>00272nu 22001211n 4500</leader> <controlfield tag="001">000049565</controlfield> <controlfield tag="005">20020423151852.0</controlfield> <controlfield tag="008">930525|| | ||||uu |930916</controlfield> <datafield tag="852" ind1="0" ind2=" "> <subfield code="b">WID</subfield> <subfield code="c">WIDLC</subfield> <subfield code="h">PQ2631.R63</subfield> <subfield code="i">T413 1993</subfield> </datafield> </holding> </get-hol>
Possible Error Codes
19 : Record does not exist
26 : Holding does not exist
Expand Routines
It is possible to use the following expand routines – by setting the “tab_expand
” table of the holdings library (“XXX60
“) tab directory under the HOL-LOC
expand menu (COL. 1).
For example:
HOL-LOC expand_doc_hol_loc_1_a HOL-LOC expand_doc_hol_loc_2_a
expand_doc_hol_loc_1_a
This program retrieves the item information of all the items attached to the holdings record.
expand_doc_hol_loc_2_a
This program creates an STA
field with $aSUPPRESSED-TEMP
if all the items attached to the holdings record – retrieved by expand_doc_hol_loc_1_a
– are in a temporary location. SUPPRESSED
holdings records are not displayed at the head of the items list in the Web OPAC.
Note that both expand_doc_hol_loc_1_a
and expand_doc_hol_loc_2_a
are defined in the tab_expand
table of the holdings library tab directory under the HOL-LOC
expand routine.