Services

List of services, with their technologies, endpoints, and examples

DRUM

The Digital Repository at the University of Maryland (DRUM) collects, preserves, and provides public access to the scholarly output of the university. Faculty and researchers can upload research products for rapid dissemination, global visibility and impact, and long-term preservation.

OAI-PMH

Endpoint: https://drum.lib.umd.edu/oai/request

Example:

curl "https://drum.lib.umd.edu/oai/request?verb=Identify"

curl "https://drum.lib.umd.edu/oai/request?verb=ListSets"

curl "https://drum.lib.umd.edu/oai/request?verb=ListMetadataFormats"

OpenSearch

Endpoint: https://drum.lib.umd.edu/open-search/discover

Example: drum-search.py

import urllib.request
from xml.etree import ElementTree

# Search DRUM using OpenSearch

ENDPOINT = 'https://drum.lib.umd.edu/open-search/discover'

def search(**params):
    ''' Search DRUM using OpenSearch, using named parameters '''

    # Build the URL
    params['rpp'] = 5  # get first 5 results
    search_url = ENDPOINT + '?' + urllib.parse.urlencode(params)

    print('\n========================')
    print(f'Search URL: {search_url}')

    # Get search results as parsed XML
    with urllib.request.urlopen(search_url) as request:
        atom = ElementTree.parse(request).getroot()

        # Iterate over the returned items
        for element in atom.findall('{http://www.w3.org/2005/Atom}entry'):

            # Extract Item information
            title = element.find('{http://www.w3.org/2005/Atom}title').text
            handle_url = element.find('{http://www.w3.org/2005/Atom}link').get('href')
            author = element.find('{http://www.w3.org/2005/Atom}author/{http://www.w3.org/2005/Atom}name').text

            print('----')
            print(f'Title:      {title}')
            print(f'Author:     {author}')
            print(f'Handle URL: {handle_url}')

# phrase is "Black Lives Matter"
search(query='"Black Lives Matter"')

# advisor is smela
# collection is 1903/2795 (Mechanical Engineering ETDs)
search(query='advisor:smela', scope='1903/2795')

# community is 1903/2278 (Library Staff Research Works)
search(query='*:*', scope='1903/2278')

Additional Examples:

Digital Collections

University of Maryland Libraries’ Digital Collections

OAI-PMH

Endpoint: https://digital.lib.umd.edu/oaicat/OAIHandler

Example:

curl "https://digital.lib.umd.edu/oaicat/OAIHandler?verb=Identify"

curl "https://digital.lib.umd.edu/oaicat/OAIHandler?verb=ListSets"

curl "https://digital.lib.umd.edu/oaicat/OAIHandler?verb=ListMetadataFormats"

Digital Collections Audio/Video

University of Maryland Libraries’ Digital Collections Audio/Video Content

OpenSearch

OpenSearch Description: https://av.lib.umd.edu/catalog/opensearch.xml

JSON Endpoint: https://av.lib.umd.edu/catalog.json

Example:

PARAMS='search_field=all_fields&q=athletics'

curl "https://av.lib.umd.edu/catalog?$PARAMS"

curl "https://av.lib.umd.edu/catalog.rss?$PARAMS"

Example: digital-collections-av-search.py

import urllib.request
import json

# Search Digital Collections Audio/Video using JSON OpenSearch

BASE = 'https://av.lib.umd.edu/'
ENDPOINT = 'https://av.lib.umd.edu/catalog.json'

# Keyword query on 'Maryland'
params = {
    "search_field": "all_fields",
    "q": "maryland",
}

search_url = ENDPOINT + '?' + urllib.parse.urlencode(params)

# Get search results as parsed XML
with urllib.request.urlopen(search_url) as request:
    response = json.loads(request.read())

    # Iterate over the returned items
    for item in response['response']['docs']:
        link = BASE + "media_objects/" + item['id']

        title = item['title_tesi']

        print('----')
        print(f'Title: {title}')
        print(f'Link:  {link}')

BTAA Geoportal

The Big Ten Academic Alliance (BTAA) Geoportal connects users to digital geospatial resources, including GIS datasets, web services, and digitized historical maps from multiple data clearinghouses and library catalogs. The site is solely a search tool and does not host any data.

OpenSearch

OpenSearch Description: https://geo.btaa.org/catalog/opensearch.xml

RSS+XML Endpoint: https://geo.btaa.org/catalog.rss

JSON Endpoint: https://geo.btaa.org/catalog.json

The OpenSearch API is not officially documented by the Geoportal Documentation page.

Example: The RSS+XML and JSON endpoints operate using the same set of URL parameters used by the website interface, eg these curl commands return the same result set:

PARAMS='search_field=all_fields&q=maryland'

curl "https://geo.btaa.org/catalog?$PARAMS"

curl "https://geo.btaa.org/catalog.rss?$PARAMS"

curl "https://geo.btaa.org/catalog.json?$PARAMS"

Example: geoportal-search.py

import urllib.request
import json

# Search BTAA Geoportal using JSON OpenSearch

ENDPOINT = 'https://geo.btaa.org/catalog.json'

# Keyword query on 'Maryland'
params = {
    "search_field": "all_fields",
    "q": "maryland",
}

search_url = ENDPOINT + '?' + urllib.parse.urlencode(params)

# Get search results as parsed XML
with urllib.request.urlopen(search_url) as request:
    response = json.loads(request.read())

    # Iterate over the returned items
    for item in response['data']:
        link = item['links']['self']

        if ('attributes' in item
            and 'dct_description_sm' in item['attributes']):

            title = item['attributes']['dct_description_sm']['attributes']['value']

        else:
            title = "??"

        print('----')
        print(f'Title: {title}')
        print(f'Link:  {link}')