Difference between revisions of "Data Access"

From Dryad wiki
Jump to: navigation, search
(Thoughts on a future Dryad API)
(Programmatic Data Access)
Line 25: Line 25:
 
Metadata for all Dryad objects is published through the [https://www.datacite.org/ DataCite] system, and available in the [https://www.datacite.org/search.html DataCite search]. This metadata is also available via the [http://scholexplorer.openaire.eu/index.html#/ Scholix] system.
 
Metadata for all Dryad objects is published through the [https://www.datacite.org/ DataCite] system, and available in the [https://www.datacite.org/search.html DataCite search]. This metadata is also available via the [http://scholexplorer.openaire.eu/index.html#/ Scholix] system.
  
=== Sitemaps ===
+
=== OAI-PMH ===
 
 
The [http://datadryad.org/htmlmap 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 [http://datadryad.org/sitemap XML formatted sitemap]. An example snippet of the XML follows:
 
  
=== OAI-PMH ===
+
'''The OAI-PMH API is no longer being updated, but the historical contents are still available from http://v1.datadryad.org/oai'''
  
 
[http://www.openarchives.org/pmh/ OAI-PMH] is a harvesting protocol that may be used to access Dryad's metadata. The [http://www.openarchives.org/OAI/openarchivesprotocol.html specification] is available, as are [http://www.oaforum.org/tutorial/ online tutorials], but we include a couple of examples of its use here for illustrative purposes.
 
[http://www.openarchives.org/pmh/ OAI-PMH] is a harvesting protocol that may be used to access Dryad's metadata. The [http://www.openarchives.org/OAI/openarchivesprotocol.html specification] is available, as are [http://www.oaforum.org/tutorial/ online tutorials], but we include a couple of examples of its use here for illustrative purposes.
 
<blockquote>'''Identify'''
 
<blockquote>'''Identify'''
 
:Used to learn about the service
 
:Used to learn about the service
:*[http://www.datadryad.org/oai/request?verb=Identify http://www.datadryad.org/oai/request?verb=Identify]
+
:*[http://v1.datadryad.org/oai/request?verb=Identify http://v1.datadryad.org/oai/request?verb=Identify]
 
'''ListSets'''
 
'''ListSets'''
 
:Used to learn what sets of metadata are supported. Dryad offers a data package set and a data file set.
 
:Used to learn what sets of metadata are supported. Dryad offers a data package set and a data file set.
:*[http://www.datadryad.org/oai/request?verb=ListSets http://www.datadryad.org/oai/request?verb=ListSets]
+
:*[http://v1.datadryad.org/oai/request?verb=ListSets http://v1.datadryad.org/oai/request?verb=ListSets]
 
'''ListMetadataFormats'''
 
'''ListMetadataFormats'''
 
:Used to learn what metadata formats can be returned by the service. Dryad currently offers [http://www.loc.gov/standards/mets/ METS]/[http://www.loc.gov/standards/mods/ MODS], [http://www.openarchives.org/OAI/openarchivesprotocol.html#dublincore OAI-DC] (Dublin Core), [http://www.openarchives.org/ore/ OAI-ORE]/[http://tools.ietf.org/html/rfc4287 Atom], and [http://www.w3.org/TR/rdf-syntax-grammar/ RDF/DC]. The amount of information mapped into each format varies. For now, we recommend using the OAI-DC metadata format.
 
:Used to learn what metadata formats can be returned by the service. Dryad currently offers [http://www.loc.gov/standards/mets/ METS]/[http://www.loc.gov/standards/mods/ MODS], [http://www.openarchives.org/OAI/openarchivesprotocol.html#dublincore OAI-DC] (Dublin Core), [http://www.openarchives.org/ore/ OAI-ORE]/[http://tools.ietf.org/html/rfc4287 Atom], and [http://www.w3.org/TR/rdf-syntax-grammar/ RDF/DC]. The amount of information mapped into each format varies. For now, we recommend using the OAI-DC metadata format.
:*[http://www.datadryad.org/oai/request?verb=ListMetadataFormats http://www.datadryad.org/oai/request?verb=ListMetadataFormats]
+
:*[http://v1.datadryad.org/oai/request?verb=ListMetadataFormats http://v1.datadryad.org/oai/request?verb=ListMetadataFormats]
 
'''ListIdentifiers'''
 
'''ListIdentifiers'''
 
:Used to list Dryad's OAI identifiers. It requires <code>from</code> and <code>metadataPrefix</code> 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.
 
:Used to list Dryad's OAI identifiers. It requires <code>from</code> and <code>metadataPrefix</code> 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.
:*[http://www.datadryad.org/oai/request?verb=ListIdentifiers&from=2010-01-01&metadataPrefix=oai_dc&set=hdl_10255_3 http://www.datadryad.org/oai/request?verb=ListIdentifiers&amp;from=2010-01-01&amp;metadataPrefix=oai_dc&amp;set=hdl_10255_3]
+
:*[http://v1.datadryad.org/oai/request?verb=ListIdentifiers&from=2010-01-01&metadataPrefix=oai_dc&set=hdl_10255_3 http://v1.datadryad.org/oai/request?verb=ListIdentifiers&amp;from=2010-01-01&amp;metadataPrefix=oai_dc&amp;set=hdl_10255_3]
 
: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
 
: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
 
'''ListRecords'''
 
'''ListRecords'''
 
:Used to list Dryad records. It requires <code>from</code> and <code>metadataPrefix</code> parameters so it knows the range of records to return. The records will be returned in the format associated with the <code>metadataPrefix</code> requested. Available formats can be discovered by using the ListMetadataFormats verb.
 
:Used to list Dryad records. It requires <code>from</code> and <code>metadataPrefix</code> parameters so it knows the range of records to return. The records will be returned in the format associated with the <code>metadataPrefix</code> requested. Available formats can be discovered by using the ListMetadataFormats verb.
:*[http://www.datadryad.org/oai/request?verb=ListRecords&from=2010-01-01&metadataPrefix=oai_dc&set=hdl_10255_3 http://www.datadryad.org/oai/request?verb=ListRecords&amp;from=2010-01-01&amp;metadataPrefix=oai_dc&amp;set=hdl_10255_3]
+
:*[http://v1.datadryad.org/oai/request?verb=ListRecords&from=2010-01-01&metadataPrefix=oai_dc&set=hdl_10255_3 http://v1.datadryad.org/oai/request?verb=ListRecords&amp;from=2010-01-01&amp;metadataPrefix=oai_dc&amp;set=hdl_10255_3]
 
: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
 
: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
 
'''GetRecord'''
 
'''GetRecord'''
 
:Used to return a single record. It requires the OAI identifier of the record (the <code>identifier</code> parameter) and the format in which the record should be returned (the <code>metadataPrefix</code> parameter).
 
:Used to return a single record. It requires the OAI identifier of the record (the <code>identifier</code> parameter) and the format in which the record should be returned (the <code>metadataPrefix</code> parameter).
:*[http://www.datadryad.org/oai/request?verb=GetRecord&identifier=oai:datadryad.org:10255/dryad.12&metadataPrefix=oai_dc http://www.datadryad.org/oai/request?verb=GetRecord&amp;identifier=oai:datadryad.org:10255/dryad.12&amp;metadataPrefix=oai_dc]
+
:*[http://v1.datadryad.org/oai/request?verb=GetRecord&identifier=oai:datadryad.org:10255/dryad.12&metadataPrefix=oai_dc http://v1.datadryad.org/oai/request?verb=GetRecord&amp;identifier=oai:datadryad.org:10255/dryad.12&amp;metadataPrefix=oai_dc]
 
</blockquote>
 
</blockquote>
 
==== Using resumptionTokens with OAI-PMH ====
 
==== Using resumptionTokens with OAI-PMH ====
Line 59: Line 57:
 
For example, for a call like:
 
For example, for a call like:
  
[http://www.datadryad.org/oai/request?verb=ListRecords&from=2010-01-01&metadataPrefix=oai_dc&set=hdl_10255_3 http://www.datadryad.org/oai/request?verb=ListRecords&amp;from=2010-01-01&amp;metadataPrefix=oai_dc&amp;set=hdl_10255_3]
+
[http://v1.datadryad.org/oai/request?verb=ListRecords&from=2010-01-01&metadataPrefix=oai_dc&set=hdl_10255_3 http://v1.datadryad.org/oai/request?verb=ListRecords&amp;from=2010-01-01&amp;metadataPrefix=oai_dc&amp;set=hdl_10255_3]
  
 
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 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
Line 65: Line 63:
 
You can then retrieve the next 100 records with:
 
You can then retrieve the next 100 records with:
  
[http://www.datadryad.org/oai/request?verb=ListRecords&resumptionToken=2010-01-01T00:00:00Z/9999-12-31T23:59:59Z/hdl_10255_3/oai_dc/100 http://www.datadryad.org/oai/request?verb=ListRecords&amp;resumptionToken=2010-01-01T00:00:00Z/9999-12-31T23:59:59Z/hdl_10255_3/oai_dc/100]
+
[http://v1.datadryad.org/oai/request?verb=ListRecords&resumptionToken=2010-01-01T00:00:00Z/9999-12-31T23:59:59Z/hdl_10255_3/oai_dc/100 http://v1.datadryad.org/oai/request?verb=ListRecords&amp;resumptionToken=2010-01-01T00:00:00Z/9999-12-31T23:59:59Z/hdl_10255_3/oai_dc/100]
  
 
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.
 
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.
  
 
=== DataONE API ===
 
=== DataONE API ===
 +
 +
'''The DataONE API currently not being updated, but we expect to update it again in the future. The historical contents are still available from http://v1.datadryad.org/mn'''
  
 
As part of Dryad's participation in the [http://dataone.org DataONE] project, Dryad makes content available through a specialized API.
 
As part of Dryad's participation in the [http://dataone.org DataONE] project, Dryad makes content available through a specialized API.
  
*[http://www.datadryad.org/mn/object List of objects]
+
*[http://v1.datadryad.org/mn/object List of objects]
*[https://datadryad.org/mn/object/doi:10.5061/dryad.1850/1 Sample metadata call]
+
*[https://v1.datadryad.org/mn/object/doi:10.5061/dryad.1850/1 Sample metadata call]
*[https://datadryad.org/mn/object/doi:10.5061/dryad.1850/1/bitstream Sample file download] -- URLs of this format can be used to download Dryad data directly from an external site, without forcing users to go through the Dryad interface.
+
*[https://v1.datadryad.org/mn/object/doi:10.5061/dryad.1850/1/bitstream Sample file download] -- URLs of this format can be used to download Dryad data directly from an external site, without forcing users to go through the Dryad interface.
 
*[[DataONE RESTful API|Technical documentation for the DataONE API]]
 
*[[DataONE RESTful API|Technical documentation for the DataONE API]]
  
 
==== Programmatic access to data files using the DataONE API ====
 
==== Programmatic access to data files using the DataONE API ====
  
#Obtain the DataONE ID of a Dryad object using the DataONE listObjects call: [http://www.datadryad.org/mn/object http://www.datadryad.org/mn/object] (e.g., dryad.1850/1)
+
#Obtain the DataONE ID of a Dryad object using the DataONE listObjects call: [http://v1.datadryad.org/mn/object http://v1.datadryad.org/mn/object] (e.g., dryad.1850/1)
#Retrieve the file: [http://www.datadryad.org/mn/object/doi:10.5061/dryad.1850/1/bitstream http://www.datadryad.org/mn/object/doi:10.5061/dryad.1850/1/bitstream]
+
#Retrieve the file: [http://v1.datadryad.org/mn/object/doi:10.5061/dryad.1850/1/bitstream http://v1.datadryad.org/mn/object/doi:10.5061/dryad.1850/1/bitstream]
#Retrieve system metadata about a file, including size and MIME type: [http://www.datadryad.org/mn/meta/doi:10.5061/dryad.1850/1/bitstream http://www.datadryad.org/mn/meta/doi:10.5061/dryad.1850/1/bitstream]
+
#Retrieve system metadata about a file, including size and MIME type: [http://v1.datadryad.org/mn/meta/doi:10.5061/dryad.1850/1/bitstream http://v1.datadryad.org/mn/meta/doi:10.5061/dryad.1850/1/bitstream]
#Retrieve descriptive metadata about a file: [http://www.datadryad.org/mn/object/doi:10.5061/dryad.1850/1 http://www.datadryad.org/mn/object/doi:10.5061/dryad.1850/1]
+
#Retrieve descriptive metadata about a file: [http://v1.datadryad.org/mn/object/doi:10.5061/dryad.1850/1 http://v1.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 <tt>&lt;mets:FLocat/&gt;</tt> element in the <tt>xlink:href</tt> attribute.
 
If you desire the full filename before downloading, obtain the METS document as described above. The filename is in the <tt>&lt;mets:FLocat/&gt;</tt> element in the <tt>xlink:href</tt> attribute.
Line 119: Line 119:
 
</blockquote>
 
</blockquote>
 
=== RSS Feeds ===
 
=== RSS Feeds ===
 +
 +
'''The RSS feed is no longer being updated, but the historical contents are still available from http://v1.datadryad.org/feed'''
  
 
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.
 
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.
 
<blockquote>'''Everything -- data packages, data files, and metadata harvested from partner repositories'''
 
<blockquote>'''Everything -- data packages, data files, and metadata harvested from partner repositories'''
*[http://datadryad.org/feed/rss_2.0/site http://datadryad.org/feed/rss_2.0/site]
+
*[http://v1.datadryad.org/feed/rss_2.0/site http://v1.datadryad.org/feed/rss_2.0/site]
 
'''Data packages only'''
 
'''Data packages only'''
*[http://datadryad.org/feed/rss_2.0/10255/3 http://datadryad.org/feed/rss_2.0/10255/3]
+
*[http://v1.datadryad.org/feed/rss_2.0/10255/3 http://v1.datadryad.org/feed/rss_2.0/10255/3]
 
'''Data files only'''
 
'''Data files only'''
*[http://datadryad.org/feed/rss_2.0/10255/2 http://datadryad.org/feed/rss_2.0/10255/2]
+
*[http://v1.datadryad.org/feed/rss_2.0/10255/2 http://v1.datadryad.org/feed/rss_2.0/10255/2]
 
</blockquote>
 
</blockquote>
 
=== Twitter Feed ===
 
=== Twitter Feed ===
 
'''Data packages'''
 
 
*[http://twitter.com/datadryadnew http://twitter.com/datadryadnew]
 
  
 
'''Primary tweets from Dryad (typically not data)'''
 
'''Primary tweets from Dryad (typically not data)'''

Revision as of 06:11, 10 September 2019

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.

DataCite

Metadata for all Dryad objects is published through the DataCite system, and available in the DataCite search. This metadata is also available via the Scholix system.

OAI-PMH

The OAI-PMH API is no longer being updated, but the historical contents are still available from http://v1.datadryad.org/oai

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.

Identify
Used to learn about the service

ListSets

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

ListMetadataFormats

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.

ListIdentifiers

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

ListRecords

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

GetRecord

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:

http://v1.datadryad.org/oai/request?verb=ListRecords&from=2010-01-01&metadataPrefix=oai_dc&set=hdl_10255_3

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:

http://v1.datadryad.org/oai/request?verb=ListRecords&resumptionToken=2010-01-01T00:00:00Z/9999-12-31T23:59:59Z/hdl_10255_3/oai_dc/100

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.

DataONE API

The DataONE API currently not being updated, but we expect to update it again in the future. The historical contents are still available from http://v1.datadryad.org/mn

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://v1.datadryad.org/mn/object (e.g., dryad.1850/1)
  2. Retrieve the file: http://v1.datadryad.org/mn/object/doi:10.5061/dryad.1850/1/bitstream
  3. Retrieve system metadata about a file, including size and MIME type: http://v1.datadryad.org/mn/meta/doi:10.5061/dryad.1850/1/bitstream
  4. Retrieve descriptive metadata about a file: http://v1.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:

http://datadryad.org/api/v1/journals

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

http://datadryad.org/api/v1/journals/{issn}/packages

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

The RSS feed is no longer being updated, but the historical contents are still available from http://v1.datadryad.org/feed

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

Primary tweets from Dryad (typically not data)

SOLR search access

Dryad content can be searched using a SOLR interface.

http://datadryad.org/solr/search/select/?q=location:l2&facet=true&facet.field=dc.subject_filter&facet.minCount=1&facet.limit=5000&fl=nothing

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

http://datadryad.org/solr/search/select/?q=dc.date.available_dt:%5BNOW-90DAY/DAY%20TO%20NOW%5D&fl=dc.relation.isreferencedby&rows=1000000

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

http://datadryad.org/solr/search/select/?q=location:l2+dc.date.available_dt:%5B2011-01-01T00:00:00Z%20TO%202011-01-31T23:59:59Z%5D&fl=dc.identifier&rows=1000000&wt=json

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.

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.