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://api.drum.lib.umd.edu/server/oai/request

Example:

#!/bin/bash

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

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

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

Additional Examples:

OpenSearch

Endpoint: https://api.drum.lib.umd.edu/server/opensearch/search

Example: drum-search.py

#!/usr/bin/env python3

import urllib.request
from xml.etree import ElementTree

# Search DRUM using OpenSearch

ENDPOINT = 'https://api.drum.lib.umd.edu/server/opensearch/search'


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 http://hdl.handle.net/1903/2795 (Mechanical Engineering ETDs)
search(query='advisor:smela', scope='a96d44b7-57d2-46ed-80e9-98f316a82a19')


# community is http://hdl.handle.net/1903/2278 (Library Staff Research Works)
search(query='*:*', scope='14dd3089-86f9-4bac-949f-347e0c637984')

DSpace REST API

Endpoint: https://api.drum.lib.umd.edu/server/api

The endpoint is explorable using the HAL Browser at https://api.drum.lib.umd.edu/server.

#!/usr/bin/env python3

import urllib.request
import json

# Get a list of items from DRUM using the REST API

ENDPOINT = 'https://api.drum.lib.umd.edu/server/api'

items_url = ENDPOINT + '/discover/browses/title/items'

# Get JSON results
with urllib.request.urlopen(items_url) as request:
    response = json.loads(request.read())

    # Iterate over the returned items
    for item in response['_embedded']['items']:
        md = item['metadata']
        if 'dc.identifier.uri' in md:
            link = "; ".join(entry['value'] for entry in md['dc.identifier.uri'])
        else:
            link = "n/a"
        if 'dc.title' in md:
            title = "; ".join(entry['value'] for entry in md['dc.title'])
        else:
            title = "n/a"

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

Additional Example:

Digital Collections

University of Maryland Libraries’ Digital Collections (New Repository)

OAI-PMH

Endpoint: https://api.fcrepo.lib.umd.edu/oai/api

Example:

#!/bin/bash

curl "https://api.fcrepo.lib.umd.edu/oai/api?verb=Identify"

curl "https://api.fcrepo.lib.umd.edu/oai/api?verb=ListSets"

curl "https://api.fcrepo.lib.umd.edu/oai/api?verb=ListMetadataFormats"

Additional Examples:

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:

#!/bin/bash

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

#!/usr/bin/env python3

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 JSON
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']
        title = item['attributes']['title_tesi']['attributes']['value']

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

OAI-PMH

Endpoint: https://api.av.lib.umd.edu/oai/api

Example:

#!/bin/bash

curl "https://api.av.lib.umd.edu/oai/api?verb=Identify"

curl "https://api.av.lib.umd.edu/oai/api?verb=ListSets"

curl "https://api.av.lib.umd.edu/oai/api?verb=ListMetadataFormats"

Additional Examples:

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/?format=rss

JSON Endpoint: https://geo.btaa.org/?format=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:

#!/bin/bash

curl "https://geo.btaa.org/?search_field=all_fields&q=maryland"

curl "https://geo.btaa.org/?search_field=all_fields&q=maryland&format=rss"

curl "https://geo.btaa.org/?search_field=all_fields&q=maryland&format=json"

Example: geoportal-search.py

#!/usr/bin/env python3

import urllib.request
import json

# Search BTAA Geoportal using JSON OpenSearch

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

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

# https://geo.btaa.org/?search_field=all_fields&q=maryland&format=json

search_url = ENDPOINT + '?' + urllib.parse.urlencode(params)
print(search_url)
# 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}')

Internet Archive

Internet Archive is a non-profit library of millions of free books, movies, software, music, websites, and more, which includes a University of Maryland, College Park collection.

Dryad

UMD is a member of the Dryad Data Community, which is a community-owned resource that offers data curation services in addition to large storage capacity for most kinds of datasets in any discipline. A search is available with a limit to the University of Maryland, College Park Institution. You can find more information on the UMD Libraries website.

OpenAPI Specification

The Dryad API is built using the OpenAPI Specification, with both YAML-based and HTML-based documentation available.

Endpoint: https://datadryad.org/api/v2/

Example: code/dryad-api.py

#!/usr/bin/env python3

import urllib.request
import json


# Search Dryad using the Dryad API

ENDPOINT = 'https://datadryad.org/api/v2'

# Search for datasets which have authors affiliated with the
# University of Maryland, College Park
params = {
    "affiliation": "https://ror.org/047s2c258",
}

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

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

    # Iterate over the returned items
    for item in response['_embedded']['stash:datasets']:
        link = item['identifier'].replace('doi:', 'https://doi.org/')
        title = item['title']

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