SRU/SRW

General Purpose

Search for SIPs or IEs based on the SRU protocol. Returns matching SIP IE or File metadata via SRU protocol as one or more Dublin Core records, enriched with a SIP ID, an IE PID, or a FL PID as a dc:identifier. IEs and FLs are also enriched with delivery deep links.

Note: SIP-level search is supported as of Rosetta v5.3. File-level search is supported as of Rosetta v6.0.

Input Parameters

ParameterDescriptionValue
server nameThe server name or the IP addressstring
port numberThe port number that the server is listening onnumber
versionThe SRU version – Should be ‘1.2’string
operationThe specific SRU operation – Should be ‘searchRetrieve’string
queryThe IE field that the search is based on (see examples below)
Note: Suppressed records are excluded from the results.
string
maximumRecordsThe maximum number of records returned per response (optional)
Note: Number of results will not exceed 10,000
number
recordSchemaThe requested metadata format (optional, currently dc only)string
startRecordThe start of the range of the result set records (optional, default=1)number
sortBySort results by an IE indexed field + sort.descending /sort.ascending (optional)string

Input URL Syntax

SRU request based on an indexed field:

https:// <Rosetta delivery load balancer host>:<Rosetta delivery load balancer port>/search/operational/sru?version=1.2&operation=searchRetrieve&query=<index>=<value>&maximumRecords=5&recordSchema=dc
https:// <Rosetta delivery load balancer host>:<Rosetta delivery load balancer port>/search/permanent/[ie|file]/sru?version=1.2&operation=searchRetrieve&query=<index>=<value>&maximumRecords=5&recordSchema=dc

To retrieve a list of searchable indexes, refer to the relevant explain document:

SIPs: https://rosetta.exlibrisgroup.com/search/operational/sru?service=explain
IEs: https://rosetta.exlibrisgroup.com/search/permanent/ie/sru?service=explain
Files: https://rosetta.exlibrisgroup.com/search/permanent/file/sru?service=explain

Note: For purposes of backward compatibility, base URLs https://rosetta.exlibrisgroup.com/delivery/sru and https://rosetta.exlibrisgroup.com/search/permanent/sru are also supported for IE search. Users running v6.0+ should prefer the URLs above.

Limitations

  • Operator between search fields must by ‘and’ (not ‘or’ etc.).
  • Operator within a search field must be = for matching by keyword, or == for matching a phrase (==”” for ‘is empty’). Other operators (!=, <, etc.) are not supported.
  • Date format in date fields must be YYYY-MM-DD.

Input Example

IE Delivery via SRU based on File Extension sorted, maximum records:

https://rosetta.exlibrisgroup.com/search/permanent/sru?version=1.2&operation=searchRetrieve&query=FILE.generalFileCharacteristics.fileExtension=jpg%20sortBy%20IE.dc.title/sort.descending&maximumRecords=5

IE Delivery via SRU based on Access Rights Policy and dc:creator:

https://rosetta.exlibrisgroup.com/search/permanent/sru?version=1.2&operation=searchRetrieve&query=IE.accessRightsPolicy.policyId=AR_EVERYONE+IE.dc.creator=%22van%20gogh%22

SIP Delivery via SRU based on SIP ID

https://rosetta.exlibrisgroup.com/search/operational/sru?version=1.2&operation=searchRetrieve&query=SIP.pid=2

IE Delivery via SRU based on date (dcterms:created):

https://rosetta.exlibrisgroup.com/search/permanent/sru?version=1.2&operation=searchRetrieve&query=IE.dcterms.created=2010-10-05

Output Example

Multiple IEs

