6
|
1
|
|
2
|
|
3 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
4 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
5
|
|
6
|
|
7 <html xmlns="http://www.w3.org/1999/xhtml">
|
|
8 <head>
|
|
9 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
10
|
|
11 <title>APIs Guide — The Harvard Dataverse Network 3.6.1 documentation</title>
|
|
12
|
|
13 <link rel="stylesheet" href="_static/agogo.css" type="text/css" />
|
|
14 <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
|
|
15
|
|
16 <script type="text/javascript">
|
|
17 var DOCUMENTATION_OPTIONS = {
|
|
18 URL_ROOT: './',
|
|
19 VERSION: '3.6.1',
|
|
20 COLLAPSE_INDEX: false,
|
|
21 FILE_SUFFIX: '.html',
|
|
22 HAS_SOURCE: true
|
|
23 };
|
|
24 </script>
|
|
25 <script type="text/javascript" src="_static/jquery.js"></script>
|
|
26 <script type="text/javascript" src="_static/underscore.js"></script>
|
|
27 <script type="text/javascript" src="_static/doctools.js"></script>
|
|
28 <script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
|
|
29 <link rel="top" title="The Harvard Dataverse Network 3.6.1 documentation" href="index.html" />
|
|
30 <link rel="prev" title="DVN Developers Guide" href="dataverse-developer-main.html" />
|
|
31 </head>
|
|
32 <body>
|
|
33 <div class="header-wrapper">
|
|
34 <div class="header">
|
|
35 <div class="headertitle"><a
|
|
36 href="index.html">The Harvard Dataverse Network 3.6.1 documentation</a></div>
|
|
37 <div class="rel">
|
|
38 <a href="dataverse-developer-main.html" title="DVN Developers Guide"
|
|
39 accesskey="P">previous</a> |
|
|
40 <a href="genindex.html" title="General Index"
|
|
41 accesskey="I">index</a>
|
|
42 </div>
|
|
43 </div>
|
|
44 </div>
|
|
45
|
|
46 <div class="content-wrapper">
|
|
47 <div class="content">
|
|
48 <div class="document">
|
|
49
|
|
50 <div class="documentwrapper">
|
|
51 <div class="bodywrapper">
|
|
52 <div class="body">
|
|
53
|
|
54 <div class="section" id="apis-guide">
|
|
55 <h1>APIs Guide<a class="headerlink" href="#apis-guide" title="Permalink to this headline">¶</a></h1>
|
|
56 <p id="api"><strong>Introduction</strong></p>
|
|
57 <p>We strongly encourage anyone interested in building tools to
|
|
58 interoperate with the Dataverse Network to utilize our open source
|
|
59 APIs. Please visit our <a class="reference external" href="http://thedata.org/book/apps">website</a> for
|
|
60 examples of external apps that have been built to work with our APIs.</p>
|
|
61 <div class="section" id="data-sharing-api">
|
|
62 <span id="id1"></span><h2>Data Sharing API<a class="headerlink" href="#data-sharing-api" title="Permalink to this headline">¶</a></h2>
|
|
63 <p>As of version 3.0, a new API for programmatic access to the DVN data and
|
|
64 metadata has been added. The API allows a remote, non-DVN
|
|
65 archive/application to search the holdings and download files from a
|
|
66 Dataverse Network.</p>
|
|
67 <p>The Data Sharing API documentation is available below:</p>
|
|
68 <div class="section" id="api-urls">
|
|
69 <h3>API URLs<a class="headerlink" href="#api-urls" title="Permalink to this headline">¶</a></h3>
|
|
70 <p>The URLs for the Data Sharing API resources are of the form:</p>
|
|
71 <p><tt class="docutils literal"><span class="pre">/dvn/api/{/arg}{?{{arg}&...}}</span></tt></p>
|
|
72 <p>Generally, mandatory arguments are embedded in the URL and optional
|
|
73 arguments are supplied as query parameters, in the <tt class="docutils literal"><span class="pre">?param=...</span></tt> notation.
|
|
74 See the documentation for the individual resources below for details.</p>
|
|
75 <p>The API supports basic HTTP Authentication. So that the access
|
|
76 credentials are not transmitted in the clear, the API verbs (methods)
|
|
77 below are <strong>only accessible over HTTPS</strong>.</p>
|
|
78 </div>
|
|
79 <div class="section" id="metadata-api">
|
|
80 <h3>Metadata API<a class="headerlink" href="#metadata-api" title="Permalink to this headline">¶</a></h3>
|
|
81 <p>The API for accessing Dataverse Network metadata is implemented in 4 verbs
|
|
82 (resources):</p>
|
|
83 <div class="line-block">
|
|
84 <div class="line"><tt class="docutils literal"><span class="pre">metadataSearchFields</span></tt></div>
|
|
85 <div class="line"><tt class="docutils literal"><span class="pre">metadataSearch</span></tt></div>
|
|
86 <div class="line"><tt class="docutils literal"><span class="pre">metadataFormatsAvailable</span></tt></div>
|
|
87 <div class="line"><tt class="docutils literal"><span class="pre">metadata</span></tt></div>
|
|
88 </div>
|
|
89 <div class="section" id="metadatasearchfields">
|
|
90 <h4>metadataSearchFields<a class="headerlink" href="#metadatasearchfields" title="Permalink to this headline">¶</a></h4>
|
|
91 <p><strong>Arguments:</strong></p>
|
|
92 <p><tt class="docutils literal"><span class="pre">none</span></tt></p>
|
|
93 <p><strong>URL example:</strong></p>
|
|
94 <p><tt class="docutils literal"><span class="pre">/dvn/api/metadataSearchFields/</span></tt></p>
|
|
95 <p><strong>Output:</strong></p>
|
|
96 <p>XML record in the format below:</p>
|
|
97 <div class="highlight-guess"><div class="highlight"><pre><span class="nt"><MetadataSearchFields></span>
|
|
98 <span class="nt"><SearchableField></span>
|
|
99 <span class="nt"><fieldName></span>title<span class="nt"></fieldName></span>
|
|
100 <span class="nt"><fieldDescription></span>title<span class="nt"></fieldDescription></span>
|
|
101 <span class="nt"></SearchableField></span>
|
|
102 <span class="nt"><SearchableField></span>
|
|
103 <span class="nt"><fieldName></span>authorName<span class="nt"></fieldName></span>
|
|
104 <span class="nt"><fieldDescription></span>authorName<span class="nt"></fieldDescription></span>
|
|
105 <span class="nt"></SearchableField></span>
|
|
106 <span class="nt"><SearchableField></span>
|
|
107 <span class="nt"><fieldName></span>otherId<span class="nt"></fieldName></span>
|
|
108 <span class="nt"><fieldDescription></span>otherId<span class="nt"></fieldDescription></span>
|
|
109 <span class="nt"></SearchableField></span>
|
|
110 ...
|
|
111 <span class="nt"></MetadataSearchableFields></span>
|
|
112 </pre></div>
|
|
113 </div>
|
|
114 </div>
|
|
115 <div class="section" id="metadatasearch">
|
|
116 <h4>metadataSearch<a class="headerlink" href="#metadatasearch" title="Permalink to this headline">¶</a></h4>
|
|
117 <p><strong>Arguments:</strong></p>
|
|
118 <div class="line-block">
|
|
119 <div class="line"><tt class="docutils literal"><span class="pre">queryString:</span> <span class="pre">mandatory,</span> <span class="pre">embedded.</span></tt></div>
|
|
120 <div class="line"><em>Standard Lucene-style search queries are supported; (same query format currently used to define OAI sets, etc.)</em></div>
|
|
121 </div>
|
|
122 <p><strong>URLs examples:</strong></p>
|
|
123 <div class="line-block">
|
|
124 <div class="line"><tt class="docutils literal"><span class="pre">/dvn/api/metadataSearch/title:test</span></tt></div>
|
|
125 <div class="line"><tt class="docutils literal"><span class="pre">/dvn/api/metadataSearch/title:test</span> <span class="pre">AND</span> <span class="pre">authorName:leonid</span></tt></div>
|
|
126 </div>
|
|
127 <p><strong>Output:</strong></p>
|
|
128 <p>XML record in the format below:</p>
|
|
129 <div class="highlight-guess"><div class="highlight"><pre><span class="nt"><MetadataSearchResults></span>
|
|
130 <span class="nt"><searchQuery></span>title:test<span class="nt"></searchQuery></span>
|
|
131 <span class="nt"><searchHits></span>
|
|
132 <span class="nt"><study</span> <span class="na">ID=</span><span class="s">"hdl:TEST/10007"</span><span class="nt">/></span>
|
|
133 ...
|
|
134 <span class="nt"></searchHits></span>
|
|
135 <span class="nt"></MetadataSearchResults></span>
|
|
136 </pre></div>
|
|
137 </div>
|
|
138 <p><strong>Error Conditions:</strong></p>
|
|
139 <p>Note that when the query does not produce any results, the resource returns an XML record
|
|
140 with an empty <tt class="docutils literal"><span class="pre"><searchHits></span></tt> list, NOT a 404.</p>
|
|
141 </div>
|
|
142 <div class="section" id="metadataformatsavailable">
|
|
143 <h4>metadataFormatsAvailable<a class="headerlink" href="#metadataformatsavailable" title="Permalink to this headline">¶</a></h4>
|
|
144 <p><strong>Arguments:</strong></p>
|
|
145 <div class="line-block">
|
|
146 <div class="line"><tt class="docutils literal"><span class="pre">objectId:</span> <span class="pre">mandatory,</span> <span class="pre">embedded.</span></tt></div>
|
|
147 <div class="line"><em>Both global and local (database) IDs are supported.</em></div>
|
|
148 </div>
|
|
149 <p><strong>URLs examples:</strong></p>
|
|
150 <div class="line-block">
|
|
151 <div class="line"><tt class="docutils literal"><span class="pre">/dvn/api/metadataFormatsAvailable/hdl:1902.1/6635</span></tt></div>
|
|
152 <div class="line"><tt class="docutils literal"><span class="pre">/dvn/api/metadataFormatsAvailable/9956</span></tt></div>
|
|
153 </div>
|
|
154 <p><strong>Output:</strong></p>
|
|
155 <p>XML record in the format below:</p>
|
|
156 <div class="highlight-guess"><div class="highlight"><pre><span class="nt"><MetadataFormatsAvailable</span> <span class="na">studyId=</span><span class="s">"hdl:TEST/10007"</span><span class="nt">></span>
|
|
157 <span class="nt"><formatAvailable</span> <span class="na">selectSupported=</span><span class="s">"true"</span> <span class="na">excludeSupported=</span><span class="s">"true"</span><span class="nt">></span>
|
|
158 <span class="nt"><formatName></span>ddi<span class="nt"></formatName></span>
|
|
159 <span class="nt"><formatSchema></span>http://www.icpsr.umich.edu/DDI/Version2-0.xsd<span class="nt"></formatSchema></span>
|
|
160 <span class="nt"><formatMime></span>application/xml<span class="nt"></formatMime></span>
|
|
161 <span class="nt"></formatAvailable></span>
|
|
162 <span class="nt"><formatAvailable></span>
|
|
163 <span class="nt"><formatName></span>oai_dc<span class="nt"></formatName></span>
|
|
164 <span class="nt"><formatSchema></span>http://www.openarchives.org/OAI/2.0/oai_dc.xsd<span class="nt"></formatSchema></span>
|
|
165 <span class="nt"><formatMime></span>application/xml<span class="nt"></formatMime></span>
|
|
166 <span class="nt"></formatAvailable></span>
|
|
167 <span class="nt"></MetadataFormatsAvailable></span>
|
|
168 </pre></div>
|
|
169 </div>
|
|
170 <p>(<strong>Note</strong> the <tt class="docutils literal"><span class="pre">selectSupported</span></tt> and <tt class="docutils literal"><span class="pre">excludeSupported</span></tt> attributes above!)</p>
|
|
171 <p><strong>Error Conditions:</strong></p>
|
|
172 <p><tt class="docutils literal"><span class="pre">404</span> <span class="pre">NOT</span> <span class="pre">FOUND</span></tt> if study does not exist</p>
|
|
173 </div>
|
|
174 <div class="section" id="metadata">
|
|
175 <h4>metadata<a class="headerlink" href="#metadata" title="Permalink to this headline">¶</a></h4>
|
|
176 <p><strong>Arguments:</strong></p>
|
|
177 <div class="line-block">
|
|
178 <div class="line"><tt class="docutils literal"><span class="pre">objectId:</span> <span class="pre">mandatory,</span> <span class="pre">embedded.</span></tt></div>
|
|
179 <div class="line"><em>Both global and local (database) IDs are supported.</em></div>
|
|
180 </div>
|
|
181 <div class="line-block">
|
|
182 <div class="line"><tt class="docutils literal"><span class="pre">formatType:</span> <span class="pre">optional,</span> <span class="pre">query.</span></tt></div>
|
|
183 <div class="line"><em>Defaults to DDI if not supplied.</em></div>
|
|
184 </div>
|
|
185 <p><strong>URLs examples:</strong></p>
|
|
186 <div class="line-block">
|
|
187 <div class="line"><tt class="docutils literal"><span class="pre">/dvn/api/metadata/hdl:1902.1/6635</span> <span class="pre">/dvn/api/metadata/9956</span></tt></div>
|
|
188 <div class="line"><tt class="docutils literal"><span class="pre">/dvn/api/metadata/hdl:1902.1/6635?formatType=ddi</span></tt></div>
|
|
189 </div>
|
|
190 <p><strong>Output:</strong></p>
|
|
191 <p>Metadata record in the format requested, if available. No extra
|
|
192 headers, etc.</p>
|
|
193 <p><strong>Partial selection of metadata sections:</strong></p>
|
|
194 <p>When requesting partial records is supported (see
|
|
195 <tt class="docutils literal"><span class="pre">metadataFormatsAvailable</span></tt>, above for more info), these additional parameters can be supplied:</p>
|
|
196 <div class="line-block">
|
|
197 <div class="line"><tt class="docutils literal"><span class="pre">partialExclude:</span> <span class="pre">optional,</span> <span class="pre">query.</span></tt></div>
|
|
198 <div class="line"><em>Xpath query representing metadata section to drop, where supported.</em></div>
|
|
199 </div>
|
|
200 <div class="line-block">
|
|
201 <div class="line"><tt class="docutils literal"><span class="pre">partialInclude:</span> <span class="pre">optional,</span> <span class="pre">query.</span></tt></div>
|
|
202 <div class="line"><em>Xpath query representing metadata section to include, where supported.</em></div>
|
|
203 </div>
|
|
204 <p><strong>Examples:</strong></p>
|
|
205 <div class="line-block">
|
|
206 <div class="line"><tt class="docutils literal"><span class="pre">/dvn/api/metadata/hdl:1902.1/6635?formatType=ddi&partialExclude=codeBook/dataDscr</span></tt></div>
|
|
207 <div class="line">will produce a DDI without the dataDscr section.</div>
|
|
208 <div class="line"><em>[I’m expecting this to be the single most useful and common real-life application of thisfeature - L.A.]</em></div>
|
|
209 </div>
|
|
210 <div class="line-block">
|
|
211 <div class="line"><tt class="docutils literal"><span class="pre">/dvn/api/metadata/hdl:1902.1/6635?formatType=ddi&partialInclude=codeBook/stdyDscr</span></tt></div>
|
|
212 <div class="line">will produce a DDI with the stdyDscr section only.</div>
|
|
213 </div>
|
|
214 <p>(<strong>Note</strong>: for now, only simple top-level Xpath queries like the above are supported).</p>
|
|
215 <p>One other limitation of the current implementation: it does not validate the supplied <tt class="docutils literal"><span class="pre">partialExclude</span></tt> and <tt class="docutils literal"><span class="pre">partialInclude</span></tt> arguments; no error messages/diagnostics will be given if the Xpath queries are not part of the metadata schema. For example, if you request partialInclude=foobar, it will quietly produce an empty DDI, and <tt class="docutils literal"><span class="pre">partialExclude=foobar</span></tt> will not exclude anything (and you will get a complete DDI).</p>
|
|
216 <p><strong>Error Conditions:</strong></p>
|
|
217 <div class="line-block">
|
|
218 <div class="line"><tt class="docutils literal"><span class="pre">404</span> <span class="pre">NOT</span> <span class="pre">FOUND</span></tt></div>
|
|
219 <div class="line">if study does not exist</div>
|
|
220 </div>
|
|
221 <div class="line-block">
|
|
222 <div class="line"><tt class="docutils literal"><span class="pre">503</span> <span class="pre">SERVICE</span> <span class="pre">UNAVAILABLE</span></tt></div>
|
|
223 <div class="line">if study exists, but the format requested is not available;</div>
|
|
224 <div class="line">also, when partial exclude or include is requested, if it’s not supported by the service (see the documenation for metadataFormatsAvailable above).</div>
|
|
225 </div>
|
|
226 <p><strong>Notes:</strong></p>
|
|
227 <p>A real-life workflow scenario may go as follows:</p>
|
|
228 <ol class="loweralpha simple">
|
|
229 <li>Find the searchable index fields on this DVN (meatadataSearchFields)</li>
|
|
230 <li>Run a search (metadataSearch)</li>
|
|
231 <li>For [select] studies returned, find what metadata formats are available (metadataFormatsAvailable)</li>
|
|
232 <li>Retrieve the metadata in the desired format (metadata)</li>
|
|
233 </ol>
|
|
234 </div>
|
|
235 </div>
|
|
236 <div class="section" id="file-access-api">
|
|
237 <h3>File Access API<a class="headerlink" href="#file-access-api" title="Permalink to this headline">¶</a></h3>
|
|
238 <p>The Dataverse Network API for downloading digital objects (files) is implemented in 2
|
|
239 verbs (resources):</p>
|
|
240 <div class="line-block">
|
|
241 <div class="line"><tt class="docutils literal"><span class="pre">downloadInfo</span></tt></div>
|
|
242 <div class="line"><tt class="docutils literal"><span class="pre">download</span></tt></div>
|
|
243 </div>
|
|
244 <div class="section" id="downloadinfo">
|
|
245 <h4>downloadInfo<a class="headerlink" href="#downloadinfo" title="Permalink to this headline">¶</a></h4>
|
|
246 <p><strong>Arguments:</strong></p>
|
|
247 <div class="line-block">
|
|
248 <div class="line"><tt class="docutils literal"><span class="pre">objectId:</span> <span class="pre">mandatory,</span> <span class="pre">embedded.</span></tt></div>
|
|
249 <div class="line">Database ID of the Dataverse Network Study File.</div>
|
|
250 </div>
|
|
251 <p><strong>URLs example:</strong></p>
|
|
252 <p><tt class="docutils literal"><span class="pre">/dvn/api/downloadInfo/9956</span></tt></p>
|
|
253 <p><strong>Output:</strong></p>
|
|
254 <p>XML record in the format below:</p>
|
|
255 <p><em>(Note: the record below is only an example; we will provide full schema/documentation of theFileDownloadInfo record format below)</em></p>
|
|
256 <div class="highlight-guess"><div class="highlight"><pre><span class="nt"><FileDownloadInfo></span>
|
|
257 <span class="nt"><studyFile</span> <span class="na">fileId=</span><span class="s">"9956"</span><span class="nt">></span>
|
|
258
|
|
259 <span class="nt"><fileName></span>prettypicture.jpg<span class="nt"></fileName></span>
|
|
260 <span class="nt"><fileMimeType></span>image/jpeg<span class="nt"></fileMimeType></span>
|
|
261 <span class="nt"><fileSize></span>52825<span class="nt"></fileSize></span>
|
|
262
|
|
263 <span class="nt"><Authentication></span>
|
|
264 <span class="nt"><authUser></span>testUser<span class="nt"></authUser></span>
|
|
265 <span class="nt"><authMethod></span>password<span class="nt"></authMethod></span>
|
|
266 <span class="nt"></Authentication></span>
|
|
267
|
|
268 <span class="nt"><Authorization</span> <span class="na">directAccess=</span><span class="s">"true"</span><span class="nt">/></span>
|
|
269
|
|
270 <span class="nt"><accessPermissions</span> <span class="na">accessGranted=</span><span class="s">"true"</span><span class="nt">></span>Authorized Access only<span class="nt"></accessPermissions></span>
|
|
271
|
|
272 <span class="nt"><accessRestrictions</span> <span class="na">accessGranted=</span><span class="s">"true"</span><span class="nt">></span>Terms of Use<span class="nt"></accessRestrictions></span>
|
|
273
|
|
274 <span class="nt"><accessServicesSupported></span>
|
|
275
|
|
276 <span class="nt"><accessService></span>
|
|
277 <span class="nt"><serviceName></span>thumbnail<span class="nt"></serviceName></span>
|
|
278 <span class="nt"><serviceArgs></span>imageThumb=true<span class="nt"></serviceArgs></span>
|
|
279 <span class="nt"><contentType></span>image/png<span class="nt"></contentType></span>
|
|
280 <span class="nt"><serviceDesc></span>Image Thumbnail<span class="nt"></serviceDesc></span>
|
|
281 <span class="nt"></accessService></span>
|
|
282
|
|
283 <span class="nt"></accessServicesSupported></span>
|
|
284 <span class="nt"></studyFile></span>
|
|
285 <span class="nt"></FileDownloadInfo></span>
|
|
286 </pre></div>
|
|
287 </div>
|
|
288 <p><strong>Error Conditions:</strong></p>
|
|
289 <div class="line-block">
|
|
290 <div class="line"><tt class="docutils literal"><span class="pre">404</span> <span class="pre">NOT</span> <span class="pre">FOUND</span></tt></div>
|
|
291 <div class="line">Study file does not exist.</div>
|
|
292 </div>
|
|
293 </div>
|
|
294 <div class="section" id="download">
|
|
295 <h4>download<a class="headerlink" href="#download" title="Permalink to this headline">¶</a></h4>
|
|
296 <p><strong>Arguments:</strong></p>
|
|
297 <div class="line-block">
|
|
298 <div class="line"><tt class="docutils literal"><span class="pre">objectId:</span> <span class="pre">mandatory,</span> <span class="pre">embedded.</span></tt></div>
|
|
299 <div class="line">Database ID of the DVN Study File.</div>
|
|
300 </div>
|
|
301 <div class="line-block">
|
|
302 <div class="line"><tt class="docutils literal"><span class="pre">Optional</span> <span class="pre">Query</span> <span class="pre">args:</span></tt></div>
|
|
303 <div class="line">As specified in the output of downloadInfo, above.</div>
|
|
304 </div>
|
|
305 <p><strong>URLs examples:</strong></p>
|
|
306 <div class="line-block">
|
|
307 <div class="line"><tt class="docutils literal"><span class="pre">/dvn/api/download/9956</span></tt></div>
|
|
308 <div class="line"><tt class="docutils literal"><span class="pre">/dvn/api/download/9956?imageThumb=true</span></tt></div>
|
|
309 <div class="line"><tt class="docutils literal"><span class="pre">/dvn/api/download/9957?fileFormat=stata</span></tt></div>
|
|
310 </div>
|
|
311 <p><strong>Output:</strong></p>
|
|
312 <p>Byte Stream (with proper HTTP headers specifying the content
|
|
313 type, file name and such)</p>
|
|
314 <p><strong>Error Conditions:</strong></p>
|
|
315 <div class="line-block">
|
|
316 <div class="line"><tt class="docutils literal"><span class="pre">404</span> <span class="pre">NOT</span> <span class="pre">FOUND</span></tt></div>
|
|
317 <div class="line">Study file does not exist.</div>
|
|
318 </div>
|
|
319 <div class="line-block">
|
|
320 <div class="line"><tt class="docutils literal"><span class="pre">401</span> <span class="pre">AUTHORIZATION</span> <span class="pre">REQUIRED</span></tt></div>
|
|
321 <div class="line">Access to restricted object attempted without HTTP Authorization header supplied.</div>
|
|
322 </div>
|
|
323 <div class="line-block">
|
|
324 <div class="line"><tt class="docutils literal"><span class="pre">403</span> <span class="pre">PERMISSION</span> <span class="pre">DENIED</span> <span class="pre">HTTP</span></tt></div>
|
|
325 <div class="line">Authorization header supplied, but the authenticated user is not</div>
|
|
326 <div class="line">authorized to directly access the object protected by Access</div>
|
|
327 <div class="line">Permissions and/or Access Restrictions (“Terms of Use”).</div>
|
|
328 </div>
|
|
329 </div>
|
|
330 </div>
|
|
331 </div>
|
|
332 <div class="section" id="data-deposit-api">
|
|
333 <span id="id2"></span><h2>Data Deposit API<a class="headerlink" href="#data-deposit-api" title="Permalink to this headline">¶</a></h2>
|
|
334 <p>As of version 3.6, a new API for programmatic deposit of data and metadata to the Dataverse Network has been added. The API allows a remote, non-Dataverse Network archive/application to deposit files and metadata to a Dataverse Network installation.</p>
|
|
335 <div class="section" id="overview-of-data-deposit-api">
|
|
336 <h3>Overview of Data Deposit API<a class="headerlink" href="#overview-of-data-deposit-api" title="Permalink to this headline">¶</a></h3>
|
|
337 <p>“v1” of the DVN Data Deposit API is a partial implementation of the SWORDv2 protocol, the specification for which available at <a class="reference external" href="http://swordapp.github.io/SWORDv2-Profile/SWORDProfile.html">http://swordapp.github.io/SWORDv2-Profile/SWORDProfile.html</a></p>
|
|
338 <p>Please reference the SWORDv2 specification for expected HTTP status codes (i.e. 201, 204, 404, etc.), headers (i.e. “Location”), etc.</p>
|
|
339 <div class="section" id="data-deposit-api-v1-curl-examples">
|
|
340 <h4>Data Deposit API v1 <cite>curl</cite> examples<a class="headerlink" href="#data-deposit-api-v1-curl-examples" title="Permalink to this headline">¶</a></h4>
|
|
341 <p>The following <cite>curl</cite> commands demonstrate supported operations:</p>
|
|
342 <div class="section" id="retrieve-sword-service-document">
|
|
343 <h5>Retrieve SWORD service document<a class="headerlink" href="#retrieve-sword-service-document" title="Permalink to this headline">¶</a></h5>
|
|
344 <p>The service document enumerates the dataverses (“collections” from a SWORD perspective) the user can deposit data into. The “collectionPolicy” element for each dataverse contains the deposit terms of use for the network and dataverse.</p>
|
|
345 <p><tt class="docutils literal"><span class="pre">curl</span> <span class="pre">https://$USERNAME:$PASSWORD@$DVN_SERVER/dvn/api/data-deposit/v1/swordv2/service-document</span></tt></p>
|
|
346 </div>
|
|
347 <div class="section" id="create-a-study-with-an-atom-entry-xml-file">
|
|
348 <h5>Create a study with an Atom entry (XML file)<a class="headerlink" href="#create-a-study-with-an-atom-entry-xml-file" title="Permalink to this headline">¶</a></h5>
|
|
349 <p><tt class="docutils literal"><span class="pre">curl</span> <span class="pre">--data-binary</span> <span class="pre">"@atom-entry-study.xml"</span> <span class="pre">-H</span> <span class="pre">"Content-Type:</span> <span class="pre">application/atom+xml"</span> <span class="pre">https://$USERNAME:$PASSWORD@$DVN_SERVER/dvn/api/data-deposit/v1/swordv2/collection/dataverse/$DATAVERSE_ALIAS</span></tt></p>
|
|
350 <div class="highlight-guess"><div class="highlight"><pre><span class="cp"><?xml version="1.0"?></span>
|
|
351 <span class="c"><!--</span>
|
|
352 <span class="c">modified from http://swordapp.github.io/SWORDv2-Profile/SWORDProfile.html#protocoloperations_editingcontent_metadata</span>
|
|
353 <span class="c">--></span>
|
|
354 <span class="nt"><entry</span> <span class="na">xmlns=</span><span class="s">"http://www.w3.org/2005/Atom"</span>
|
|
355 <span class="na">xmlns:dcterms=</span><span class="s">"http://purl.org/dc/terms/"</span><span class="nt">></span>
|
|
356 <span class="c"><!-- some embedded metadata --></span>
|
|
357 <span class="nt"><dcterms:title></span>Roasting at Home<span class="nt"></dcterms:title></span>
|
|
358 <span class="nt"><dcterms:creator></span>Peets, John<span class="nt"></dcterms:creator></span>
|
|
359 <span class="nt"><dcterms:creator></span>Stumptown, Jane<span class="nt"></dcterms:creator></span>
|
|
360 <span class="c"><!-- Producer with financial or admin responsibility of the data --></span>
|
|
361 <span class="nt"><dcterms:publisher></span>Coffee Bean State University<span class="nt"></dcterms:publisher></span>
|
|
362 <span class="c"><!-- related publications --></span>
|
|
363 <span class="nt"><dcterms:isReferencedBy</span> <span class="na">holdingsURI=</span><span class="s">"http://dx.doi.org/10.1038/dvn333"</span> <span class="na">agency=</span><span class="s">"DOI"</span>
|
|
364 <span class="na">IDNo=</span><span class="s">"10.1038/dvn333"</span><span class="nt">></span>Peets, J., <span class="ni">&amp;</span> Stumptown, J. (2013). Roasting at Home. New England Journal of Coffee, 3(1), 22-34.<span class="nt"></dcterms:isReferencedBy></span>
|
|
365 <span class="c"><!-- production date --></span>
|
|
366 <span class="nt"><dcterms:date></span>2013-07-11<span class="nt"></dcterms:date></span>
|
|
367 <span class="c"><!-- Other Identifier for the data in this study (or potentially global id if unused) --></span>
|
|
368 <span class="c"><!--</span>
|
|
369 <span class="c"> <dcterms:identifier>hdl:1XXZY.1/XYXZ</dcterms:identifier></span>
|
|
370 <span class="c"> --></span>
|
|
371 <span class="nt"><dcterms:description></span>Considerations before you start roasting your own coffee at home.<span class="nt"></dcterms:description></span>
|
|
372 <span class="c"><!-- keywords --></span>
|
|
373 <span class="nt"><dcterms:subject></span>coffee<span class="nt"></dcterms:subject></span>
|
|
374 <span class="nt"><dcterms:subject></span>beverage<span class="nt"></dcterms:subject></span>
|
|
375 <span class="nt"><dcterms:subject></span>caffeine<span class="nt"></dcterms:subject></span>
|
|
376 <span class="c"><!-- geographic coverage --></span>
|
|
377 <span class="nt"><dcterms:coverage></span>United States<span class="nt"></dcterms:coverage></span>
|
|
378 <span class="nt"><dcterms:coverage></span>Canada<span class="nt"></dcterms:coverage></span>
|
|
379 <span class="c"><!-- kind of data --></span>
|
|
380 <span class="nt"><dcterms:type></span>aggregate data<span class="nt"></dcterms:type></span>
|
|
381 <span class="c"><!-- List of sources of the data collection--></span>
|
|
382 <span class="nt"><dcterms:source></span>Stumptown, Jane. 2011. Home Roasting. Coffeemill Press.<span class="nt"></dcterms:source></span>
|
|
383 <span class="c"><!-- restrictions --></span>
|
|
384 <span class="nt"><dcterms:rights></span>Creative Commons CC-BY 3.0 (unported) http://creativecommons.org/licenses/by/3.0/<span class="nt"></dcterms:rights></span>
|
|
385 <span class="c"><!-- related materials --></span>
|
|
386 <span class="nt"><dcterms:relation></span>Peets, John. 2010. Roasting Coffee at the Coffee Shop. Coffeemill Press<span class="nt"></dcterms:relation></span>
|
|
387 <span class="nt"></entry></span>
|
|
388 </pre></div>
|
|
389 </div>
|
|
390 </div>
|
|
391 <div class="section" id="dublin-core-dc-qualified-mapping-ddi-dataverse-network-db-element-crosswalk">
|
|
392 <h5>Dublin Core (DC) Qualified Mapping - DDI - Dataverse Network DB Element Crosswalk<a class="headerlink" href="#dublin-core-dc-qualified-mapping-ddi-dataverse-network-db-element-crosswalk" title="Permalink to this headline">¶</a></h5>
|
|
393 <table border="1" class="docutils">
|
|
394 <colgroup>
|
|
395 <col width="12%" />
|
|
396 <col width="19%" />
|
|
397 <col width="13%" />
|
|
398 <col width="57%" />
|
|
399 </colgroup>
|
|
400 <thead valign="bottom">
|
|
401 <tr class="row-odd"><th class="head">DC (terms: namespace)</th>
|
|
402 <th class="head">DVN DB Element</th>
|
|
403 <th class="head">DDI Element 2.x</th>
|
|
404 <th class="head">Note</th>
|
|
405 </tr>
|
|
406 </thead>
|
|
407 <tbody valign="top">
|
|
408 <tr class="row-even"><td>dcterms:title</td>
|
|
409 <td>title</td>
|
|
410 <td>2.1.1.1 title</td>
|
|
411 <td> </td>
|
|
412 </tr>
|
|
413 <tr class="row-odd"><td>dcterms:creator</td>
|
|
414 <td>author (LastName, FirstName)</td>
|
|
415 <td>2.1.2.1 AuthEnty</td>
|
|
416 <td> </td>
|
|
417 </tr>
|
|
418 <tr class="row-even"><td>dcterms:subject</td>
|
|
419 <td>keyword</td>
|
|
420 <td>2.2.1.1. keyword</td>
|
|
421 <td> </td>
|
|
422 </tr>
|
|
423 <tr class="row-odd"><td>dcterms:description</td>
|
|
424 <td>abstract</td>
|
|
425 <td>2.2.2 abstract</td>
|
|
426 <td>Describing the purpose, scope or nature of the data collection...</td>
|
|
427 </tr>
|
|
428 <tr class="row-even"><td>dcterms:publisher</td>
|
|
429 <td>producer</td>
|
|
430 <td>2.1.3.1 producer</td>
|
|
431 <td>person or agency financially or administratively responsible for the dataset</td>
|
|
432 </tr>
|
|
433 <tr class="row-odd"><td>dcterms:contributor</td>
|
|
434 <td>n/a</td>
|
|
435 <td>n/a</td>
|
|
436 <td>see dcterms:creator above</td>
|
|
437 </tr>
|
|
438 <tr class="row-even"><td>dcterms:date</td>
|
|
439 <td>productionDate (YYYY-MM-DD or YYYY-MM or YYYY)</td>
|
|
440 <td>2.1.3.3 prodDate</td>
|
|
441 <td>production or published date of dataset</td>
|
|
442 </tr>
|
|
443 <tr class="row-odd"><td>dcterms:type</td>
|
|
444 <td>kindOfData</td>
|
|
445 <td>2.2.3.10 dataKind</td>
|
|
446 <td>Type of data included in the file: survey data, census/enumeration data, aggregate data, clinical</td>
|
|
447 </tr>
|
|
448 <tr class="row-even"><td>dcterms:format</td>
|
|
449 <td>n/a</td>
|
|
450 <td>n/a</td>
|
|
451 <td> </td>
|
|
452 </tr>
|
|
453 <tr class="row-odd"><td>dcterms:identifier</td>
|
|
454 <td>otherID</td>
|
|
455 <td>2.1.1.5 IDNo</td>
|
|
456 <td>Don’t use this field to map a journal article ID. Only ID’s that directly belong to dataset</td>
|
|
457 </tr>
|
|
458 <tr class="row-even"><td>dcterms:source</td>
|
|
459 <td>dataSources</td>
|
|
460 <td>2.3.1.8.1 dataSrc</td>
|
|
461 <td>List of books, articles, data files if any that served as the sources for the data collection</td>
|
|
462 </tr>
|
|
463 <tr class="row-odd"><td>dcterms:language</td>
|
|
464 <td>n/a</td>
|
|
465 <td>n/a</td>
|
|
466 <td> </td>
|
|
467 </tr>
|
|
468 <tr class="row-even"><td>dcterms:relation</td>
|
|
469 <td>relatedMaterial</td>
|
|
470 <td>2.5.1 relMat</td>
|
|
471 <td>any related material (journal article is not included here - see: dcterms:isReferencedBy below)</td>
|
|
472 </tr>
|
|
473 <tr class="row-odd"><td>dcterms:coverage</td>
|
|
474 <td>geographicCoverage</td>
|
|
475 <td>2.2.3.4 geogCover</td>
|
|
476 <td>Info on the geographic coverage of the data</td>
|
|
477 </tr>
|
|
478 <tr class="row-even"><td>dcterms:rights</td>
|
|
479 <td>restrictions</td>
|
|
480 <td>2.4.2.3 restrctn</td>
|
|
481 <td>any restrictions on the access or use of the dataset</td>
|
|
482 </tr>
|
|
483 <tr class="row-odd"><td>dcterms:bibliographicCitation</td>
|
|
484 <td>dataCitation</td>
|
|
485 <td>? (2.1.7 biblCit)</td>
|
|
486 <td>data citation for the study in the Dataverse Network</td>
|
|
487 </tr>
|
|
488 <tr class="row-even"><td>dcterms:isReferencedBy</td>
|
|
489 <td>studyRelPublications</td>
|
|
490 <td>? (not set by DDI community yet)</td>
|
|
491 <td>the publication (journal article, book, other work) that uses this dataset (include citation, permanent identifier (DOI), and permanent URL)</td>
|
|
492 </tr>
|
|
493 </tbody>
|
|
494 </table>
|
|
495 </div>
|
|
496 <div class="section" id="add-files-to-a-study-with-a-zip-file">
|
|
497 <h5>Add files to a study with a zip file<a class="headerlink" href="#add-files-to-a-study-with-a-zip-file" title="Permalink to this headline">¶</a></h5>
|
|
498 <p><tt class="docutils literal"><span class="pre">curl</span> <span class="pre">--data-binary</span> <span class="pre">@example.zip</span> <span class="pre">-H</span> <span class="pre">"Content-Disposition:</span> <span class="pre">filename=example.zip"</span> <span class="pre">-H</span> <span class="pre">"Content-Type:</span> <span class="pre">application/zip"</span> <span class="pre">-H</span> <span class="pre">"Packaging:</span> <span class="pre">http://purl.org/net/sword/package/SimpleZip"</span> <span class="pre">https://$USERNAME:$PASSWORD@$DVN_SERVER/dvn/api/data-deposit/v1/swordv2/edit-media/study/hdl:TEST/12345</span></tt></p>
|
|
499 </div>
|
|
500 <div class="section" id="display-a-study-atom-entry">
|
|
501 <h5>Display a study atom entry<a class="headerlink" href="#display-a-study-atom-entry" title="Permalink to this headline">¶</a></h5>
|
|
502 <p>Contains data citation (bibliographicCitation), alternate URI [persistent URI of study], edit URI, edit media URI, statement URI.</p>
|
|
503 <p><tt class="docutils literal"><span class="pre">curl</span> <span class="pre">https://$USERNAME:$PASSWORD@$DVN_SERVER/dvn/api/data-deposit/v1/swordv2/edit/study/hdl:TEST/12345</span></tt></p>
|
|
504 </div>
|
|
505 <div class="section" id="display-a-study-statement">
|
|
506 <h5>Display a study statement<a class="headerlink" href="#display-a-study-statement" title="Permalink to this headline">¶</a></h5>
|
|
507 <p>Contains feed of file entries, latestVersionState, locked boolean</p>
|
|
508 <p><tt class="docutils literal"><span class="pre">curl</span> <span class="pre">https://$USERNAME:$PASSWORD@$DVN_SERVER/dvn/api/data-deposit/v1/swordv2/statement/study/hdl:TEST/12345</span></tt></p>
|
|
509 </div>
|
|
510 <div class="section" id="delete-a-file-by-database-id">
|
|
511 <h5>Delete a file by database id<a class="headerlink" href="#delete-a-file-by-database-id" title="Permalink to this headline">¶</a></h5>
|
|
512 <p><tt class="docutils literal"><span class="pre">curl</span> <span class="pre">-i</span> <span class="pre">-X</span> <span class="pre">DELETE</span> <span class="pre">https://$USERNAME:$PASSWORD@$DVN_SERVER/dvn/api/data-deposit/v1/swordv2/edit-media/file/2325541</span></tt></p>
|
|
513 </div>
|
|
514 <div class="section" id="replacing-cataloging-information-title-author-etc-for-a-study">
|
|
515 <h5>Replacing cataloging information (title, author, etc.) for a study<a class="headerlink" href="#replacing-cataloging-information-title-author-etc-for-a-study" title="Permalink to this headline">¶</a></h5>
|
|
516 <p>Please note that all cataloging information will be replaced, including fields that can not be expressed with “dcterms” fields.</p>
|
|
517 <p><tt class="docutils literal"><span class="pre">curl</span> <span class="pre">--upload-file</span> <span class="pre">"atom-entry-study2.xml"</span> <span class="pre">-H</span> <span class="pre">"Content-Type:</span> <span class="pre">application/atom+xml"</span> <span class="pre">https://$USERNAME:$PASSWORD@$DVN_SERVER/dvn/api/data-deposit/v1/swordv2/edit/study/hdl:TEST/12345</span></tt></p>
|
|
518 <div class="highlight-guess"><div class="highlight"><pre><span class="cp"><?xml version="1.0"?></span>
|
|
519 <span class="c"><!--</span>
|
|
520 <span class="c">for modifying a study created with atom-entry-study.xml</span>
|
|
521 <span class="c">--></span>
|
|
522 <span class="nt"><entry</span> <span class="na">xmlns=</span><span class="s">"http://www.w3.org/2005/Atom"</span>
|
|
523 <span class="na">xmlns:dcterms=</span><span class="s">"http://purl.org/dc/terms/"</span><span class="nt">></span>
|
|
524 <span class="c"><!-- some embedded metadata --></span>
|
|
525 <span class="nt"><dcterms:title></span>The Levels of Caffeine in Cold Brew Coffee<span class="nt"></dcterms:title></span>
|
|
526 <span class="nt"><dcterms:creator></span>Peets, John L.<span class="nt"></dcterms:creator></span>
|
|
527 <span class="nt"><dcterms:creator></span>Stumptown Research Institute<span class="nt"></dcterms:creator></span>
|
|
528 <span class="nt"><dcterms:isReferencedBy</span> <span class="na">holdingsURI=</span><span class="s">"http://dx.doi.org/10.1038/dvn333"</span> <span class="na">agency=</span><span class="s">"DOI"</span>
|
|
529 <span class="na">IDNo=</span><span class="s">"10.1038/dvn333"</span><span class="nt">></span>Peets, J., <span class="ni">&amp;</span> Stumptown, J. (2013). Roasting at Home. New England Journal of Coffee, 3(1), 22-34.<span class="nt"></dcterms:isReferencedBy></span>
|
|
530 <span class="nt"><dcterms:date></span>2013-08-11<span class="nt"></dcterms:date></span>
|
|
531 <span class="nt"><dcterms:description></span>This study evaluates the caffeine levels of a cold brewed coffee.<span class="nt"></dcterms:description></span>
|
|
532 <span class="nt"><dcterms:subject></span>coffee bean<span class="nt"></dcterms:subject></span>
|
|
533 <span class="nt"><dcterms:subject></span>caffeine<span class="nt"></dcterms:subject></span>
|
|
534 <span class="nt"><dcterms:subject></span>cold brew process<span class="nt"></dcterms:subject></span>
|
|
535 <span class="nt"><dcterms:subject></span>Stumptown Coffee Company<span class="nt"></dcterms:subject></span>
|
|
536 <span class="nt"><dcterms:rights></span>Creative Commons CC-BY 3.0 (unported) http://creativecommons.org/licenses/by/3.0/<span class="nt"></dcterms:rights></span>
|
|
537 <span class="nt"></entry></span>
|
|
538 </pre></div>
|
|
539 </div>
|
|
540 </div>
|
|
541 <div class="section" id="list-studies-in-a-dataverse">
|
|
542 <h5>List studies in a dataverse<a class="headerlink" href="#list-studies-in-a-dataverse" title="Permalink to this headline">¶</a></h5>
|
|
543 <p><tt class="docutils literal"><span class="pre">curl</span> <span class="pre">https://$USERNAME:$PASSWORD@$DVN_SERVER/dvn/api/data-deposit/v1/swordv2/collection/dataverse/$DATAVERSE_ALIAS</span></tt></p>
|
|
544 </div>
|
|
545 <div class="section" id="delete-a-study-non-released-studies-only">
|
|
546 <h5>Delete a study (non-released studies only)<a class="headerlink" href="#delete-a-study-non-released-studies-only" title="Permalink to this headline">¶</a></h5>
|
|
547 <p><tt class="docutils literal"><span class="pre">curl</span> <span class="pre">-i</span> <span class="pre">-X</span> <span class="pre">DELETE</span> <span class="pre">https://$USERNAME:$PASSWORD@$DVN_SERVER/dvn/api/data-deposit/v1/swordv2/edit/study/hdl:TEST/12345</span></tt></p>
|
|
548 </div>
|
|
549 <div class="section" id="deaccession-a-study-released-studies-only">
|
|
550 <h5>Deaccession a study (released studies only)<a class="headerlink" href="#deaccession-a-study-released-studies-only" title="Permalink to this headline">¶</a></h5>
|
|
551 <p><tt class="docutils literal"><span class="pre">curl</span> <span class="pre">-i</span> <span class="pre">-X</span> <span class="pre">DELETE</span> <span class="pre">https://$USERNAME:$PASSWORD@$DVN_SERVER/dvn/api/data-deposit/v1/swordv2/edit/study/hdl:TEST/12345</span></tt></p>
|
|
552 </div>
|
|
553 <div class="section" id="release-a-study">
|
|
554 <h5>Release a study<a class="headerlink" href="#release-a-study" title="Permalink to this headline">¶</a></h5>
|
|
555 <p><tt class="docutils literal"><span class="pre">curl</span> <span class="pre">-X</span> <span class="pre">POST</span> <span class="pre">-H</span> <span class="pre">"In-Progress:</span> <span class="pre">false"</span> <span class="pre">--upload-file</span> <span class="pre">zero-length-file.txt</span> <span class="pre">https://$USERNAME:$PASSWORD@$DVN_SERVER/dvn/api/data-deposit/v1/swordv2/edit/study/hdl:TEST/12345</span></tt></p>
|
|
556 </div>
|
|
557 <div class="section" id="determine-if-a-dataverse-has-been-released">
|
|
558 <h5>Determine if a dataverse has been released<a class="headerlink" href="#determine-if-a-dataverse-has-been-released" title="Permalink to this headline">¶</a></h5>
|
|
559 <p>Look for a <cite>dataverseHasBeenReleased</cite> boolean.</p>
|
|
560 <p><tt class="docutils literal"><span class="pre">curl</span> <span class="pre">https://$USERNAME:$PASSWORD@$DVN_SERVER/dvn/api/data-deposit/v1/swordv2/collection/dataverse/$DATAVERSE_ALIAS</span></tt></p>
|
|
561 </div>
|
|
562 </div>
|
|
563 <div class="section" id="curl-reference">
|
|
564 <h4><cite>curl</cite> reference<a class="headerlink" href="#curl-reference" title="Permalink to this headline">¶</a></h4>
|
|
565 <p>Per <a class="reference external" href="http://curl.haxx.se/docs/manpage.html">http://curl.haxx.se/docs/manpage.html</a></p>
|
|
566 <ul class="simple">
|
|
567 <li><cite>–upload-file</cite> is an HTTP <cite>PUT</cite></li>
|
|
568 <li><cite>–data-binary</cite> is an HTTP <cite>POST</cite></li>
|
|
569 </ul>
|
|
570 </div>
|
|
571 </div>
|
|
572 <div class="section" id="dvn-data-deposit-api-v1-client-sample-code-python">
|
|
573 <h3>DVN Data Deposit API v1 client sample code (Python)<a class="headerlink" href="#dvn-data-deposit-api-v1-client-sample-code-python" title="Permalink to this headline">¶</a></h3>
|
|
574 <p><a class="reference external" href="https://github.com/dvn/swordpoc/tree/master/dvn_client">https://github.com/dvn/swordpoc/tree/master/dvn_client</a> contains sample Python code for writing a DVN Data Deposit API v1 client. It makes use of a Python client library which conforms to the SWORDv2 specification: <a class="reference external" href="https://github.com/swordapp/python-client-sword2">https://github.com/swordapp/python-client-sword2</a></p>
|
|
575 </div>
|
|
576 <div class="section" id="swordv2-client-libraries">
|
|
577 <h3>SWORDv2 client libraries<a class="headerlink" href="#swordv2-client-libraries" title="Permalink to this headline">¶</a></h3>
|
|
578 <ul class="simple">
|
|
579 <li>Python: <a class="reference external" href="https://github.com/swordapp/python-client-sword2">https://github.com/swordapp/python-client-sword2</a></li>
|
|
580 <li>Java: <a class="reference external" href="https://github.com/swordapp/JavaClient2.0">https://github.com/swordapp/JavaClient2.0</a></li>
|
|
581 <li>Ruby: <a class="reference external" href="https://github.com/swordapp/sword2ruby">https://github.com/swordapp/sword2ruby</a></li>
|
|
582 <li>PHP: <a class="reference external" href="https://github.com/swordapp/swordappv2-php-library">https://github.com/swordapp/swordappv2-php-library</a></li>
|
|
583 </ul>
|
|
584 </div>
|
|
585 </div>
|
|
586 </div>
|
|
587
|
|
588
|
|
589 </div>
|
|
590 </div>
|
|
591 </div>
|
|
592 </div>
|
|
593 <div class="sidebar">
|
|
594 <h3>Table Of Contents</h3>
|
|
595 <ul class="current">
|
|
596 <li class="toctree-l1"><a class="reference internal" href="dataverse-user-main.html">User Guide</a></li>
|
|
597 <li class="toctree-l1"><a class="reference internal" href="dataverse-installer-main.html">Installers Guide</a></li>
|
|
598 <li class="toctree-l1"><a class="reference internal" href="dataverse-developer-main.html">DVN Developers Guide</a></li>
|
|
599 <li class="toctree-l1 current"><a class="current reference internal" href="">APIs Guide</a><ul>
|
|
600 <li class="toctree-l2"><a class="reference internal" href="#data-sharing-api">Data Sharing API</a><ul>
|
|
601 <li class="toctree-l3"><a class="reference internal" href="#api-urls">API URLs</a></li>
|
|
602 <li class="toctree-l3"><a class="reference internal" href="#metadata-api">Metadata API</a><ul>
|
|
603 <li class="toctree-l4"><a class="reference internal" href="#metadatasearchfields">metadataSearchFields</a></li>
|
|
604 <li class="toctree-l4"><a class="reference internal" href="#metadatasearch">metadataSearch</a></li>
|
|
605 <li class="toctree-l4"><a class="reference internal" href="#metadataformatsavailable">metadataFormatsAvailable</a></li>
|
|
606 <li class="toctree-l4"><a class="reference internal" href="#metadata">metadata</a></li>
|
|
607 </ul>
|
|
608 </li>
|
|
609 <li class="toctree-l3"><a class="reference internal" href="#file-access-api">File Access API</a><ul>
|
|
610 <li class="toctree-l4"><a class="reference internal" href="#downloadinfo">downloadInfo</a></li>
|
|
611 <li class="toctree-l4"><a class="reference internal" href="#download">download</a></li>
|
|
612 </ul>
|
|
613 </li>
|
|
614 </ul>
|
|
615 </li>
|
|
616 <li class="toctree-l2"><a class="reference internal" href="#data-deposit-api">Data Deposit API</a><ul>
|
|
617 <li class="toctree-l3"><a class="reference internal" href="#overview-of-data-deposit-api">Overview of Data Deposit API</a><ul>
|
|
618 <li class="toctree-l4"><a class="reference internal" href="#data-deposit-api-v1-curl-examples">Data Deposit API v1 <cite>curl</cite> examples</a><ul>
|
|
619 <li class="toctree-l5"><a class="reference internal" href="#retrieve-sword-service-document">Retrieve SWORD service document</a></li>
|
|
620 <li class="toctree-l5"><a class="reference internal" href="#create-a-study-with-an-atom-entry-xml-file">Create a study with an Atom entry (XML file)</a></li>
|
|
621 <li class="toctree-l5"><a class="reference internal" href="#dublin-core-dc-qualified-mapping-ddi-dataverse-network-db-element-crosswalk">Dublin Core (DC) Qualified Mapping - DDI - Dataverse Network DB Element Crosswalk</a></li>
|
|
622 <li class="toctree-l5"><a class="reference internal" href="#add-files-to-a-study-with-a-zip-file">Add files to a study with a zip file</a></li>
|
|
623 <li class="toctree-l5"><a class="reference internal" href="#display-a-study-atom-entry">Display a study atom entry</a></li>
|
|
624 <li class="toctree-l5"><a class="reference internal" href="#display-a-study-statement">Display a study statement</a></li>
|
|
625 <li class="toctree-l5"><a class="reference internal" href="#delete-a-file-by-database-id">Delete a file by database id</a></li>
|
|
626 <li class="toctree-l5"><a class="reference internal" href="#replacing-cataloging-information-title-author-etc-for-a-study">Replacing cataloging information (title, author, etc.) for a study</a></li>
|
|
627 <li class="toctree-l5"><a class="reference internal" href="#list-studies-in-a-dataverse">List studies in a dataverse</a></li>
|
|
628 <li class="toctree-l5"><a class="reference internal" href="#delete-a-study-non-released-studies-only">Delete a study (non-released studies only)</a></li>
|
|
629 <li class="toctree-l5"><a class="reference internal" href="#deaccession-a-study-released-studies-only">Deaccession a study (released studies only)</a></li>
|
|
630 <li class="toctree-l5"><a class="reference internal" href="#release-a-study">Release a study</a></li>
|
|
631 <li class="toctree-l5"><a class="reference internal" href="#determine-if-a-dataverse-has-been-released">Determine if a dataverse has been released</a></li>
|
|
632 </ul>
|
|
633 </li>
|
|
634 <li class="toctree-l4"><a class="reference internal" href="#curl-reference"><cite>curl</cite> reference</a></li>
|
|
635 </ul>
|
|
636 </li>
|
|
637 <li class="toctree-l3"><a class="reference internal" href="#dvn-data-deposit-api-v1-client-sample-code-python">DVN Data Deposit API v1 client sample code (Python)</a></li>
|
|
638 <li class="toctree-l3"><a class="reference internal" href="#swordv2-client-libraries">SWORDv2 client libraries</a></li>
|
|
639 </ul>
|
|
640 </li>
|
|
641 </ul>
|
|
642 </li>
|
|
643 </ul>
|
|
644
|
|
645 <h3 style="margin-top: 1.5em;">Search</h3>
|
|
646 <form class="search" action="search.html" method="get">
|
|
647 <input type="text" name="q" />
|
|
648 <input type="submit" value="Go" />
|
|
649 <input type="hidden" name="check_keywords" value="yes" />
|
|
650 <input type="hidden" name="area" value="default" />
|
|
651 </form>
|
|
652 <p class="searchtip" style="font-size: 90%">
|
|
653 Enter search terms.
|
|
654 </p>
|
|
655 </div>
|
|
656 <div class="clearer"></div>
|
|
657 </div>
|
|
658 </div>
|
|
659
|
|
660 <div class="footer-wrapper">
|
|
661 <div class="footer">
|
|
662 <div class="left">
|
|
663 <a href="dataverse-developer-main.html" title="DVN Developers Guide"
|
|
664 >previous</a> |
|
|
665 <a href="genindex.html" title="General Index"
|
|
666 >index</a>
|
|
667 <br/>
|
|
668 <a href="_sources/dataverse-api-main.txt"
|
|
669 rel="nofollow">Show Source</a>
|
|
670 </div>
|
|
671
|
|
672 <div class="right">
|
|
673
|
|
674 <div class="footer">
|
|
675 © Copyright 1997-2013, President & Fellows Harvard University.
|
|
676 Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2b1.
|
|
677 </div>
|
|
678 </div>
|
|
679 <div class="clearer"></div>
|
|
680 </div>
|
|
681 </div>
|
|
682
|
|
683 </body>
|
|
684 </html> |