Difference between revisions of "Old:Dryad API"

From Dryad wiki
Jump to: navigation, search
(SOLR search access)
m (Removed "dx" from DOIs)
Line 104: Line 104:
Dryad uses DOIs ([http://en.wikipedia.org/wiki/Digital_object_identifier Digital Object Identifiers]) to identify Dryad data packages and files. A few simple examples follow.
Dryad uses DOIs ([http://en.wikipedia.org/wiki/Digital_object_identifier Digital Object Identifiers]) to identify Dryad data packages and files. A few simple examples follow.
<blockquote>'''Data packages'''
<blockquote>'''Data packages'''
*[http://dx.doi.org/10.5061/dryad.642 http://dx.doi.org/10.5061/dryad.1664]
*[http://doi.org/10.5061/dryad.642 http://doi.org/10.5061/dryad.1664]
*[http://dx.doi.org/10.5061/dryad.642 http://dx.doi.org/10.5061/dryad.642]
*[http://doi.org/10.5061/dryad.642 http://doi.org/10.5061/dryad.642]
*[http://dx.doi.org/10.5061/dryad.1307 http://dx.doi.org/10.5061/dryad.1307]
*[http://doi.org/10.5061/dryad.1307 http://doi.org/10.5061/dryad.1307]
'''Data files'''
'''Data files'''
*[http://dx.doi.org/10.5061/dryad.1664/1 http://dx.doi.org/10.5061/dryad.1664/1]
*[http://doi.org/10.5061/dryad.1664/1 http://doi.org/10.5061/dryad.1664/1]
*[http://dx.doi.org/10.5061/dryad.642/1 http://dx.doi.org/10.5061/dryad.642/1]
*[http://doi.org/10.5061/dryad.642/1 http://doi.org/10.5061/dryad.642/1]
*[http://dx.doi.org/10.5061/dryad.1307/1 http://dx.doi.org/10.5061/dryad.1307/1]
*[http://doi.org/10.5061/dryad.1307/1 http://doi.org/10.5061/dryad.1307/1]
*[http://dx.doi.org/10.5061/dryad.1307/2 http://dx.doi.org/10.5061/dryad.1307/2]
*[http://doi.org/10.5061/dryad.1307/2 http://doi.org/10.5061/dryad.1307/2]
*[http://dx.doi.org/10.5061/dryad.1307/3 http://dx.doi.org/10.5061/dryad.1307/3]
*[http://doi.org/10.5061/dryad.1307/3 http://doi.org/10.5061/dryad.1307/3]
=== RSS Feeds ===
=== RSS Feeds ===

Revision as of 07:36, 20 November 2017

Web Browser User Interface

Primary access to Dryad is through its web interface, where users most commonly search on authors, titles, subjects and other metadata elements. Data files archived by Dryad may be downloaded one-by-one from their Dryad data package Web pages.

Additionally, DSpace, the platform on which Dryad is built, supports several "hidden" ways to hack the system's URLs to get useful metadata from the Web interface.

Finding a data package page using the article DOI or PMID:

Viewing full metadata: add "?show=full" to the end of the URL

Viewing the raw DSpace representation of a page add "DRI" to the URL

Another way to view the raw DSpace markup is to add "?XML" to the end of the URL. This is less useful than the above method, though, because the page's content won't contain the externalized i18n strings.

Viewing metadata in machine-readable (METS) format. Can be performed using a DOI or a (legacy) handle:

Programmatic Data Access

In addition to the web interface, Dryad can be accessed programmatically through several APIs.


The Dryad HTML sitemap provides access to the links to all Dryad's data package and file pages, with the timestamp of their last update. There is also an XML formatted sitemap. An example snippet of the XML follows:


OAI-PMH is a harvesting protocol that may be used to access Dryad's metadata. The specification is available, as are online tutorials, but we include a couple of examples of its use here for illustrative purposes.

Used to learn about the service


Used to learn what sets of metadata are supported. Dryad offers a data package set and a data file set.


Used to learn what metadata formats can be returned by the service. Dryad currently offers METS/MODS, OAI-DC (Dublin Core), OAI-ORE/Atom, and RDF/DC. The amount of information mapped into each format varies. For now, we recommend using the OAI-DC metadata format.


Used to list Dryad's OAI identifiers. It requires from and metadataPrefix parameters to know what range of identifiers to return and what format the metadata should be in (from the options returned by the ListMetadataFormats verb). We may modify this to return DOIs in the future.
NOTE: It is highly recommended that you use this call in conjunction with the "set" parameter, so you retrieve the records of interest. Otherwise, you may retrieve records that Dryad has harvested from other providers


Used to list Dryad records. It requires from and metadataPrefix parameters so it knows the range of records to return. The records will be returned in the format associated with the metadataPrefix requested. Available formats can be discovered by using the ListMetadataFormats verb.
NOTE: It is highly recommended that you use this call in conjunction with the "set" parameter, so you retrieve the records of interest. Otherwise, you may retrieve records that Dryad has harvested from other providers


Used to return a single record. It requires the OAI identifier of the record (the identifier parameter) and the format in which the record should be returned (the metadataPrefix parameter).

Using resumptionTokens with OAI-PMH

OAI-PMH requests may result in partial results lists being returned. In these cases, the results list will contain a resumptionToken that can be used to retrieve the next page of results.

For example, for a call like:


You will receive the first 100 records, ending with a resumptionToken of 2010-01-01T00:00:00Z/9999-12-31T23:59:59Z/hdl_10255_3/oai_dc/100

You can then retrieve the next 100 records with:


Note that when using a resumptionToken, OAI expects you to only repeat the verb, not any of the other parameters that were part of the original request.


As part of Dryad's participation in the DataONE project, Dryad makes content available through a specialized API.

Programmatic access to data files using the DataONE API

  1. Obtain the DataONE ID of a Dryad object using the DataONE listObjects call: http://www.datadryad.org/mn/object (e.g., dryad.1850/1)
  2. Retrieve the file: http://www.datadryad.org/mn/object/doi:10.5061/dryad.1850/1/bitstream
  3. Retrieve system metadata about a file, including size and MIME type: http://www.datadryad.org/mn/meta/doi:10.5061/dryad.1850/1/bitstream
  4. Retrieve descriptive metadata about a file: http://www.datadryad.org/mn/object/doi:10.5061/dryad.1850/1

If you desire the full filename before downloading, obtain the METS document as described above. The filename is in the <mets:FLocat/> element in the xlink:href attribute.

Accessing Data Packages via Journal ISSN

Journals and their ISSNs can be accessed through a GET command:


The corresponding ISSN can be used to get a list of packages in Dryad for that journal using the following GET command:


If multiple pages of results are returned, the next and previous page links can be accessed from the link headers with `rel=next` and `rel=prev`.

There are additional query parameters that can be used to modify the results returned.

  • `count` specifies the number of results per page.
  • `date_from` and `date_to` can filter results to packages released in a date range.
  • `cursor` can be used to specify the key used to start the results page.

Links to Data Packages/Files

Dryad uses DOIs (Digital Object Identifiers) to identify Dryad data packages and files. A few simple examples follow.

Data packages

Data files

RSS Feeds

There are a couple of feed options. Feeds are used by some browsers and all feed and news readers. They may also be used for programmatic access.

Everything -- data packages, data files, and metadata harvested from partner repositories

Data packages only

Data files only

Twitter Feed

Data packages

Primary tweets from Dryad (typically not data)

SOLR search access

Dryad content can be searched using a SOLR interface.


  • Article DOIs associated with all data published in Dryad over the past 90 days:


  • Data DOIs published in Dryad during January 2011, with results returned in JSON format:


For more about using SOLR, see the Apache SOLR documentation.

Widget API

The Widget API will become part of the "New" Dryad API (see below), but components are coming online. The Widget API provides simple images or dynamic iframes that link to content in Dryad and can be embedded into third-party sites.

Dryad API 2 -- In development

We are in the process of designing a new API that will be easier to work with. It should be consistent, and subsume all of the other access mechanisms described above.

WARNING: The API described in this section does not currently exist. It is documented here to enable broader discussion.

Use cases that must be met:

  • start with data package DOI, retrieve the contents
  • start with article DOI or PMID, retrieve data package DOI
  • (search) given author name, retrieve list of matching package DOIs
  • (search) given article title, retrieve list of matching package DOIs
  • (search) given a set of fields that are typically unique -- e.g., author name, article title, year -- retrieve the single matching package DOI
  • (search) given a journal name or publisher name, retrieve a list of matching package DOIs -- case insensitive!
  • machine metadata access: start with package/file DOI, get relevant metadata field (including file sizes and access statistics)
  • harvest: Get all article DOIs. Get all data package DOIs.
  • retrieve content in Dryad-native XML format or JSON format

Proposed retrieval API:

  • http://datadryad.org/api/object/
    • Retrieves a list of data packages and data files available
    • Each item in the list will contain a DOI, file type, file size, checksum, and modification date
    • This is the same as for the DataONE protocol
  • http://datadryad.org/api/object/identifier
    • Retrieves a data package or data file, given its identifier
    • If the identifier is a DOI, a metadata record will be returned
    • If the identifier is a DOI with "/bitstream" appended, a data file (bitstream) will be returned
    • This is the same as for the DataONE protocol
  • http://datadryad.org/api/object/identifier/fieldname
    • Retrieves the contents of a given metadata field
  • http://datadryad.org/api/articlePackage/article-identifier
    • Retrieves a data package associated with a given article
    • although this could technically be combined with the /object, we want to preserve the meaning of /object as querying objects in Dryad. Articles are not in Dryad.
  • http://datadryad.org/api/meta/identifier
    • Retrieves system-level metadata (internal storage information -- not descriptive metadata) for the given object
    • This is the same as for the DataONE protocol
  • http://datadryad.org/api/stats/identifier
    • Retrieve usage statistics about a given item.

Proposed search API:

Open questions:

  1. Should requests for different formats (e.g., XML, JSON) be via a modifier in the base URL, or as a parameter? How is this handled by the the underlying system?

Other access mechanisms

If you know of other community-developed services that can search or retrieve content that are not listed here, please alert us at help@datadryad.org

Suggest Alternatives

We're interested in hearing what other forms of access people would like. If you have a suggestion for making Dryad's content more accessible, please let us know at help@datadryad.org.