<?xml version="1.0" encoding="UTF-8"?><searchRetrieveResponse xmlns=">
  <version>1.2</version>
  <numberOfRecords>15</numberOfRecords>
  <records>
    <record>
      <recordSchema>info:srw/schema/1/dc-v1.1</recordSchema>
      <recordPacking>xml</recordPacking>
      <recordData>
        <dc:record xmlns:dc=" xmlns:xsi=" xmlns:mets=" xmlns:dv=" xmlns:xlin=" xmlns:mix=" xmlns:mods=" xmlns:dcterms=">
          <dc:title>Jubel-Kalender zur Erinnerung an die Völkerschlacht bei Leipzig vom 16. - 19. October A. D. 1813</dc:title>
          <dc:type>text</dc:type>
          <dc:publisher>Weber</dc:publisher>
          <dc:date>1863</dc:date>
          <dc:publisher>universitäts- und Landesbibliothek</dc:publisher>
          <dc:rights>AR_EVERYONE</dc:rights>
          <dc:identifier xsi:type="PID">IE21737</dc:identifier>
          <dc:identifier xsi:type="stream"></dc:identifier>
          <dc:identifier xsi:type="thumbnail"></dc:identifier>
        </dc:record>
      </recordData>
      <recordPosition>1</recordPosition>
    </record>
    <record>
      <recordSchema>info:srw/schema/1/dc-v1.1</recordSchema>
      <recordPacking>xml</recordPacking>
      <recordData>
        <dc:record xmlns:dc=" xmlns:xsi=" xmlns:mets=" xmlns:dv=" xmlns:xlin=" xmlns:mix=" xmlns:mods=" xmlns:dcterms=">
          <dc:title>Katechismus für den teutschen Kriegs- und Wehrmann, worin gelehret wird, wie ein christlicher Wehrmann seyn und mit Gott in den Streit gehen soll</dc:title>
          <dc:type>text</dc:type>
          <dc:date>1813</dc:date>
          <dc:publisher>universitäts- und Landesbibliothek</dc:publisher>
          <dc:rights>AR_EVERYONE</dc:rights>
          <dc:identifier xsi:type="PID">IE22978</dc:identifier>
          <dc:identifier xsi:type="stream"></dc:identifier>
          <dc:identifier xsi:type="thumbnail"></dc:identifier>
        </dc:record>
      </recordData>
      <recordPosition>2</recordPosition>
    </record>
  </records>
</searchRetrieveResponse>

 

Single IE

<?xml version="1.0" encoding="UTF-8"?>
<searchRetrieveResponse xmlns="http://www.loc.gov/zing/srw/">
<version>1.2</version>
<numberOfRecords>1</numberOfRecords>
<records>
<record>
<recordSchema>info:srw/schema/1/dc-v1.1</recordSchema>
<recordPacking>xml</recordPacking>
<recordData>
<dc:record xmlns:dc=" xmlns:xsi=" xmlns:mets=" xmlns:xlin=" xmlns:mods=" xmlns:dcterms=">
<dc:title>cell line "M1", combination of antibody stainings no 2</dc:title>
<dc:identifier>M1_Kombi2</dc:identifier>
<dc:creator>admin</dc:creator>
<dc:format>Olympus Image Format</dc:format>
<dcterms:created>2012-10-29</dcterms:created>
<dcterms:isPartOf>CAi Collections/Wintersemester 2012/IIF/Gruppe 1</dcterms:isPartOf>
<dc:rights>AR_EVERYONE</dc:rights>
<dc:identifier xsi:type="PID">IE23618</dc:identifier>
<dc:identifier xsi:type="stream"/>
<dc:identifier xsi:type="thumbnail"/>
</dc:record>
</recordData>
<recordPosition>1</recordPosition>
</record>
</records>
</searchRetrieveResponse>

Authentication

(v5.4 and higher)

Access to the SRU server may be restricted by setting the sru_authentication general parameter to ‘true’. When set to true, SRU requests must include Basic Authentication as an Authorization HTTP header. See here for the expected syntax. Authentication errors will return an info:srw/diagnostic/1/3 diagnostic.

Error Handling

Rosetta’s SRU server supports the following diagnostics:

3 – Authentication error.

10 – Query syntax error.

52 – Result set temporarily unavailable. Returned when all Rosetta index servers are unresponsive (v6.0+).

59 – Result set created with valid partial results available. Returned when one or more (but not all) of Rosetta index servers are unresponsive (v6.0+).