/[volute]/trunk/projects/grid/vospace/doc/VOSpace2-1.html
ViewVC logotype

Contents of /trunk/projects/grid/vospace/doc/VOSpace2-1.html

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2651 - (show annotations)
Thu Jun 5 23:42:24 2014 UTC (6 years, 2 months ago) by major.brian
File MIME type: text/html
File size: 201055 byte(s)
Minor revisions to VOSpace 2.1
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <title>VOSpace 2.1 Working Draft</title>
5 <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
6 <meta name="keywords" content="IVOA, International, Virtual, Observatory, Alliance" />
7 <meta name="maintainedBy" content="IVOA Document Coordinator, ivoadoc@ivoa.net" />
8 <link rel="stylesheet" href="http://ivoa.net/misc/ivoa_rec.css" type="text/css" />
9 <style type="text/css">
10 .issue {background-color: yellow}
11 .postponedissue {background-color: yellow}
12 .def code
13 .future {background-color: pink}
14 .draftedit {background-color: white}
15 .draftdelete {background-color: white}
16 .note { margin-left: 4em }
17 code { font-weight: bold;
18 font-family: monospace }
19
20 div.exampleInner pre { margin-left: 1em;
21 margin-top: 0em; margin-bottom: 0em}
22 div.exampleOuter {border: 4px double gray;
23 margin: 0em; padding: 0em}
24 div.exampleInner { border-top-width: 4px;
25 border-top-style: double;
26 border-top-color: white;
27 border-bottom-width: 4px;
28 border-bottom-style: double;
29 border-bottom-color: white;
30 padding: 0px; margin: 0em }
31 div.exampleWrapper { margin: 4px }
32 div.exampleHeader { font-weight: bold;
33 margin: 4px}
34
35 div.schemaInner pre { margin-left: 1em;
36 margin-top: 0em; margin-bottom: 0em;
37 }
38 div.schemaOuter {border: 4px double gray; padding: 0em}
39 div.schemaInner { background-color: #eeeeee;
40 border-top-width: 4px;
41 border-top-style: double;
42 border-top-color: #d3d3d3;
43 border-bottom-width: 4px;
44 border-bottom-style: double;
45 border-bottom-color: #d3d3d3;
46 padding: 4px; margin: 0em }
47 div.schemaHeader { font-weight: bold;
48 margin: 4px}
49 </style>
50
51 </head>
52
53 <body>
54 <div class="head">
55 <a href="http://www.ivoa.net/"><img alt="IVOA" src="http://www.ivoa.net/pub/images/IVOA_wb_300.jpg" width="300" height="169"/></a>
56 <h1>VOSpace specification<br/>
57 Version 2.10-20140505</h1>
58 <h2>IVOA Working Draft 05 May 2014</h2>
59
60 <dl>
61 <dt>This version:</dt>
62 <dd><a href="http://www.ivoa.net/Documents/WD/GWS/WD-VOSpace-2.1-20140505.html">
63 http://www.ivoa.net/Documents/WD/GWS/WD-VOSpace-2.1-20140505.html</a></dd>
64
65 <dt>Latest version:</dt>
66
67 <dd><a href="http://www.ivoa.net/Documents/latest/VOSpace-2.0">
68 http://www.ivoa.net/Documents/latest/VOSpace-2.0.html</a></dd>
69
70 <dt>Previous versions:</dt>
71 <dd><a href="http://www.ivoa.net/Documents/WD/GWS/REC-VOSpace-2.0-20130329.html">
72 http://www.ivoa.net/Documents/WD/GWS/REC-VOSpace-2.0-20130329.html</a></dd>
73 <dd><a href="http://www.ivoa.net/Documents/WD/GWS/PR-VOSpace-2.0-20121221.html">
74 http://www.ivoa.net/Documents/WD/GWS/PR-VOSpace-2.0-20121221.html</a></dd>
75 <dd><a href="http://www.ivoa.net/Documents/WD/GWS/PR-VOSpace-2.0-20120824.html">
76 http://www.ivoa.net/Documents/WD/GWS/PR-VOSpace-2.0-20120824.html</a></dd>
77 <dd>PR: <a href="http://www.ivoa.net/Documents/WD/GWS/PR-VOSpace-2.0-20111202.html">http://www.ivoa.net/Documents/WD/GWS/PR-VOSpace-2.0-20111202.html</a></dd>
78 <dd>WD: <a href="http://www.ivoa.net/Documents/WD/GWS/WD-VOSpace-2.0-20110628.html">
79 http://www.ivoa.net/Documents/WD/GWS/WD-VOSpace-2.0-20110628.html</a></dd>
80 <dd>WD: <a href="http://www.ivoa.net/Documents/WD/GWS/WD-VOSpace-2.0-20101112.html">
81 http://www.ivoa.net/Documents/WD/GWS/WD-VOSpace-2.0-20101112.html</a></dd>
82 <dd>WD: <a href="http://www.ivoa.net/Documents/GWS/WD-VOSpace-2.0-20100323.html">
83 http://www.ivoa.net/Documents/GWS/WD-VOSpace-2.0-20100323.html</a></dd>
84 <dd>WD: <a href="http://www.ivoa.net/Documents/GWS/WD-VOSpace-2.0-20090904.html">
85 http://www.ivoa.net/Documents/GWS/WD-VOSpace-2.0-20090904.html</a></dd>
86 </dl>
87 <dd>WD: <a href="http://www.ivoa.net/Documents/GWS/WD-VOSpace-2.0-20090513.doc">
88 http://www.ivoa.net/Documents/GWS/WD-VOSpace-2.0-20090513.doc</a></dd>
89 </dl>
90
91 <dl>
92 <dt>Working Group:</dt>
93 <dd><a href="http://www.ivoa.net/twiki/bin/view/IVOA/IvoaGridAndWebServices"> http://www.ivoa.net/twiki/bin/view/IVOA/IvoaGridAndWebServices</a></dd>
94 <dt>Author(s):</dt>
95 <dd>
96 <a
97 href="http://www.ivoa.net/twiki/bin/view/IVOA/MatthewGraham">Matthew
98 Graham (editor) </a><br/>
99 <a
100 href="http://www.ivoa.net/twiki/bin/view/IVOA/DaveMorris">Dave
101 Morris</a><br/> <a
102 href="http://www.ivoa.net/twiki/bin/view/IVOA/GuyRixon">Guy
103 Rixon</a><br/>
104 <a
105 href="http://www.ivoa.net/twiki/bin/view/IVOA/PatDowler">Pat Dowler</a><br/>
106 <a
107 href="http://www.ivoa.net/twiki/bin/view/IVOA/AndreSchaaff">Andre
108 Schaaff</a><br/> <a
109 href="http://www.ivoa.net/twiki/bin/view/IVOA/DougTody">Doug
110 Tody</a><br/> <a
111 href="http://www.ivoa.net/twiki/bin/view/IVOA/BrianMajor">Brian Major</a>
112 </dd>
113 </dl>
114 <hr/></div>
115
116 <h2><a name="abstract" id="abstract">Abstract</a></h2>
117 <p>VOSpace is the IVOA interface to distributed storage. This specification presents the first RESTful version of the interface, which is functionally equivalent to the SOAP-based VOSpace 1.1 specification. Note that all prior VOSpace clients will not work with this new version of the interface.</p>
118
119 <div class="status">
120 <h2><a name="status" id="status">Status of this Document</a></h2>
121
122 <!-- Choose one of the following (and remove the rest)-->
123 <!--Note-->
124 <!--
125 <p>This is an IVOA Note expressing suggestions from and opinions of the authors.<br/>
126 It is intended to share best practices, possible approaches, or other perspectives on interoperability with the Virtual Observatory.
127 It should not be referenced or otherwise interpreted as a standard specification.</p>
128 <p>This is an IVOA Working Draft for review by IVOA members and other interested parties.<br/>
129 It is a draft document and may be updated, replaced, or obsoleted by other documents at any time.
130 It is inappropriate to use IVOA Working Drafts as reference materials or to cite them as other than work in progress.</p>
131 -->
132
133 <!--Proposed Recommendation
134 <p>This is an IVOA Proposed Recommendation made available for public review.<br/>
135 It is appropriate to reference this document only as a recommended standard that is under review and which may be changed before it is accepted as a full recommendation.</p>
136 <p>The first release of this document was 2009 May 13 as a Working
137 Draft and 2011 December 2011 as a Proposed Recommendation.
138 </p>
139 -->
140
141 <!--Recommendation
142 -->
143 <p>This is an IVOA Working Draft for review by IVOA members and other interested parties.<br/>
144 It is a draft document and may be updated, replaced, or obsoleted by other documents at any time.
145 It is inappropriate to use IVOA Working Drafts as reference materials or to cite them as other than work in progress.</p>
146
147 A list of <a href="http://www.ivoa.net/Documents/">current IVOA Recommendations and other technical documents</a> can be found at http://www.ivoa.net/Documents/.
148
149 </div><br />
150
151 <h2><a name="acknowledgments" id="acknowledgments">Acknowledgments</a></h2>
152 <p>This document derives from discussions among the Grid and Web Services working group of the IVOA.<p></p>
153 This document has been developed with support from the National Science Foundation's Information Technology Research Program under Cooperative Agreement AST0122449 with the John Hopkins University, from the UK Science and Technology Facilities Council (STFC), and from the European Commission's Sixth Framework Program via the Optical Infrared Coordination Network (OPTICON).</p>
154
155
156 <h2><a name="conformance" id="conformance">Conformance related definitions</a></h2>
157 <p>The words "MUST", "SHALL", "SHOULD", "MAY", "RECOMMENDED", and "OPTIONAL" (in upper or lower case) used in this document are to be interpreted as described in IETF standard, RFC 2119 [RFC 2119].</p><p>
158 The <strong>Virtual Observatory (VO)</strong> is a general term for a
159 collection of federated resources that can be used to conduct
160 astronomical research, education, and outreach. The <strong>International Virtual Observatory Alliance (IVOA)</strong> is a global collaboration of separately funded projects to develop standards and infrastructure that enable VO applications. The International Virtual Observatory (IVO) application is an application that takes advantage of IVOA standards and infrastructure to provide some VO service.
161 </p>
162
163 <h2><a id="contents" name="contents">Contents</a></h2>
164 <div class="head">
165 <ul class="toc">
166 <li><a href="#abstract">Abstract</a></li>
167 <li><a href="#status">Status</a></li>
168 <li><a href="#acknowledgments">Acknowledgments</a></li>
169 <li><a href="#contents">Contents</a></li>
170 <li><a href="#sec1">1. Introduction</a></li>
171 <ul class="toc"><li><a href="#sec1_1">1.1 Typical use of a VOSpace service</a></li>
172 <li><a href="#sec1_2">1.2 The role in the IVOA Architecture</a></li>
173 <li><a href="#sec1_3">1.3 Document roadmap</a></li></ul>
174 <li><a href="#sec2">2. VOSpace identifiers</a></li>
175 <ul class="toc"><li><a href="#sec2_1">2.1 Identifier resolution</a></li></ul>
176 <li><a href="#sec3">3. VOSpace data model</a></li>
177 <ul class="toc"><li><a href="#sec3_1">3.1 Node and node types</a></li>
178 <li><a href="#sec3_2">3.2 Properties</a></li>
179 <ul class="toc"><li><a href="#sec3_2_1">3.2.1 Property values</a></li>
180 <li><a href="#sec3_2_2">3.2.2. Property identifiers</a></li>
181 <li><a href="#sec3_2_3">3.2.3 Property descriptions</a></li>
182 <li><a href="#sec3_2_4">3.2.4 Standard properties</a></li></ul>
183 <li><a href="#sec3_3">3.3 Capabilities</a></li>
184 <ul class="toc"><li><a href="#sec3_3_1">3.3.1 Example use cases</a></li>
185 <li><a href="#sec3_3_2">3.3.2 Capability identifiers</a></li>
186 <li><a href="#sec3_3_3">3.3.3 Capability descriptions</a></li>
187 <li><a href="#sec3_3_4">3.3.4 UI display name</a></li>
188 <li><a href="#sec3_3_5">3.3.5 Standard capabilities</a></li></ul>
189 <li><a href="#sec3_4">3.4 Views</a></li>
190 <ul class="toc"><li><a href="#sec3_4_1">3.4.1 Example use cases</a></li>
191 <li><a href="#sec3_4_2">3.4.2 View identifiers</a></li>
192 <li><a href="#sec3_4_3">3.4.3 View descriptions</a></li>
193 <li><a href="#sec3_4_4">3.4.4 Default views</a></li>
194 <li><a href="#sec3_4_5">3.4.5 Container views</a></li></ul>
195 <li><a href="#sec3_5">3.5 Protocols</a></li>
196 <ul class="toc"><li><a href="#sec3_5_1">3.5.1 Protocol identifiers</a></li>
197 <li><a href="#sec3_5_2">3.5.2 Protocol descriptions</a></li>
198 <li><a href="#sec3_5_3">3.5.3 Standard protocols</a></li>
199 <li><a href="#sec3_5_4">3.5.4 Custom protocols</a></li></ul>
200 <li><a href="#sec3_6">3.6 Transfers</a></li>
201 <ul class="toc"><li><a href="#sec3_6_1">3.6.1 Service-initiated transfers</a></li>
202 <li><a href="#sec3_6_2">3.6.2 Client-initiated transfers</a></li></ul>
203 <li><a href="#sec3_7">3.7 Searches</a></li>
204 <li><a href="#sec3_8">3.8 REST bindings</a></li></ul>
205 <li><a href="#sec4">4. Access Control</a></li>
206 <li><a href="#sec5">5. Web service operations</a></li>
207 <ul class="toc"><li><a href="#sec5_1">5.1 Service metadata</a></li>
208 <ul class="toc"><li><a href="#sec5_1_1">5.1.1 getProtocols</a></li>
209 <li><a href="#sec5_1_2">5.1.2 getViews</a></li>
210 <li><a href="#sec5_1_3">5.1.3 getProperties</a></li></ul>
211 <li><a href="#sec5_2">5.2 Creating and manipulating data nodes</a></li>
212 <ul class="toc"><li><a href="#sec5_2_1">5.2.1 createNode</a></li>
213 <li><a href="#sec5_2_2">5.2.2 moveNode</a></li>
214 <li><a href="#sec5_2_3">5.2.3 copyNode</a></li>
215 <li><a href="#sec5_2_4">5.2.4 deleteNode</a></li></ul>
216 <li><a href="#sec5_3">5.3 Accessing metadata</a></li>
217 <ul class="toc"><li><a href="#sec5_3_1">5.3.1 getNode</a></li>
218 <li><a href="#sec5_3_2">5.3.2 setNode</a></li>
219 <li><a href="#sec5_3_3">5.3.3 findNodes</a></li></ul>
220 <li><a href="#sec5_4">5.4 Transferring data</a></li>
221 <ul class="toc"><li><a href="#sec5_4_1">5.4.1 pushToVoSpace</a></li>
222 <li><a href="#sec5_4_2">5.4.2 pullToVoSpace</a></li>
223 <li><a href="#sec5_4_3">5.4.3 pullFromVoSpace</a></li>
224 <li><a href="#sec5_4_4">5.4.4 pushFromVoSpace</a></li></ul>
225 <li><a href="#sec5_5">5.5 Fault arguments</a></li>
226 </ul>
227 <li><a href="#sec6">6. Changes since last version</a></li>
228 <li><a href="#appA">Appendix A: Machine readable definitions</a></li>
229 <ul class="toc">
230 <li><a href="#appA_1">A.1 Message schema</a></li></ul>
231 <li><a href="#appB">Appendix B: Compliance matrix</a></li>
232 <li><a href="#appC">Appendix C: Standard properties</a></li>
233 <li><a href="#references">References</a></li>
234 </ul>
235 </div>
236 <hr/>
237
238 <br/>
239 <h2><a name="sec1">1. Introduction</a></h2>
240 <p>VOSpace is the IVOA interface to distributed storage. It specifies how VO agents and applications can use network attached data stores to persist and exchange data in a standard way.</p><p>
241 A VOSpace web service is an access point for a distributed storage network. Through this access point, a client can:</p><p>
242 <ul><li> add or delete data objects
243 <li> manipulate metadata for the data objects
244 <li> obtain URIs through which the content of the data objects can be accessed
245 </ul>
246 </p><p>VOSpace does not define how the data is stored or transferred, only the control messages to gain access. Thus, the VOSpace interface can readily be added to an existing storage system.</p><p>
247
248 When we speak of "a VOSpace", we mean the arrangement of data accessible through one particular VOSpace service. </p><p>
249
250 Each data object within a VOSpace service is represented as a node and has a description called a representation. A useful analogy to have in mind when reading this document is that a node is equivalent to a file. </p><p>
251
252 Nodes in VOSpace have unique identifiers expressed as URIs in the 'vos' scheme, as defined below. </p><p>
253
254 VOSpace 2.0 did not introduce any new functionality to that already
255 offered by prior (SOAP-based) versions of the interface (<a href="#VOSpace11">VOSpace 1.1</a>) but defines a RESTful binding for the interface. VOSpace 2.1 introduces minor, backward compatible functional changes to VOSpace 2.0.
256 </p>
257
258 <h3><a name="sec1_1">1.1 Typical use of a VOSpace service</a></h3>
259 <p>A typical use case for VOSpace is uploading a local data file to a remote VOSpace service. This is a two-stage process: creating a description of the data file (representation) in the VOSpace including any metadata (its properties) that they want to associate with it (e.g., MIME type), and defining the transfer operation that will actually see the data file bytes uploaded to the VOSpace service. The order of the processes should not matter. The user may want to create the representation first and then perform the transfer or transfer the bytes first and then update the representation with the appropriate metadata. </p><p>
260
261 Let's consider the first sequence: the user provides a XML description
262 of the data file which they HTTP PUT to the appropriate VOSpace URI -
263 this will be the HTTP identifier for the data file in the VOSpace,
264 e.g. http://nvo.caltech.edu/vospace/myData/table123. The description
265 will resemble this:</p>
266 <pre>
267 &lt;node xmlns="http://www.ivoa.net/xml/VOSpaceTypes-v2.1"
268 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
269 uri="vos://nvo.caltech!vospace/mytable1"
270 xsi:type="vost:UnstructuredDataNode">
271 &lt;properties>
272 &lt;property uri="ivo://ivoa.net/vospace/core#mimetype">text/xml&lt;/property>
273 &lt;/properties>
274 &lt;/node>
275 </pre>
276 <p>
277 The service will reply with an amended version of the representation containing service-specific details in addition to the information supplied by the user. These will include data formats that the service can handle for the type of node created in the VOSpace, third-party interfaces (capabilities) to the data that the service offers and system metadata.
278 </p><p>
279 The user will then describe the data format (the view) they want to use in uploading the file, e.g. VOTable, and the transport protocol (the protocol) that they want to employ to upload the file, e.g. HTTP PUT. This will result in the HTTP POSTing of a XML description of the transfer request to the appropriate VOSpace URI, e.g. http://nvo.caltech.edu/vospace/myData/table123/transfers. The description will resemble this:
280 </p><pre>
281 &lt;transfer xmlns="http://www.ivoa.net/xml/VOSpace/v2.1">
282 &lt;target>vos://nvo.caltech!vospace/mytable1&lt;/target>
283 &lt;direction>pushToVoSpace&lt;/direction>
284 &lt;view uri="ivo://ivoa.net/vospace/core#votable"/>
285 &lt;protocol uri="ivo://ivoa.net/vospace/core#http-put"/>
286 &lt;/transfer>
287 </pre><p>
288 The service will reply with the URL that the user will HTTP PUT the
289 data file to,
290 e.g. http://nvo.caltech.edu/bvospace/myData/table123/transfers/147516ab. The
291 user will then use a regular HTTP client to transfer (PUT) the local
292 file to the specified endpoint. This illustrates an important point
293 about VOSpace - it is only concerned with the server-side management of data storage and transfer. A client negotiates the details of a data transfer with a VOSpace service but the actual transfer of bytes across a network is handled by other tools.
294 </p><p>
295 Similarly, when a user wants to retrieve a data file from a VOSpace service, they will specify the data format (view) they want to use in downloading the file, e.g. VOTable, and the transport protocol (the protocol) that they want to employ to download the file, e.g. HTTP GET, and HTTP POST a XML description of this transfer request to the appropriate VOSpace URI - the transfer URI for the node in the VOSpace, e.g. http://nvo.caltech.edu/vospace/myDataNode/table123/transfers. The description will resemble this:
296 </p><pre>
297 &lt;transfer xmlns="http://www.ivoa.net/xml/VOSpace/v2.1">
298 &lt;target>vos://nvo.caltech!vospace/mytable1&lt;/target>
299 &lt;direction>pullFromVoSpace&lt;/direction>
300 &lt;view uri="ivo://ivoa.net/vospace/core#votable"/>
301 &lt;protocol uri="ivo://ivoa.net/vospace/core#httpget"/>
302 &lt;/transfer>
303 </pre><p>
304 The service will reply with the URL for the user to use, e.g. http://nvo.caltech.edu/vospace/myDataNode/table123/transfers/3df89ab4. The user can then download the data file by pointing an HTTP client (e.g. web browser) at the specified endpoint.
305 </p>
306
307 <h3><a name="sec1_2">1.2 The role in the IVOA Architecture</a></h3>
308 <p>The IVOA Architecture [Arch] provides a high-level view of how IVOA
309 standards work together to connect users and applications with
310 providers of data and services, as depicted in the diagram in Fig. 1.
311 </p>
312
313 <p>
314 <center>
315 <font size="-1">
316 <img src="vospace-in-arch.png" width="756"/> <br />
317 <blockquote>
318 <strong>Figure 1. VOSpace in the IVOA Architecture.</strong>
319 This provides an interface to distributed storage. It specifies how
320 applications can use networked data stores to persist and exchange data in a standardized fashion.
321 </blockquote>
322 </font>
323 </center>
324 </p>
325
326 <p>In this architecture, users employ a variety of tools (from the
327 User Layer) to discover and access archives and services of interest
328 (represented in the Resource Layer). VOSpace provides an interface to
329 storage resources containing the results of using these archives and
330 services and also to other storage solutions, e.g., local disks, where
331 users might want to transfer these results for further work. Items in
332 these resources are referenced by a VOSpace identifier which is
333 related to the standard IVOA Resource Identifier (see section 2).
334 This version of VOSpace employs the UWS design pattern [UWS] to manage data
335 transfers (see section 3.6) and searches (see section 3.7). VOSpace
336 instances may also employ the IVOA Single-Sign-On standard [SSO] for
337 authentication purposes (see section 4) and IVOA Credential Delegation
338 Protocol [CDP] to delegate data transfers.
339 </p>
340
341
342 <h3><a name="sec1_3">1.3 Document roadmap</a></h3>
343 <p>The rest of this document is structured as follows:
344 </p><p>
345 In <a href="#sec2">Section 2</a>, we specify the URI syntax for identifying data objects (nodes) in VOSpace.
346 </p><p>
347 In <a href="#sec3">Section 3</a>, we present the data model that underpins the VOSpace architecture. This consists of a number of data structures, which have XML representations that are used across the wire in message exchanges with a VOSpace service. These structures represent:
348 </p>
349 <ul>
350 <li> the data objects themselves (nodes)
351 <li> metadata that can be associated with a data object (properties)
352 <li> third-party interfaces to the data (capabilities)
353 <li> the data format used when transferring data objects across the wire (views)
354 <li> the transport protocol employed in a data transfer (protocols)
355 <li> the data transfer itself (transfers)
356 <li> searches of data objects (searches)
357 </ul>
358 <p>
359 We also describe the REST bindings between these representations and their URIs (HTTP identifiers).
360 </p><p>
361 In <a href="#sec4">Section 4</a>, we outline how security and access control policies are currently handled in VOSpace.
362 </p><p>
363 In <a href="#sec5">Section 5</a>, we detail the operations that the VOSpace interface supports. These handle access to service-level metadata, the creation and manipulation of nodes within the VOSpace, access to node metadata (properties) and data transfer to and from the VOSpace.
364 </p><p>
365 In <a href="#appA">Appendix A</a>, we formally define the VOSpace
366 interface with a machine readable description of its requests and
367 responses and in <a href="#appB">Appendix B</a>, we present a
368 compliance matrix listing the mandatory behaviour required of a valid
369 VOSpace 2.1 service.
370 </p>
371
372
373 <br/>
374 <h2><a name="sec2">2. VOSpace identifiers</a></h2>
375 <p>The identifier for a node in VOSpace SHALL be a URI with the scheme <code>vos</code>.</p>
376 <p>
377 Such a URI SHALL have the following parts with the meanings and
378 encoding rules defined in RFC2396 <a href="#ref2">[RFC 2396]</a>.
379 </p><ul>
380 <li> scheme
381 <li> naming authority
382 <li> path
383 <li> (optional) query
384 <li> (optional) fragment identifier (with the expected semantics <a
385 href="#fragref">[see here]</a>)
386 </ul><p>
387 The naming authority for a VOSpace node SHALL be the VOSpace service
388 through which the node was created. The authority part of the URI
389 SHALL be constructed from the IVO registry identifier [IVORN] for that
390 service by deleting the ivo:// prefix and changing all forward-slash
391 characters('/') in the resource key to exclamation marks ('!') or
392 tildes ('~'). Note that a service SHALL be consistent in its use of
393 separator characters ('!' or '~') when referring to its own data but
394 SHALL accept either as valid in URIs in service requests. For the rest
395 of the document, we shall use '!' as the default character.
396 </p><p>
397 This is an example of a possible VOSpace identifier.
398 </p>
399 <pre>
400 vos://nvo.caltech!vospace/myresults/siap-out-1.vot
401 </pre>
402 <ul<li>The URI scheme is <em>vos</em>
403 </ul>
404 <p>
405 Using a separate URI scheme for VOSpace identifiers enables clients to distinguish between IVO registry identifiers and VOSpace identifiers.
406 </p><ul>
407 <li> nvo.caltech!vospace
408 </ul><p>
409 is the authority part of the URI, corresponding to the IVO registry identifier
410 </p><ul>
411 <li> ivo://nvo.caltech/vospace
412 </ul><p>
413 This is the IVO registry identifier of the VOSpace service that contains the node.
414 </p><ul>
415 <li> /siap-out-1.vot is the URI path
416 </ul><p>
417 Slashes in the URI path imply a hierarchical arrangement of data: the
418 data object identified by
419 vos://nvo.caltech!vospace/myresults/siap-out-1.vot is within the
420 container identified by vos://nvo.caltech!vospace/myresults.
421 </p>
422 Literal space characters are also not allowed in URIs.
423 </p><p>
424 All ancestors in the hierarchy SHALL be resolvable as containers (ContainerNodes), all the way up to the root node of the space (this precludes any system of implied hierarchy in the naming scheme for nodes with ancestors that are just logical entities and cannot be reified, e.g. the Amazon S3 system).
425 </p><p>
426 A VOSpace identifier is globally unique, and identifies one specific
427 node in a specific VOSpace service.
428 </p>
429
430 <p>
431 The standardID for this specification SHALL be: ivo://ivoa.net/std/VOSpace/v2.1.
432 </p>
433
434 <h3><a name="sec2_1">2.1 Identifier resolution</a></h3>
435 <p>A VOSpace identifier can be resolved to a HTTP endpoint for accessing representations of the node associated with it. A client SHOULD use the following procedure to resolve access to a VOSpace node from a VOSpace identifier: </p><ul>
436
437 <li> Resolve HTTP service endpoint of VOSpace service with registry
438 <li> Append "nodes/" and the path following the naming authority part of the VOSpace identifier to the service endpoint
439 </ul><p>
440 Given the example identifier
441 </p><pre>
442 vos://org.astrogrid.cam!vospace/container-6/siap-out-1.vot?foo=bar
443 </pre><p>
444 processing the URI to resolve the VOSpace service would involve :
445 </p><ul>
446 <li> Extract the IVO registry identifier of the VOSpace service by prepending an ivo scheme to the naming authority part:
447 <ul><li> ivo://org.astrogrid.cam/vospace</li></ul>
448 <li> Resolve the IVO identifier in a registry and retrieve the access URL of the service endpoint:
449 <ul><li> http://some.uni.ac.uk/vospace</li></ul>
450 <li> Append "nodes/" and the path part of the VOSpace identifier:
451 <ul><li>http://some.uni.ac.uk/vospace/nodes/container-6/siap-out-1.vot?foo=bar
452 </li></ul>
453 </li></ul>
454 </p><p>
455 Note that any fragment identifier in the identifier SHOULD be removed
456 when resolving the identifier to a HTTP endpoint, consistent with
457 the implied semantics of URI fragments <a
458 href="fragref">[see here]</a>.
459 </p>
460
461 <br/>
462 <h2><a name="sec3">3. VOSpace data model</a></h2>
463 <h3><a name="sec3_1">3.1 Nodes and node types</a></h3>
464 <p>We refer to the arrangement of data accessible through one particular VOSpace service as "a VOSpace".
465 </p><p>
466 Each data object within a VOSpace SHALL be represented as a node that is identified by a URI.
467 </p><p>
468 There are different types of nodes and the type of a VOSpace node determines how the VOSpace service stores and interprets the node data.
469 </p><p>
470 The types are arranged in a hierarchy (see Fig. 2), with more detailed types inheriting the structure of more generic types.
471 </p>
472
473 <p>
474 <center>
475 <font size="-1">
476 <img src="vospace-node-hierarchy.png" width="600"/> <br />
477 <blockquote>
478 <strong>Figure 2. Node hierarchy</strong>
479 This shows the inheritance structure for the different types of nodes
480 in VOSpace.
481 </blockquote>
482 </font>
483 </center>
484 </p>
485
486 <p>
487 The following types (and representations) are defined:
488 </p><ul>
489 <li> <i>Node</i> is the most basic type
490 <li> <i>ContainerNode</i> describes a data item that can contain other data items
491 <li> <i>DataNode</i> describes a data item stored in the VOSpace
492 <li> <i>UnstructuredDataNode</i> describes a data item for which the VOSpace does not understand the data format
493 <li> <i>StructuredDataNode</i> describes a data item for which the space understands the format and may make transformations that preserve the meaning of the data.
494 <li> <i>LinkNode</i> describes a node that points to another node.
495 </ul><p>
496 When data is stored and retrieved from an <i>UnstructuredDataNode</i>, the bit pattern read back SHALL be identical to that written.
497 </p><p>
498 When data is stored and retrieved from a <i>StructuredDataNode</i>, the bit pattern returned MAY be different to the original. For example, storing tabular data from a VOTable file will preserve the tabular data, but any comments in the original XML file may be lost.
499 </p><p>
500 A Node representation SHALL have the following elements:
501 </p><ul>
502 <li> <i>uri</i>: the vos:// identifier for the node, URI-encoded
503 according to <a href="#ref3">RFC2396</a>
504 <li> <i>properties</i>: a set of metadata properties for the node
505 <li> <i>capabilities</i>: a third-party interface to a data object
506 </ul>
507
508 <p>
509 In addition, a <i>DataNode</i> representation SHALL have the following elements:
510 </p><ul>
511 <li> <i>accepts</i>: a list of the views (data formats) that the node can accept
512 <li> <i>provides</i>: a list of the views (data formats) that the node can provide
513 <li> <i>busy</i>: a boolean flag to indicate that the data associated with the node cannot be accessed
514 </ul>
515 <p>
516 The <i>busy</i> flag is used to indicate that an internal operation is in progress, and the node data is not available.
517 </i>
518 <p>
519 A <i>ContainerNode</i> representation SHALL have the following
520 elements, in addition to those it inherits from the <i>Node</i>
521 representation:
522 </p><ul>
523 <li> <i>nodes</i>: a list of the direct children, if applicable,
524 that the container has. Each child is represented as a <i>node</i>
525 subelement containing its vos:// identifier, URI-encoded according
526 to <a href="#ref3">RFC2396</a>
527 </ul>
528 <p>
529 A <i>LinkNode</i> representation SHALL have the following elements, in addition to those it inherits from the <i>Node</i> representation:
530 </p><ul>
531 <li> <i>target</i>: the target URI, URI-encoded according to <a
532 href="#ref3">RFC2396</a>
533 </ul>
534 <p>
535 The link target can be a URI that points to any type of resource, including other VOSpace Nodes (within the same VOSpace service or in another service), or external resources outside VOSpace altogether.
536 </p><p>
537 The properties of a <i>LinkNode</i> do not propagate to the target of
538 the <i>LinkNode</i>, i.e., a property attached to a <i>LinkNode</i>
539 does not also get attached to the target node. One use case is to enable third-party annotations to be associated with a resource but without the resource itself getting cluttered with unnecessary metadata. In this case, the client creates a <i>LinkNode</i> pointing to the resource in question and then adds the annotations as properties of the LinkNode.
540 </p><p>
541 Both the <i>ContainerNode</i> and the <i>LinkNode</i> SHALL have no data bytes associated with them.
542 </p><p>
543 The set of node types defined by this standard is closed; new types may be introduced only via new versions of the standard.
544 </p><p>
545 To comply with the standard, a client or service SHALL be able to parse XML representations of all the node types defined in the current specification.
546 </p><p>
547 Note: This does not require all services to support all of the Node
548 types, just that it can process an XML request containing any of the
549 types. If the service receives a request for a type that it does not
550 support, the service SHOULD return a <i>TypeNotSupported</i> fault. The
551 service SHALL NOT throw an XML parser error if it receives a request
552 for a type that it does not support.
553 </p>
554
555 <h3><a name="sec3_2">3.2 Properties</a></h3>
556 <p><i>Properties</i> are simple string-based metadata properties associated with a node. </p>
557 <p>
558 Individual <i>Properties</i> should contain simple short string values, not large blocks of information. If a system needs to attach a large amount of metadata to a node, then it should either use multiple small <i>Properties</i>, or a single <i>Property</i> containing a URI or URL pointing to an external resource that contains the additional metadata.
559 </p><p>
560 A <i>Property</i> representation SHALL have the following elements:
561 <ul>
562 <li> <i>uri</i>: the <i>Property</i> identifier
563 <li> <i>value</i>: the string value of the <i>Property</i>
564 <li> <i>readOnly</i>: a boolean flag to indicate that the <i>Property</i> cannot be changed by the client
565 </ul>
566 <p>
567 Properties may be set by the client or the service.
568 </p>
569
570 <h4><a name="sec3_2_1">3.2.1 Property values</a></h4>
571 <p>Unless they have special meaning to the service or client,
572 <i>Properties</i> are treated as simple string values.</p>
573
574 <p>When a <i>Property</i> can take multiple values, e.g., a list of
575 groups which can access a particular resource, these SHOULD be
576 comma-separated, unless the property description
577 defines a specific delimiter.
578 </p>
579
580 <p>Some <i>Properties</i> may have meaning to the service; others may have meaning only to one specific type of client. A service implementation does not need to understand the meaning of all the <i>Properties</i> of a node. Any <i>Properties</i> that it does not understand can simply be stored as text strings.
581 </p>
582
583 <h4><a name="sec3_2_2">3.2.2 Property identifiers</a></h4>
584 <p>Every new type of <i>Property</i> SHALL require a unique URI to identify the <i>Property</i> and its meaning.
585 </p><p>
586 The rules for the <i>Property</i> identifiers are similar to the rules for namespace URIs in XML schema. The only restriction is that it SHALL be a valid (unique) URI.
587 </p>
588 <ul>
589 <li> An XML schema namespace identifier can be just a simple URN, e.g. urn:my­namespace
590 <li> Within the IVOA, the convention for namespace identifiers is to use a HTTP URL pointing to the namespace schema or a resource describing it
591 </ul><p>
592 The current VOSpace schema defines <i>Property</i> identifiers as anyURI. The only restriction is that it SHALL be a valid (unique) URI.
593 </p><ul>
594 <li> A <i>Property</i> URI can be a simple URN, e.g. urn:my­property
595 </ul><p>
596 This may be sufficient for testing and development on a private system, but it is not scalable for use on a public service.
597 </p><p>
598 For a production system, any new Properties SHOULD have unique URIs that can be resolved into to a description of the Property.
599 </p><p>
600 Ideally, these should be IVO registry URIs that point to a description registered in the IVO registry:
601 </p><ul>
602 <li> ivo://my­registry/vospace/properties#my­property
603 </ul><p>
604 Using an IVO registry URI to identify Properties has two main advantages :
605 </p><ul>
606 <li> IVO registry URIs are by their nature unique, which makes it easy to ensure that different teams do not accidentally use the same URI
607 <li> If the IVO registry URI points to a description registered in the IVO registry, this provides a mechanism to discover what the Property means
608 </ul>
609
610 <h4><a name="sec3_2_3">3.2.3 Property descriptions</a></h4>
611 <p>If the URI for a particular Property is resolvable, i.e. an IVO registry identifier or a HTTP URL, then it SHOULD point to an XML resource that describes the Property.
612 </p><p>
613 A Property description SHOULD describe the data type and meaning of a Property.
614 </p><p>
615 A PropertyDescription SHOULD have the following members :
616 </p><ul>
617 <li> <i>uri</i>: the formal URI of the Property
618 <li> <i>DisplayName</i>: A display name for the Property
619 <li> <i>Description</i>: A text block describing the meaning and validation rules of the <i>Property</i>
620 </ul><p>
621 A <i>PropertyDescription</i> MAY have the following OPTIONAL members :
622 </p><ul>
623 <li> <i>UCD</i>: the Universal Content Descriptor (in the UCD1+ scheme) for the <i>Property</i>
624 <li> <i>Unit</i>: the unit of measurement of the Property
625 </ul>
626 <p>
627 The information in a Property description can be used to generate a UI for displaying and modifying the different types of Properties.
628 </p><p>
629 Note that at the time of writing, the schema for registering PropertyDescriptions in the IVO registry has not been finalized.
630 </p>
631
632 <h5><a name="sec3_2_3_1">3.2.3.1 UI display name</a></h5>
633 <p>
634 If a client is unable to resolve a Property identifier into a description, then it may just display the identifier as a text string:
635 </p><ul>
636 <li> urn:modified­date
637 </ul><p>
638 If the client can resolve the Property identifier into a description, then the client may use the information in the description to display a human readable name and description of the Property:
639 </p><ul>
640 <li> Last modification date of the node data
641 </ul>
642 <h5><a name="sec3_2_3_2">3.2.3.2 Property editors</a></h5>
643 <p>If the client is unable to resolve a Property identifier into a description, or does not understand the type information defined in the description, then the client MAY treat the Property value as a simple text string.
644 </p><p>
645 If the client can resolve the Property identifier into a description, then the client MAY use the information in the description to display an appropriate editing tool for the Property.
646 </p><p>
647 In the current version of the specification the rules for editing Properties are as follows:
648 </p><ul>
649 <li> A service MAY impose validation rules on the values of specific types of Properties
650 <li> If a client attempts to set a Property to an invalid value, then the service MAY reject the change
651 <li> Where possible, the validation rules for a type of Property SHOULD be defined in the Property description
652 </ul><p>
653 Future versions of the VOSpace specification may extend the PropertyDescription to include more specific machine readable validation rules for a Property type.
654 </p><p>
655 Note that at the time of writing, the schema for registering validation rules in PropertyDescriptions has not been finalized.
656 </p>
657 <h4><a name="sec3_2_4">3.2.4 Standard properties</a></h4>
658 <p>
659 Property URIs and PropertyDescriptions for the core set of Properties
660 are registered under a StandardKeyEnumeration resource [VOStd] in the
661 IVOA registry with the resource identifier ivo://ivoa.net/vospace/core.
662 The following URIs SHOULD be used to represent the service
663 properties:</p><ul>
664 <li> ivo://ivoa.net/vospace/core#title SHALL be used as the
665 property URI denoting a name given to the resource
666 <li> ivo://ivoa.net/vospace/core#creator SHALL be used as the
667 property URI denoting an entity primarily responsible for making the resource
668 <li> ivo://ivoa.net/vospace/core#subject SHALL be used as the
669 property URI denoting the topic of the resource
670 <li> ivo://ivoa.net/vospace/core#description SHALL be used as the
671 property URI denoting an account of the resource
672 <li> ivo://ivoa.net/vospace/core#publisher SHALL be used as the
673 property URI denoting an entity responsible for making the resource available
674 <li> ivo://ivoa.net/vospace/core#contributor SHALL be used as the
675 property URI denoting an entity responsible for making contributions
676 to this resource
677 <li> ivo://ivoa.net/vospace/core#date SHALL be used as the
678 property URI denoting a point or period of time associated with an
679 event in the lifecycle of the resource
680 <li> ivo://ivoa.net/vospace/core#type SHALL be used as the
681 property URI denoting the nature or genre of the resource
682 <li> ivo://ivoa.net/vospace/core#format SHALL be used as the
683 property URI denoting the file format, physical medium, or
684 dimensions of the resource
685 <li> ivo://ivoa.net/vospace/core#identifier SHALL be used as the
686 property URI denoting an unambiguous reference to the resource
687 within a given context
688 <li> ivo://ivoa.net/vospace/core#source SHALL be used as the
689 property URI denoting a related resource from which the described
690 resource is derived
691 <li> ivo://ivoa.net/vospace/core#language SHALL be used as the
692 property URI denoting a language of the resource
693 <li> ivo://ivoa.net/vospace/core#relation SHALL be used as the
694 property URI denoting a related resource
695 <li> ivo://ivoa.net/vospace/core#coverage SHALL be used as the
696 property URI denoting the spatial or temporal topic of the resource,
697 the spatial applicability of the resource, or the jurisdiction under
698 which the resource is relevant
699 <li> ivo://ivoa.net/vospace/core#rights SHALL be used as the
700 property URI denoting information about rights held in and over the resource
701 <li> ivo://ivoa.net/vospace/core#availableSpace SHALL be used as the
702 property URI denoting the amount of space available within a container
703 <li> ivo://ivoa.net/vospace/core#groupread SHALL be used as the
704 property URI denoting the list of groups which can only read this
705 resource (read-only)
706 <li> ivo://ivoa.net/vospace/core#groupwrite SHALL be used as the
707 property URI denoting the list of groups which can read and write to
708 this resource (read-write)
709 <li> ivo://ivoa.net/vospace/core#publicread SHALL be used as the
710 property URI denoting whether this resource is world readable (anon-read-only)
711 <li> ivo://ivoa.net/vospace/core#quota SHALL be used as the
712 property URI denoting the value of a system quota on the resource
713 <li> ivo://ivoa.net/vospace/core#length SHALL be used as the
714 property URI denoting the length or size of a resource
715 <li> ivo://ivoa.net/vospace/core#mtime SHALL be used as the property
716 URI denoting the data modification time
717 <li> ivo://ivoa.net/vospace/core#ctime SHALL be used as the property
718 URI denoting status change (aka metadata modification) time
719 <li> ivo://ivoa.net/vospace/core#btime SHALL be used as the property
720 URI denoting initial creation time
721
722 </ul>
723 <p>However, this is not intended to be a closed list,
724 different implementations are free to define and use their own
725 Properties. </p>
726
727 <h3><a name="sec3_3">3.3 Capabilities</a></h3>
728 <p>A Capability describes a third-party interface to a node. One application of this would be to enable data access to a node or its contents using a 3rd party service interface.
729 </p><p>
730 A Capability representation SHALL have the following members:
731 </p><ul>
732 <li> uri: the Capability identifier
733 <li> endpoint: the endpoint URL to use for the third-party interface
734 <li> param: a set of parameters for the capability
735 </ul>
736
737 <h4><a name="sec3_3_1">3.3.1 Example use cases</a></h4>
738 <p>A ContainerNode containing image files may offer a DAL SIAP capability so that the images in the container can be accessed using a SIAP service. In this way, a user could create a (DAL enabled) Container in VOSpace, transfer some images into it and then query the set of images using the SIAP interface.
739 </p><p>
740 Another example is a DataNode that provides an iRODS capability so
741 that the data replication for this data object can be handled using
742 the iRODS service API.
743 </p>
744
745 <h4><a name="sec3_3_2">3.3.2 Capability identifiers</a></h4>
746 <p>Every new type of Capability SHALL require a unique URI to identify the Capability. The rules for the Capability identifiers are similar to the rules for namespace URIs in XML schema. The only restriction is that it SHALL be a valid (unique) URI.</p><ul>
747 <li> An XML schema namespace identifier can be just a simple URN, e.g. urn:my-namespace
748 <li> Within the IVOA, the convention for namespace identifiers is to use a HTTP URL pointing to the namespace schema, or a resource describing it.
749 </ul>
750 <p>
751 The VOSpace schema defines Capability identifiers as anyURI. The only restriction is that it SHALL be a valid (unique) URI.
752 </p><ul>
753 <li> A Capability URI can be a simple URN, e.g. urn:my-capability
754 </ul><p>
755 This may be sufficient for testing and development on a private system, but it is not suitable for use on a public service. For a production system, any new Capabilities SHOULD have unique URIs that can be resolved into a description of the Capability. Ideally, these SHOULD be IVO registry URIs that point to a description registered in the IVO registry:
756 </p><ul>
757 <li> ivo://my-registry/vospace/capabilities#my-capability
758 </ul>
759 <p>
760 Using an IVO registry URI to identify Capabilities has two main advantages:
761 </p>
762 <ul>
763 <li> IVO registry URIs are by their nature unique, which makes it easy to ensure that different teams do not accidentally use the same URI
764 <li> If the IVO registry URI points to a description registered in the
765 IVO registry, this provides a mechanism to discover how to use the Capability.
766 </ul>
767
768 <h4><a name="sec3_3_3">3.3.3 Capability descriptions</a></h4>
769 <p>If the URI for a particular Capability is resolvable, i.e. an IVO registry identifier or a HTTP URL then it SHOULD point to an XML resource that describes the Capability.
770 </p><p>
771 A CapabilityDescription SHOULD describe the third-party interface and how it should be used in this context. A CapabilityDescription SHOULD have the following members:
772 </p><ul>
773 <li> <i>uri</i>: the formal URI of the Capability
774 <li> <i>DisplayName</i>: a simple display name of the Capability.
775 <li> <i>Description</i>: a text block describing the third-party interface and how it should be used in this context.
776 </ul><p>
777 Note that at the time of writing, the schema for registering CapabilityDescriptions in the IVO registry has not been finalized.
778 </p>
779
780 <h4><a name="sec3_3_4">3.3.4 UI display name</a></h4>
781 <p>If a client is unable to resolve a Capability identifier into a description then it may just display the identifier as a text string:
782 </p><ul>
783 <li> Access data using urn:edu.sdsc.irods
784 </ul><p>
785 If a client can resolve the Capability identifier into a description then the client may use the information in the description to display a human readable name and description of the Capability:
786 </p><ul>
787 <li> Access data using iRODS
788 </ul>
789
790 <h4><a name="sec3_3_5">3.3.5 Standard capabilities</a></h4>
791 <p>Capability URIs and CapabilityDescriptions for the core set of
792 Capabilities are registered under a StandardKeyEnumeration resource [VOStd] in the
793 IVOA registry with the resource identifier ivo://ivoa.net/vospace/core.. The following URIs SHALL be used to represent the service capabilities:
794 </p><ul>
795 <li> ivo://ivoa.net/vospace/core#vospace-1.0 SHALL be used as the capability URI for a VOSpace 1.0 service
796 <li> ivo://ivoa.net/vospace/core#vospace-1.1 SHALL be used as the capability URI for a VOSpace 1.1 service
797 <li> ivo://ivoa.net/vospace/core#vospace-2.0 SHALL be used as the capability URI for a VOSpace 2.0 service
798 </ul><p>
799 If a service implementation supports more than one version of the VOSpace interface then these capability URIs can be used with a VOSpace service to identify different VOSpace capabilities for a node.
800 </p><p>
801 One use case for this would be a VOSpace 1.1 client talking to a service that implements both VOSpace 1.0 and VOSpace 1.1, where the client is acting on behalf of a third party agent that only understands VOSpace 1.0. In this case, the client can use the information in the VOSpace 1.0 capability to direct the third party agent to the VOSpace 1.0 endpoint.
802 </p><p>
803 Other standard service interfaces will also be registered, e.g.
804 </p><ul>
805 <li> Cone Search
806 <li> SIAP
807 <li> SSAP
808 <li> TAP
809 </ul><p>
810 However, this is not intended to be a closed list and different implementations are free to define and use their own Capabilities.
811 </p>
812
813 <h3><a name="sec3_4">3.4 Views</a></h3>
814 <p>A View describes the data formats and contents available for importing or exporting data to or from a VOSpace node.
815 </p><p>
816 The metadata for a DataNode contains two lists of Views.
817 </p><ul>
818 <li> <i>accepts</i> is a list of Views that the service can accept for importing data into the Node
819 <li> <i>provides</i> is a list of Views that the service can provide for exporting data from Node
820 </ul><p>
821 A View representation SHALL have the following members:
822 </p><ul>
823 <li> <i>uri</i>: the View identifier
824 <li> <i>original</i>: an optional boolean flag to indicate that the View preserves the original bit pattern of the data
825 <li> <i>param</i>: a set of name-value pairs that can be used to
826 specify additional arguments for the View
827 </ul>
828
829 <h4><a name="sec3_4_1">3.4.1 Example use cases</a></h4>
830 <b>Simple file store</b>
831 <p>
832 A simple VOSpace system that stores data as a binary files can just return the contents of the original file. The client supplies a View identifier when it imports the data, and the service uses this information to describe the data to other clients.
833 </p><p>
834 A file based system can use the special case identifier 'ivo://ivoa.net/vospace/core#view­any' to indicate that it will accept any data format or
835 View for a Node.
836 </p><p>
837 For example:
838 </p><ul>
839 <li> A client imports a file into the service, specifying a View to describe the file contents
840 <li> The service stores the data as a binary file and keeps a record of the View
841 <li> The service can then use the View supplied by the client to describe the data to other clients
842 </ul><p>
843 This type of service is not required to understand the imported data, or to verify that it contents match the View, it treats all data as binary files.
844 </p>
845
846 <h5><a name="sec3_4_1_1">3.4.1.1 Database store</a></h5>
847 <p>A VOSpace system that stores data in database tables would need to be able to understand the data format of an imported file in order to parse the data and store it correctly. This means that the service can only accept a specific set of Views, or data formats, for importing data into the Node.
848 </p><p>
849 In order to tell the client what input data formats it can accept, the service publishes a list of specific Views in the accepts list for each Node.
850 </p><p>
851 On the output side, a database system would not be able to provide access to the original input file. The contents of file would have been transferred into the database table and then discarded. The system has to generate the output results from the contents of the database table.
852 </p><p>
853 In order to support this, the service needs to be able to tell the client what Views of the data are available.
854 </p><p>
855 A database system may offer access to the table contents as either VOTable or FITS files, it may also offer zip or tar.gz compressed versions of these. In which case the system needs to be able to express nested file formats such as 'zip containing VOTable' and 'tar.gz containing FITS'.
856 </p><p>
857 A service may also offer subsets of the data. For example, a work flow system may only want to look at the table headers to decide what steps are required to process the data. If the table contains a large quantity of data, then downloading the whole contents just to look at the header information is inefficient. To make this easier, a database system may offer a 'metadata only' View of the table, returning a VOTable or FITS file containing just the metadata headers and no rows.
858 </p><p>
859 So our example service may want to offer the following Views of a database table:
860 </p><ul>
861 <li> Table contents as FITS
862 <li> Table contents as VOTable
863
864 <li> Table contents as zip containing FITS
865 <li> Table contents as zip containing VOTable
866
867 <li> Table contents as tar.gz containing FITS
868 <li> Table contents as tar.gz containing VOTable
869
870 <li> Table metadata as FITS
871 <li> Table metadata as VOTable
872 </ul><p>
873 The service would publish this information as a list of Views in the provides section of the metadata for each Node.
874 </p><p>
875 The VOSpace specification does not mandate what Views a service must provide. The VOSpace specification is intended to provide a flexible mechanism enabling services to describe a variety of different Views of data. It is up to the service implementation to decide what Views of the data it can accept and provide.
876 </p>
877
878 <h4><a name="sec3_4_2">3.4.2 View identifiers</a></h4>
879 <p>Every new type of View SHALL require a unique URI to identify the View and its content.
880 </p><p>
881 The rules for the View identifiers are similar to the rules for namespace URIs in XML schema. The only restriction is that it SHALL be a valid (unique) URI.
882 </p><ul>
883 <li> An XML schema namespace identifier can be just a simple URN, e.g. urn:my­namespace
884 <li> Within the IVOA, the convention for namespace identifiers is to use a HTTP URL pointing to the namespace schema, or a resource describing it
885 </ul><p>
886 The current VOSpace schema defines View identifiers as anyURI. The only restriction is that it SHALL be a valid (unique) URI.
887 </p><ul>
888 <li> A View URI can be a simple URN, e.g. urn:my­view
889 </ul><p>
890 This may be sufficient for testing and development on a private system, but it is not scalable for use on a public service.
891 </p><p>
892 For a production system, any new Views SHOULD have unique URIs that can be resolved into to a description of the View.
893 </p><p>
894 Ideally, these should be IVO registry URIs that point to a description registered in the IVO registry:
895 </p><ul>
896 <li> ivo://my­registry/vospace/views#my­view
897 </ul><p>
898 Using an IVO registry URI to identify Views has two main advantages :
899 </p><ul>
900 <li> IVO registry URIs are by their nature unique, which makes it easy to ensure that different teams do not accidentally use the same URI
901 <li> If the IVO registry URI points to a description registered in the IVO registry, this provides a mechanism to discover what the View contains
902 </ul>
903
904 <h4><a name="sec3_4_3">3.4.3 View descriptions</a></h4>
905 <p>If the URI for a particular View is resolvable, i.e. an IVO registry identifier or a HTTP URL, then it SHOULD point to an XML resource that describes the View. </p>
906
907 <p>A ViewDescription SHOULD describe the data format and/or content of the view.</p>
908
909 <p>A ViewDescription SHOULD have the following members :
910 </p><ul>
911 <li> <i>Uri</i>: the formal URI of the View
912 <li> <i>DisplayName</i>: A simple text display name of the View
913 <li> <i>Description</i>: Text block describing the data format and content of the View
914 </ul>
915 <p>A ViewDescription MAY have the following optional members:</p>
916 <ul>
917 <li> MimeType : the standard MIME type of the View, if applicable
918 <li> Parameters : a list of required and option parameters the view accepts, if applicable
919 </ul><p>
920 However, at the time of writing, the schema for registering
921 ViewDescriptions in the IVO registry has not been finalized.</p>
922
923 <h5><a name="sec3_4_3_1">3.4.3.1 UI display name</a></h5>
924 <p>If a client is unable to resolve a View identifier into a description, then it MAY just display the identifier as a text string: </p>
925 <ul>
926 <li> Download as urn:table.meta.fits
927 </ul><p>
928 If the client can resolve the View identifier into a description, then the client MAY use the
929 information in the description to display a human readable name and description of the View:
930 </p><ul>
931 <li> Download table metadata as FITS header
932 </ul>
933 <h5><a name="sec3_4_3_2">3.4.3.2 MIME types</a></h5>
934 <p>If a VOSpace service provides HTTP access to the data contained in
935 a Node, then if the ViewDescription contains a MimeType field, this
936 SHOULD be included in the appropriate header field of the HTTP
937 response. </p>
938
939 <h4><a name="sec3_4_4">3.4.4 Default views</a></h4>
940 <p>The following standard URIs are registered under a StandardKeyEnumeration resource [VOStd] in the IVOA registry with the resource identifier ivo://ivoa.net/vospace/core. They SHALL be used to refer to the default import and export views:
941 </p><ul>
942 <li> ivo://ivoa.net/vospace/core#anyview SHALL be used as the view URI to indicate that a service will accept any view for an import operation
943 <li> ivo://ivoa.net/vospace/core#binaryview SHALL be used as the view URI to import or export data as a binary file
944 <li> ivo://ivoa.net/vospace/core#defaultview SHALL be used by a client to indicate that the service should choose the most appropriate view for a data export
945 </ul>
946
947 <h5><a name="sec3_4_4_1">3.4.4.1 Default import view</a></h5>
948 <p>If a client imports data using this view, the data SHALL be treated as a binary BLOB, and stored as is with no additional processing. This is equivalent to the application/binary MIME type.
949 </p><p>
950 Note, this view is OPTIONAL, and the service may throw a ViewNotSupported exception if it does not accept this view. In particular, this view cannot be used to import data into a StructuredDataNode as the service needs to know about and understand the data format to be able to create the StructuredDataNode.
951 </p><p>
952 Note, this view is only valid for the data import operations, pullToVoSpace and pushToVoSpace. If this view is requested in an export operation, pullFromVoSpace and pushToVoSpace, then the service SHOULD throw a ViewNotSupported exception.
953 </p>
954 <h5><a name="sec3_4_4_1">3.4.4.2 Default export view</a></h5>
955 <p>If a client requests data using this view, the server SHALL choose whichever of the available views (the server) thinks is the most appropriate, based on how the data is stored. In a simple file-based system, this will probably be the same format that the data was originally imported in. In a database table system, this will probably either be VOTable or CVS, depending on the level of metadata available.
956 </p><p>
957 Note, this view is OPTIONAL, and the server may throw a ViewNotSupported exception if it does not provide this view. However, in most cases, it is expected that a service would be able to select an appropriate 'default' format for data held
958 within the service.
959 </p><p>
960 Note, this view is only valid for the data export operations, pullFromVoSpace and pushFromVoSpace. If this view is requested in an import operation, pullToVoSpace and pushToVoSpace, then the service SHOULD throw a ViewNotSupported fault.
961 </p>
962 <h4><a name="sec3_4_5">3.4.5 Container views</a></h4>
963 <p>In VOSpace 2.1, a view of a ContainerNode describes the data representation (format) of a file or data stream that represents the combined contents of the node and its children. If the view describes an archive format (tar, zip, etc.) then a service that accepts this view (format) for a ContainerNode SHALL provide access to the archive contents as children nodes of the container. Whether or not the service actually unpacks the archive is implementation dependent but the service SHALL behave as though it has done so. For example, a client may want to upload a tar file containing several images to a VOSpace service. If they associate it with (upload it to) a (Un)structuredDataNode then it will be treated as a blob and its contents will be not be available. However, if they upload it to a ContainerNode with an accepts view of "tar" then the image files within the tar file will be represented as children nodes of the ContainerNode and accessible like any other data object within the space.
964 </p><p>
965 If a service provides an archive format (tar, zip, etc.) view of a ContainerNode then the service SHALL package the contents of the container and all its child nodes in the specified format.</p>
966 <h3><a name="sec3_5">3.5 Protocols</a></h3>
967 <p>A Protocol describes the parameters required to perform a data transfer using a particular protocol.
968 </p><p>
969 A Protocol representation SHALL have the following members:
970 </p><ul>
971 <li> <i>uri</i>: the Protocol identifier
972 <li> <i>endpoint</i>: the endpoint URL to use for the data transfer
973 additional arguments required for the transfer
974 </ul>
975 <p>A protocol representation MAY have the following members:
976 </p><ul>
977 <li> <i>param</i>: A list of name-value pairs that specify any
978 additional arguments requried for the transfer
979 <li> <i>authType</i> The requested type of authentication method
980 to be used
981 </ul>
982 <p>Note: <i>endpoint</i> will only contain a value after the response
983 from the service is received.
984 </p>
985 <h4><a name="sec3_2_3_1">3.5.1 Protocol identifiers</a></h4>
986 <p>Every new type of Protocol requires a unique URI to identify the Protocol and how to use it. </p>
987
988 <p>The rules for the Protocol identifiers are similar to the rules for namespace URIs in XML schema. The only restriction is that it SHALL be a valid (unique) URI </p><ul>
989
990 <li> An XML schema namespace identifier can be just a simple URN, e.g. urn:my­namespace
991 <li> Within the IVOA, the convention for namespace identifiers is to use a HTTP URL pointing to the namespace schema, or a resource describing it
992 </ul><p>
993 The current VOSpace schema defines Protocol identifiers as anyURI. The only restriction is that it SHALL be a valid (unique) URI.
994 </p><ul>
995 <li> A Protocol URI can be a simple URN, e.g. urn:my­protocol
996 </ul><p>
997 This may be sufficient for testing and development on a private system, but it is not scalable for use on a public service.
998 </p><p>
999 For a production system, any new Protocols SHOULD have unique URIs that can be resolved into to a description of the Protocol.
1000 </p><p>
1001 Ideally, these should be IVO registry URIs that point to a description registered in the IVO registry :
1002 </p><ul>
1003 <li> ivo://my­registry/vospace/protocols#my­protocol
1004 </ul><p>
1005 Using an IVO registry URI to identify Protocols has two main advantages:
1006 </p><ul>
1007 <li> IVO registry URIs are by their nature unique, which makes it easy to ensure that different teams do not accidentally use the same URI
1008 <li> If the IVO registry URI points to a description registered in the IVO registry, this provides a mechanism to discover how to use the Protocol
1009 </ul>
1010
1011 <h4><a name="sec3_5_2">3.5.2 Protocol descriptions</a></h4>
1012 <p>If the URI for a particular Protocol is resolvable, i.e. an IVO registry identifier or a HTTP URL, then it SHOULD point to an XML resource that describes the Protocol. </p>
1013
1014 <p>A ProtocolDescription SHOULD describe the underlying transport protocol, and how it should be used in this context. </p>
1015
1016 <p>A ProtocolDescription SHOULD have the following members:</p>
1017 <ul>
1018 <li> <i>uri</i>: the formal URI of the Protocol
1019 <li> <i>DisplayName</i>: A simple display name of the Protocol
1020 <li> <i>Description</i>: Text block describing describing the underlying transport protocol, and how it should be used in this context
1021 </ul><p>
1022 However, at the time of writing, the schema for registering ProtocolDescriptions in the IVO registry has not been finalized.
1023 </p>
1024 <h5><a name="sec3_5_2_1">3.5.2.1 UI display name</a></h5>
1025 <p>If a client is unable to resolve a Protocol identifier into a description, then it MAY just display the identifier as a text string:
1026 </p><ul>
1027 <li> Download using urn:my­protocol
1028 </ul><p>
1029 If the client can resolve the Protocol identifier into a description, then the client MAY use the information in the description to display a human readable name and description of the Protocol:
1030 </p><ul>
1031 <li> Download using standard HTTP GET
1032 </ul>
1033 <h4><a name="sec3_5_3">3.5.3 Standard protocols and authentication types</a></h4>
1034 <p>Protocol URIs and ProtocolDescriptions for the core set of standard transport protocols are registered under a StandardKeyEnumeration resource [VOStd] in the IVOA registry with the resource identifier ivo://ivoa.net/vospace/core. The following URIs SHALL be used to represent the standard protocols:</p>
1035 <ul>
1036 <li> ivo://ivoa.net/vospace/core#httpget SHALL be used as the protocol URI for a HTTP GET transfer
1037 <li> ivo://ivoa.net/vospace/core#httpput SHALL be used as the protocol URI for a HTTP PUT transfer
1038 </ul><p>
1039 <p>AuthenticationType URIs and AuthenticationTypeDescriptions for the core set of standard authentication types are registered under a StandardKeyEnumeration resource [VOStd] in the IVOA registry with the resource identifier ivo://ivoa.net/vospace/core. The following URIs SHALL be used to represent the standard authentication types:</p>
1040 <ul>
1041 <li> ivo://ivoa.net/vospace/core#anon SHALL be used as the authentication type URI for no client authentication
1042 <li> ivo://ivoa.net/vospace/core#httpauth SHALL be used as the authentication type URI for HTTP userid password authentication
1043 <li> ivo://ivoa.net/vospace/core#x509 SHALL be used as the authentication type URI for X.509 certificate authentication
1044 <li> ivo://ivoa.net/vospace/core#cookie SHALL be used as the authentication type URI for session-based cookie authentication
1045 </ul><p>
1046 However, this is not intended to be a closed list, different
1047 implementations are free to define and use their own transfer
1048 Protocols and authentication types.</p>
1049
1050 <h4><a name="sec3_5_4">3.5.4 Custom protocols</a></h4>
1051 <p>There are several use cases where a specific VOSpace implementation may want to define and use a custom VOSpace transfer Protocol, either extending an existing Protocol, or defining a new one. </p>
1052
1053 <h5><a name="sec3_5_4_1">3.5.4.1 SRB gateway</a></h5>
1054 <p>One example would be a VOSpace service that was integrated with a SRB system. In order to enable the service to use the native SRB transport protocol to transfer data, the service providers would need to register a new ProtocolDescription to represent the SRB transport protocol.
1055 </p><p>
1056 The ProtocolDescription would refer to the technical specification for the SRB transport protocol, and define how it should be used to transfer data to and from the VOSpace service.
1057 </p><p>
1058 Clients that do not understand the SRB transport protocol would not recognize the URI for the SRB Protocol, and would ignore Transfer options offered using this Protocol.
1059 </p><p>
1060 Clients that were able to understand the SRB transport protocol would recognize the URI for the SRB Protocol, and could use the 'srb://..' endpoint address in a Protocol option to transfer data using the SRB transport protocol.
1061 </p><p>
1062 Enabling different groups to define, register and use their own custom Protocols in this way means that support for new transport protocols can be added to VOSpace systems without requiring changes to the core VOSpace specification.
1063 </p><p>
1064 In this particular example, it is expected that one group within the IVOA will work with the SRB team at SDSC to define and register the Protocol URI and ProtocolDescription for using the SRB protocol to transfer data to and from VOSpace systems. </p><p>
1065 Other implementations that plan to use the SRB transport protocol in the same way could use the same Protocol URI and ProtocolDescription to describe data transfers using the SRB transport protocol.
1066 </p><p>
1067 The two implementations would then be able use the common Protocol URI
1068 to negotiate data transfers using the SRB transport protocol.
1069 </p>
1070
1071 <h5><a name="sec3_5_4_2">3.5.4.2 Local NFS transfers</a></h5>
1072 <p>Another example of a custom Protocol use case would to transfer data using the local NFS file system within an institute.
1073 </p><p>
1074 If an institute has one or more VOSpace services co-located with a number of data processing applications, all located within the same local network, then it would be inefficient to use HTTP GET and PUT to transfer the data between the services if they could all access the same local file system.
1075 </p><p>
1076 In this case, the local system administrators could register a custom ProtocolDescription which described how to transfer data using their local NFS file system.
1077 </p><ul>
1078 <li> ivo://my.institute/vospace/protocols#internal­nfs
1079 </ul><p>
1080 Data transfers using this Protocol would be done using file:// URLs pointing to locations within the local NFS file system:
1081 </p><ul>
1082 <li> file:///net/host/path/file
1083 </ul><p>
1084 These URLs would only have meaning to services and applications located within the local network, and would not be usable from outside the network.
1085 </p><p>
1086 Services and applications located within the local network would be configured to recognize the custom Protocol URI, and to use local file system operations to move files within the NFS file system.
1087 </p><p>
1088 Services and applications located outside local network would not recognize the custom Protocol URI and so would not attempt to use the internal file URLs to transfer data.
1089 </p><p>
1090 Note that in this example the custom Protocol URI and the associated ProtocolDescription refer to data transfers using file URLs within a specific local NFS file system.
1091 </p><p>
1092 If a different institute wanted to use a similar system to transfer data within their own local network, then they would have to register their own custom Protocol URI and associated ProtocolDescription.
1093 </p><p>
1094 The two different Protocol URIs and ProtocolDescriptions describe how to use the same underlying transport protocol (NFS) in different contexts.
1095 </p><p>
1096 Enabling different groups to define, register and use their own custom
1097 Protocols in this way means that systems can be configured to use the
1098 best available transport protocols for transferring data, without
1099 conflicting with other systems who may be using similar a transport
1100 protocol in a different context.
1101 </p>
1102 <h3><a name="sec3_6">3.6 Transfers</a></h3>
1103 <p>A Transfer describes the details of a data transfer to or from a
1104 space.
1105 </p><p>
1106 A UWS Job representation [UWS] of a Transfer SHALL have the following parameters:
1107 </p><ul>
1108 <li> <i>target</i>: denotes the VOSpace node to/from which data is to be transferred
1109 <li> <i>direction</i>: denotes the direction of a data transfer
1110 <ul><li> It can be a URI for internal data transfers (move and copy operations) or one of: pushToVoSpace, pullToVoSpace, pushFromVoSpace or pullFromVoSpace - for an external data transfer.</ul>
1111 <li> <i>view</i>: denotes the requested View
1112 <ul><li> For the transfer to be valid, the specified View must match
1113 one of those listed in the accepts or provides list of the Node.
1114 <li>For an internal data transfer, this parameter is not required.</ul>
1115 <li> <i>protocol</i>: denotes the transfer protocol(s) to use
1116 <ul><li> A transfer may contain more than one protocol with different
1117 Protocol URIs.
1118 <li> For an internal data transfer, this parameter is not required.
1119 </ul>
1120 <li> <i>keepBytes</i>: denotes whether the source object is to be kept
1121 in an internal data transfer, i.e. distinguishes between a move and a copy
1122 <ul><li> For an external data transfer, this parameter is not required.</ul>
1123 </ul>
1124 <p>This representation will be used as a child of the <i>jobInfo</i>
1125 element in a UWS Job representation.</p>
1126
1127
1128 <p>The representation of the results of a Transfer SHALL have the following members:
1129 </p><ul>
1130 <li> <i>target</i>: denotes the VOSpace node to/from which data is to be transferred
1131 <li> <i>direction</i>: denotes the direction of a data transfer
1132 <ul><li> It can be a URI for internal data transfers (move and copy operations) or one of: pushToVoSpace, pullToVoSpace, pushFromVoSpace or pullFromVoSpace - for an external data transfer.</ul>
1133 <li> <i>view</i>: A View specifying the requested View
1134 <ul><li> For the transfer to be valid, the specified View must match
1135 one of those listed in the accepts or provides list of the Node
1136 <li>For an internal data transfer, this parameter is not required.</ul>
1137 <li> <i>protocol</i>: one or more Protocols specifying the transfer protocols to use
1138 <ul><li> A Transfer may contain more than one Protocol element with different Protocol URIs
1139 <li> A Transfer may contain more than one Protocol element with the
1140 same Protocol URI with different endpoints
1141 <li>For an internal data transfer, this parameter is not required.</ul></ul>
1142
1143
1144
1145 <h4><a name="sec3_6_1">3.6.1 Service-initiated transfers</a></h4>
1146 <p>Two of the external data transfers (pullToVoSpace and pushFromVoSpace) rely on the server performing the data transfer itself.
1147 </p><p>
1148 The client constructs a Job request containing details of the View and one or more Protocol elements with valid endpoint addresses.
1149 </p><p>
1150 The service MAY ignore Protocols with URIs that it does not recognize.
1151 </p><p>
1152 If the server is unable to handle any of the requested Protocols in a Transfer request, then it SHALL respond with a fault.
1153 </p><p>
1154 The order of the Protocols in the request indicates the order of preference that the client would like the server to use. However, this is only a suggestion, and the server is free to use its own preferences to select which Protocol it uses first.
1155 </p><p>
1156 The service selects the first Protocol it wants to use from the list and attempts to transfer the data using the Protocol endpoint.
1157 </p><p>
1158 If the first attempt fails, the server may choose another Protocol from the list and re-try the transfer using that Protocol endpoint. The status flag will be updated to reflect this.
1159 </p><p>
1160 The server may attempt to transfer the data using any or all of the Protocols in the list until either, the data transfer succeeds, or there are no more Protocol options left.
1161 </p><p>
1162 The server SHALL be allowed to only use each Protocol option once. This allows a data source to issue one time URLs for a Transfer, and cancel each URL once it has been used.
1163 </p><p>
1164 Once one of the Protocol options succeeds the transfer SHALL be considered to have completed - the status flag needs to be updated to reflect this -, and the server is not allowed to use any of the remaining Protocol options. This allows a data source to issue a set of one time URLs for a transfer, and to cancel any unused URLs once the transfer has been completed.
1165 </p><p>
1166 Some Protocols MAY require the service to call a callback address when a data transfer completes. This behavior is specific to the Protocol, and SHOULD be defined in the ProtocolDescription.
1167 </p><p>
1168 If none of the Protocol options succeed, then the transfer SHALL be considered to have failed, and the service SHALL return a fault containing details of the Protocol options it tried. The status flag will be updated to reflect this.
1169 </p>
1170 <h4><a name="sec3_6_2">3.6.2 Client-initiated transfers</a></h4>
1171 <p>Two of the VOSpace external transfer methods rely on an external actor performing the data transfer outside the scope of the service call.
1172 </p><p>
1173 In these methods, the client sends a Job request to the server which SHOULD contain details of the View and one or more protocol parameters.
1174 </p><p>
1175 In effect, the client is sending a list of Protocols that it (the client) wants to use for the transfer.
1176 </p><p>
1177 The service MAY ignore Protocols with URIs that it does not recognize.
1178 </p><p>
1179 The service selects the Protocols from the request that it is capable of handling, and builds a Transfer results response containing the selected Protocol elements filling in valid endpoint addresses for each of them.
1180 </p><p>
1181 If available, the service may choose to consult the authType in the Protocols to construct correct endpoints.
1182 </p><p>
1183 The order of the Protocol elements in the request indicates the order of preference that the client would like to use. However, this is only a suggestion, and the server is free to use its own preferences when generating the list of Protocols in the response.
1184 </p><p>
1185 In effect, the server is responding with the subset of the requested Protocols that it (the server) is prepared to offer.
1186 </p><p>
1187 If the server is unable to accept any of the requested Protocols, then it SHALL respond with a fault.
1188 </p><p>
1189 On receipt of the response, the client can use the list of Protocols itself, or pass them on to another agent to perform the data transfer on its behalf.
1190 </p><p>
1191 The agent MAY ignore Protocols URIs that it does not recognize.
1192 </p><p>
1193 The agent selects the first Protocol it wants to use from the list and attempts to transfer the data using the Protocol endpoint. The status flag will be updated to reflect this.
1194 </p><p>
1195 If the first attempt fails, the agent MAY choose another Protocol from the list and re-try the transfer using that Protocol endpoint.
1196 </p><p>
1197 The agent MAY attempt to transfer the data using any or all of the Protocols in the list until either, the data transfer succeeds, or there are no more Protocol options left.
1198 </p><p>
1199 The agent SHALL be allowed to only use each Protocol option once. This allows a data source to issue one time URLs for a Transfer, and cancel each URL once it has been used.
1200 </p><p>
1201 Once one of the Protocol options succeeds the transfer SHALL be considered to have completed and the status flag will be updated correspondingly. The agent is not allowed to use any of the remaining unused Protocol options. This allows a data source to issue a set of one time URLs for a transfer, and to cancel any unused URLs once the transfer has been completed.
1202 </p><p>
1203 Some Protocols MAY require the agent to call a callback address when a data transfer completes. This behavior is specific to the Protocol, and SHOULD be defined in the ProtocolDescription.
1204 </p><p>
1205 If none of the Protocol options succeed, then the transfer SHALL be
1206 considered to have failed and the status will be updated. </p>
1207
1208 <h3><a name="sec3_7">3.7 Searches</a></h3>
1209 <p>A Search describes the details of data objects in the space which
1210 meet specified search criteria, i.e. that are the results of a
1211 submitted search request.</p>
1212 <p>
1213 A UWS Job representation of a Search SHALL have the following parameters:
1214 </p><ul>
1215 <li> <i>uri</i>: An OPTIONAL identifier indicating from which item to
1216 continue a search
1217 <li> <i>limit</i>: An OPTIONAL limit indicating the maximum number of results in the response
1218 <ul><li> No limit indicates a request for an unpaged list. However the server MAY still impose its own limit on the size of an individual response, splitting the results into more than one page if required</ul>
1219 <li> <i>detail</i>: The level of detail in the results
1220 <ul><li> min : The list contains the minimum detail for each Node with all optional parts removed - the node type should be returned
1221 <ul><li> e.g. &lt;node uri="vos://service/name" xsi:type="Node"/></ul>
1222 <li> max : The list contains the maximum detail for each Node, including any xsi:type specific extensions
1223 <li> properties : The list contains a basic node element with a list of properties for each Node with no xsi:type specific extensions. </ul>
1224 <li> <i>matches</i>: An OPTIONAL search string consisting of
1225 properties and values to match against and joined in conjunction (and) or disjunction (or).
1226 <ul><li>Each property-value pair consists of the uri identifying a
1227 particular property and a regular expression against which the
1228 property values are to be matched: 'uri' = 'regex'
1229 <li> The match pairs can be combined in conjunction and/or disjunction
1230 using 'and' and 'or' respectively. For example: "(property1 =
1231 'value1' and property2 = 'value2') or property3 = 'value3'".
1232 <li> The regex syntax SHALL comply with POSIX conventions.</ul>
1233 <li> <i>node </i>: An OPTIONAL URI(s) identifying the starting node
1234 for a search, i.e., the <i>matches</i> constraints are applied to this
1235 node and its children</ul>
1236 <p>This representation will be used as a child of the <i>jobInfo</i>
1237 element in a UWS Job representation. For example:</p>
1238 <pre>
1239 &lt;uws:jobInfo>
1240 &lt;vos:search>
1241 &lt;vos:detail>properties&lt;/vos:detail>
1242 &lt;vos:matches>ivo://ivoa.net/vospace/core#description='galax'&lt;/vos:matches>
1243 &lt;vos:search>
1244 &lt;uws:jobInfo>
1245 </pre>
1246
1247
1248 <p>The representation of the results of a Search SHALL have the
1249 following members:</p>
1250 <ul><li> <i>nodes</i>: A list containing zero or more Nodes of appropriate
1251 detail identifying the target URIs meeting the search criteria </ul>
1252 </ul>
1253
1254 <h3><a name="sec3_8">3.8 REST bindings</a></h3>
1255 <p>In a REST (Representational State Transfer) binding of VOSpace, each of the objects defined below is available as a web resource with its own URI. </p>
1256 </p>
1257 <table>
1258 <tr>
1259 <td>/properties</td><td>the properties employed in the space</td></tr>
1260 <tr><td>/views</td><td>the views employed in the space</td></tr>
1261 <tr><td>/protocols</td><td>the protocols employed in the space</td></tr>
1262 <tr><td>/searches</td><td>the searches of the space</td></tr>
1263 <tr><td>/nodes/(node-path)</td><td>a Node under the nodes of the space</td></tr>
1264 <tr><td>/transfers</td><td>the transfers for the space</td></tr>
1265 <tr><td>/transfers/(job-id)/results/transferDetails</td><td>the transfer details for
1266 synchronous jobs</td></tr>
1267 </table>
1268 <p>
1269 The service implementor is free to choose the names given in
1270 parentheses above; the other names are part of the VOSpace 2.0
1271 standard.
1272 </p><p>
1273 The endpoint /sync is also defined to receive HTTP POST requests of
1274 synchronous transfer jobs. This should respond with a redirect to the transfer
1275 details for synchronous jobs resource: http://rest-endpoint/transfers/(jobid)/results/transferDetails. Synchronous transfers are
1276 limited to pushToVoSpace and pullFromVoSpace operations only where the
1277 client is requesting endpoint URLs where it can read or write data.
1278 </p><p>
1279 As an optimization, the /sync endpoint should support parameter-based
1280 HTTP POST transfer requests. Instead of returning a redirect to the transfer details,
1281 the parameter-based request to /sync returns the transferDetails document itself.
1282 As a further optimzation, if the parameter name value pair REQUEST=redirect is supplied,
1283 the /sync endpoint should issue a redirect to the first transfer endpoint that would been
1284 contained in the transfer details. In the case of an error with the optimized
1285 transfers, clients may wish to fall back to the HTTP POST to /sync and step through
1286 the entire transfer negotiation.
1287 </p><p>
1288 In addition, the following Nodes, appearing as part of a
1289 node-path, are reserved:
1290 </p>
1291 <ul>
1292 <li> .auto indicates that the service should auto-generate an endpoint
1293 URI to replace this placeholder (Note: that this is an OPTIONAL
1294 feature of a service)
1295 <li> .null indicates an endpoint that discards all data
1296 written to it and provides no data when read from, i.e. a bit
1297 bucket
1298 </ul>
1299 <p>
1300 The standardID for the service is:
1301 ivo://ivoa.net/std/VOSpace/v2.0. Available resources will then just be
1302 ivo://ivoa.net/std/VOSpace/v2.0#&lt;resourceName>, e.g., ivo://ivoa.net/std/VOSpace/v2.0#nodes.
1303 </p>
1304 <br/>
1305 <h2><a name="sec4">4 Access Control</a></h2>
1306 <p>
1307 VOSpace implementations may support any of the following authentication methods:
1308 <ul>
1309 <li>no authentication (anonymous clients)</li>
1310 <li>digital signatures with X.509 client certificates</li>
1311 <li>user ID and password HTTP authentication</li>
1312 <li>cookies</li>
1313 </ul>
1314 When a client is requesting a transfer from the service, the authentication type (authType) may be supplied along side the list of transfer protocols.
1315 If the service supports the requested authentication type, it may use the authType information to construct the endpoint URL for data transfer, for services may
1316 encounter situations when the URL for data transfer will depend on the authentication type the client wished to use.
1317 </p><p>
1318 The access control policy for a VOSpace is defined by the implementor of that space according to the use cases for which the implementation is intended.
1319 </p><p>
1320 A human-readable description of the implemented access policy must be declared in the registry metadata for the space.
1321 </p><p>
1322 These are the most probable access policies:
1323 </p><ul>
1324 <li> No access control is asserted. Any client can create, read, write and delete nodes anonymously
1325 <li> No authorization is required, but clients must authenticate an identity (for logging purposes) in each request to the space
1326 <li> Clients may not create or change nodes (i.e. the contents of the space are fixed by the implementation or set by some interface other than VOSpace), but any client can read any node without authentication
1327 <li> Nodes are considered to be owned by the user who created them. Only the owner can operate on a node
1328 </ul><p>
1329 No operations to modify the access policy (e.g. to set permissions on an individual node) are included in this standard. Later versions may add such operations. </p><p>
1330 Where the access policy requires authentication of callers, the VOSpace service SHALL support one of the authentication methods defined in the IVOA Single Sign On profile. </p>
1331 <br/>
1332 <h2><a name="sec4">5 Web service operations</a></h2>
1333 <p>A VOSpace 2.1 service SHALL be a REST service with the following operations:
1334 </p><p>
1335 Note: The URL http://(rest-endpoint)/nodes denotes the URL of the top node in the VOSpace. The URL http://(rest-endpoint)/nodes/(path) denotes a specific node within the VOSpace.
1336 </p><p>
1337 Note: When representing a Fault, the exact specified fault name SHALL
1338 be used. If this is followed by some details, the fault SHALL be
1339 separated from the subsequent characters by whitespace.
1340 </p>
1341 <p>
1342 Note: If the service is able to detect an internal system failure
1343 (associated with an HTTP 500 status code) then it should indicate this
1344 as described below if possible.
1345 </p>
1346 <h3><a name="sec5_1">5.1 Service metadata</a></h3>
1347 <p>These operations return comprehensive lists of service-level
1348 metadata, e.g. all protocols supported by the service. Individual
1349 nodes within a service, however, may not necessarily support all of
1350 these, i.e. only container nodes may support archive formats such as
1351 zip or tar.
1352 </p>
1353 <h4><a name="sec5_1_1">5.1.1 getProtocols</a></h4>
1354 <p>Get a list of the transfer Protocols supported by the space
1355 service</p>
1356 <h5><a name="sec5_1_1_1">5.1.1.1 Request</a></h5>
1357 <ul><li>A HTTP GET to http://rest-endpoint/protocols</ul>
1358 <h5><a name="sec5_1_1_2">5.1.1.2 Response</a></h5>
1359 <ul><li> A HTTP 200 status code
1360 <li> A Protocols representation giving:
1361 <ul><li> accepts: A list of Protocols that the service SHALL accept
1362 <ul><li> In this context 'accepting a protocol' means that the service SHALL act as a client for the protocol
1363 <li> e.g. 'accepting httpget' means the service can read data from an external HTTP web server </ul>
1364 <li> provides: A list of Protocols that the service SHALL provide
1365 <ul><li> In this context 'providing a protocol' means that the service SHALL act as a server for the protocol
1366 <li> e.g. 'providing httpget' means the service can act as a http web server </ul>
1367 </ul>
1368 </ul>
1369 <h5><a name="sec5_1_1_3">5.1.1.3 Faults</a></h5>
1370 <ul>
1371 <li> The service SHOULD throw a HTTP 500 status code including an InternalFault fault in the entity body if the operation fails
1372 </ul>
1373 <!-- 5.1.1.4 Example -->
1374 <div class="exampleOuter">
1375 <div class="exampleHeader">Example: getProtocols</div>
1376 <div class="exampleWrapper">
1377 <pre>> <b>curl -v http://localhost:8000/vospace-2.0/protocols</b></pre>
1378 </div><div class="exampleInner" style="background-color: rgb(213, 222, 227);">
1379 <pre>* Connected to localhost (127.0.0.1) port 8000 (#0)
1380 > GET /protocols HTTP/1.1
1381 > User-Agent: curl/7.19.4 (universal-apple-darwin10.0) libcurl/7.19.4 OpenSSL/0.9.8l zlib/1.2.3
1382 > Host: localhost:8000
1383 > Accept: */*
1384 >
1385 < HTTP/1.1 200 OK
1386 < Date: Tue, 09 Mar 2010 04:59:12 GMT
1387 < Content-Length: 309
1388 < Content-Type: text/html
1389 < Allow: GET, HEAD, POST, PUT
1390 < Server: CherryPy/3.1.2
1391 <
1392 &lt;protocols xmlns="http://www.ivoa.net/xml/VOSpace/v2.0">
1393 &lt;accepts>
1394 &lt;protocol uri="ivo://ivoa.net/vospace/core#httpget"/>
1395 &lt;protocol uri="ivo://ivoa.net/vospace/core#httpput"/>
1396 &lt;/accepts>
1397 &lt;provides>
1398 &lt;protocol uri="ivo://ivoa.net/vospace/core#httpget"/>
1399 &lt;protocol uri="ivo://ivoa.net/vospace/core#httpput"/>
1400 &lt;/provides>
1401 &lt;/protocols>
1402 * Connection #0 to host localhost left intact
1403 * Closing connection #0</pre>
1404 </div></div>
1405 <h4><a name="sec5_1_2">5.1.2 getViews</a></h4>
1406 <p>Get a list of the <i>Views</i> and data formats supported by the
1407 space service</p>
1408 <h5><a name="sec5_1_2_1">5.1.2.1 Request</a></h5>
1409 <ul><li> A HTTP GET to http://rest-endpoint/views
1410 </ul>
1411 <h5><a name="sec5_1_2_2">5.1.2.2 Response</a></h5>
1412 <ul><li> A HTTP 200 status code
1413 <li> A Views representation giving:
1414 <ul><li> <i>accepts</i>: A list of Views that the service SHALL accept
1415 <ul><li> In this context 'accepting a view' means that the service SHALL receive input data in this format
1416 <li> A simple file based system may use the reserved View URI ivo://net.ivoa.vospace/views/any to indicate that it can accept data in any format </ul>
1417 <li><i>provides</i>: A list of Views that the service SHALL provide
1418 <ul><li> In this context 'providing a view' means that the service SHALL produce output data in this format
1419 <li> A simple file based system may use the reserved View URI ivo://net.ivoa.vospace/views/any to indicate that it can provide data in any format
1420 </ul></ul>
1421 </ul>
1422 <h5><a name="sec5_1_2_3">5.1.2.3 Faults</a></h5>
1423 <ul>
1424 <li> The service SHOULD throw a HTTP 500 status code including an InternalFault fault in the entity body if the operation fails
1425 </ul>
1426 <!-- 5.1.2.4 Example -->
1427 <div class="exampleOuter">
1428 <div class="exampleHeader">Example: getViews</div>
1429 <div class="exampleWrapper">
1430 <pre>
1431 > <b>curl -v "http://localhost:8000/views"</b></pre>
1432 </div><div class="exampleInner" style="background-color: rgb(213, 222, 227);">
1433 <pre>* Connected to localhost (127.0.0.1) port 8000 (#0)
1434 > GET /views HTTP/1.1
1435 > User-Agent: curl/7.19.4 (universal-apple-darwin10.0) libcurl/7.19.4 OpenSSL/0.9.8l zlib/1.2.3
1436 > Host: localhost:8000
1437 > Accept: */*
1438 >
1439 < HTTP/1.1 200 OK
1440 < Date: Tue, 09 Mar 2010 19:36:17 GMT
1441 < Content-Length: 181
1442 < Content-Type: text/html
1443 < Allow: GET, HEAD, POST, PUT
1444 < Server: CherryPy/3.1.2
1445 <
1446 &lt;views xmlns="http://www.ivoa.net/xml/VOSpace/v2.0">
1447 &lt;accepts>
1448 &lt;view uri="ivo://ivoa.net/vospace/core#anyview"/>
1449 &lt;/accepts>
1450 &lt;provides>
1451 &lt;view uri="ivo://ivoa.net/vospace/core#defaultview"/>
1452 &lt;/provides>
1453 &lt;/views>
1454 * Connection #0 to host localhost left intact
1455 * Closing connection #0
1456 </pre>
1457 </div></div>
1458 <h4><a name="sec5_1_3">5.1.3 getProperties</a></h4>
1459 <h5><a name="sec5_1_3_1">5.1.3.1 Request</a></h5>
1460 <ul><li> A HTTP GET to http://rest-endpoint/properties
1461 </ul>
1462 <h5><a name="sec5_1_3_2">5.1.3.2 Response</a></h5>
1463 <ul><li> A HTTP 200 status code
1464 <li> A Properties representation including:
1465 <ul><li> <i>accepts</i>: A list of identifiers for the Properties that the service SHALL accept and understand. This refers to metadata (Properties) that is implementation dependent but can be used by a client to control operational aspects of the service: for example, a VOSpace implementation might allow individual users to control the permissions on data objects via a Property called "permissions". If the VOSpace receives a data object with this Property then it 'understands' what this property refers to and can deal with it accordingly.
1466 <li> <i>provides</i>: A list of identifiers for the Properties that the service SHALL provide
1467 <li> <i>contains</i>: A list of identifiers for all the Properties currently used by Nodes within the service
1468 </ul>
1469 </ul>
1470 <h5><a name="sec5_1_3_3">5.1.3.3 Faults</a></h5>
1471 <ul><li> The service SHOULD throw a HTTP 500 status code including an InternalFault fault in the entity body if the operation fails
1472 </ul>
1473 <!-- 5.1.3.4 Example -->
1474 <div class="exampleOuter">
1475 <div class="exampleHeader">Example: getProperties</div>
1476 <div class="exampleWrapper">
1477 <pre>
1478 > <b>curl -v "http://localhost:8000/properties"</b></pre>
1479 </div><div class="exampleInner" style="background-color: rgb(213, 222, 227);">
1480 <pre>* Connected to localhost (127.0.0.1) port 8000 (#0)
1481 > GET /properties HTTP/1.1
1482 > User-Agent: curl/7.19.4 (universal-apple-darwin10.0) libcurl/7.19.4 OpenSSL/0.9.8l zlib/1.2.3
1483 > Host: localhost:8000
1484 > Accept: */*
1485 >
1486 < HTTP/1.1 200 OK
1487 < Date: Tue, 09 Mar 2010 19:43:23 GMT
1488 < Content-Length: 644
1489 < Content-Type: text/html
1490 < Allow: GET, HEAD, POST, PUT
1491 < Server: CherryPy/3.1.2
1492 <
1493 &lt;properties xmlns="http://www.ivoa.net/xml/VOSpace/v2.0">
1494 &lt;accepts>
1495 &lt;property uri="ivo://ivoa.net/vospace/core#title"/>
1496 &lt;property uri="ivo://ivoa.net/vospace/core#creator"/>
1497 &lt;property uri="ivo://ivoa.net/vospace/core#description"/>
1498 &lt;/accepts>
1499 &lt;provides>
1500 &lt;property uri="ivo://ivoa.net/vospace/core#availableSpace"/>
1501 &lt;property uri="ivo://ivoa.net/vospace/core#httpput"/>
1502 &lt;/provides>
1503 &lt;contains>
1504 &lt;property uri="ivo://ivoa.net/vospace/core#availableSpace"/>
1505 &lt;property uri="ivo://ivoa.net/vospace/core#title"/>
1506 &lt;property uri="ivo://ivoa.net/vospace/core#creator"/>
1507 &lt;property uri="ivo://ivoa.net/vospace/core#description"/>
1508 &lt;/contains>
1509 &lt;/properties>
1510 * Connection #0 to host localhost left intact
1511 * Closing connection #0
1512 </pre>
1513 </div></div>
1514 <h3><a name="sec5_2">5.2 Creating and manipulating data nodes</a></h3>
1515
1516 <h4><a name="sec5_2_1">5.2.1 createNode</h4>
1517 <p>Create a new node at a specified location</p>
1518 <h5><a name="sec5_2_1_1">5.2.1.1 Request</a></h5>
1519 <ul><li> A HTTP PUT of a node representation to the node URL:
1520 <ul><li> <i>node</i>: A template Node (as defined in Section 3.1) for the node to be created
1521 </ul></ul><p>
1522 A valid uri attribute SHALL be required. The name .auto is a reserved URI to indicate an auto-generated URI for the destination, i.e. given the following URI vos://service/path/.auto a service SHALL create a new unique URI for the node within vos://service/path.
1523 </p><p>
1524 If the Node xsi:type is not specified then a generic node of type Node is implied.
1525 </p><p>
1526 The permitted values of xsi:type are:
1527 </p><ul>
1528 <li> vos:Node
1529 <li> vos:DataNode
1530 <li> vos:UnstructuredDataNode
1531 <li> vos:StructuredDataNode
1532 <li> vos:ContainerNode
1533 <li> vos:LinkNode
1534 </ul><p>
1535 When creating a new Node the service MAY substitute a valid subtype, i.e. If xsi:type is
1536 set to vos:DataNode then this may be implemented as a DataNode, StructuredDataNode
1537 or an UnstructuredDataNode.
1538 </p><p>
1539 The properties of the new Node can be set by adding Properties to the template.
1540 Attempting to set a Property that the service considers to be 'readOnly' SHALL cause a
1541 PermissionDenied fault.
1542 The accepts and provides lists of Views for the Node cannot be set using this method.
1543 </p><p>
1544 The capabilities list for the Node cannot be set using this method.
1545 </p>
1546 <h5><a name="sec5_2_1_2">5.2.1.2 Response</a></h5>
1547 <ul><li> A HTTP 201 status code
1548 <li> A node representation including
1549 <ul><li> <i>node</i>: details of the new Node
1550 </ul></ul><p>
1551 The <i>accepts</i> list of Views for the Node SHALL be filled in by the service based on service
1552 capabilities.
1553 </p><p>
1554 The <i>provides</i> list of Views for the Node MAY not be filled in until some data has been
1555 imported into the Node.
1556 </p><p>
1557 The <i>capabilities</i> list for the Node MAY not be filled in until some data has been imported into the Node.
1558 </p>
1559 </ul>
1560 <h5><a name="sec5_2_1_3">5.2.1.3 Faults</a></h5>
1561 <ul><li> The service SHOULD throw a HTTP 500 status code including an InternalFault fault in the entity body if the operation fails
1562 <li> The service SHALL throw a HTTP 409 status code including a DuplicateNode fault in the entity body if a Node already exists with the same URI
1563 <li> The service SHALL throw a HTTP 400 status code including an InvalidURI fault in the entity body if the requested URI is invalid
1564 <li> The service SHALL throw a HTTP 400 status code including a TypeNotSupported fault in the entity body if the type specified in xsi:type is not supported
1565 <li> The service SHALL throw a HTTP 401 status code including PermissionDenied fault in the entity body if the user does not have permissions to perform the operation
1566 <li> If a parent node in the URI path does not exist then the service SHALL throw a HTTP 404 status code including a ContainerNotFound fault in the entity body.
1567 <ul><li> For example, given the URI path /a/b/c, the service must
1568 throw a HTTP 404 status code including a ContainerNotFound fault in
1569 the entity body if either /a or /a/b do not exist. </ul>
1570 <li> If a parent node in the URI path is a LinkNode, the service SHALL throw a HTTP 400 status code including a LinkFound fault in the entity body.
1571 <ul><li> For example, given the URI path /a/b/c, the service must throw a HTTP 400 status code including a LinkFound fault in the entity body if either /a or /a/b are LinkNodes.
1572 </ul>
1573 </ul>
1574 <!-- 5.2.1.4 Example -->
1575 <div class="exampleOuter">
1576 <div class="exampleHeader">Example: createNode</div>
1577 <div class="exampleWrapper">
1578 <p>The node to be created (newNode.xml) is:</p>
1579 <pre>
1580 &lt;node xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="vos:UnstructuredDataNode"
1581 xmlns="http://www.ivoa.net/xml/VOSpace/v2.0" uri="vos://nvo.caltech!vospace/mydata1">
1582 &lt;properties>
1583 &lt;property uri="ivo://ivoa.net/vospace/core#description">My important results&lt;/property>
1584 &lt;/properties>
1585 &lt;accepts/>
1586 &lt;provides/>
1587 &lt;capabilities/>
1588 &lt;/node>
1589 </pre>
1590 <pre>
1591 > <b>curl -v -X PUT -d @newNode.xml "http://localhost:8000/nodes/mydata1"</b></pre></div><div class="exampleInner" style="background-color: rgb(213, 222, 227);"><pre>
1592 * Connected to localhost (127.0.0.1) port 8000 (#0)
1593 > PUT /nodes/mydata1 HTTP/1.1
1594 > User-Agent: curl/7.19.4 (universal-apple-darwin10.0) libcurl/7.19.4 OpenSSL/0.9.8l zlib/1.2.3
1595 > Host: localhost:8000
1596 > Accept: */*
1597 > Content-Length: 267
1598 > Content-Type: application/x-www-form-urlencoded
1599 >
1600 < HTTP/1.1 200 Created
1601 < Date: Wed, 10 Mar 2010 00:10:27 GMT
1602 < Content-Length: 323
1603 < Content-Type: text/html
1604 < Allow: GET, HEAD, POST, PUT
1605 < Server: CherryPy/3.1.2
1606 <
1607 * Connection #0 to host localhost left intact
1608 * Closing connection #0
1609 &lt;node xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
1610 xmlns="http://www.ivoa.net/xml/VOSpace/v2.0" xsi:type="vos:UnstructuredDataNode"
1611 uri="vos://nvo.caltech!vospace/mydata1">
1612 &lt;properties>
1613 &lt;property uri="ivo://ivoa.net/vospace/core#description">My important results&lt;/property>
1614 &lt;/properties>
1615 &lt;accepts>
1616 &lt;view uri="ivo://ivoa.net/vospace/core#anyview"/>
1617 &lt;/accepts>
1618 &lt;provides/>
1619 &lt;capabilities/>
1620 &lt;/node>
1621 </pre>
1622 </div></div>
1623 <h4><a name="sec5_2_2">5.2.2 moveNode</h4>
1624 <p>Move a node within a VOSpace service.
1625 </p><p>
1626 Note that this does not cover moving data between two separate VOSpace services.
1627 </p><p>
1628 Moving nodes between separate VOSpace services SHOULD be handled by the client, using the import, export and delete methods.
1629 </p><p>
1630 When the source is a ContainerNode, all its children (the contents of the container) SHALL also be moved to the new destination.
1631 </p><p>
1632 When the destination is an existing ContainerNode, the source SHALL be placed under it (i.e. within the container).
1633 </p>
1634 <p>The <i>Node</i> type cannot be changed using this method.</p>
1635
1636 <h5><a name="sec5_2_2_1">5.2.2.1 Request</a></h5>
1637 <ul><li> A HTTP POST of a Job representation for the transfer (see
1638 section 3.6) to http://rest-endpoint/transfers.
1639 </ul><p>
1640 .auto is a reserved URI to indicate an autogenerated URI for the destination, i.e. vos://service/path/.auto SHALL cause a new unique URI for the node within vos://service/path to be generated.
1641 </p>
1642 <h5><a name="sec5_2_2_2">5.2.2.2 Response</a></h5>
1643 <ul><li>The initial response is a HTTP 303 status code with the
1644 Location header keyword assigned to the created job.</li></ul>
1645 <p>If an autogenerated URI for the destination was specified in the
1646 request then its value SHALL be specified as a result in the Results
1647 List for the completed transfer with the id of "destination":
1648 </p>
1649 <pre>
1650 &lt;uws:job>
1651 ...
1652 &lt;uws:jobInfo>
1653 &lt;vos:direction>vos://nvo.caltech!vospace/mjg/.auto&lt;/vos:direction>
1654 ...
1655 &lt;uws:results>
1656 &lt;uws:result id="destination">vos://nvo.caltech!vospace/mjg/abc123&lt;/uws:result>
1657 &lt;/uws:results>
1658 ...
1659 &lt;/uws:job>
1660 </pre>
1661 <h5><a name="sec5_2_2_3">5.2.2.3 Faults</a></h5>
1662 <p>For all faults, the service shall set the PHASE to "ERROR" in the Job
1663 representation. The &lt;errorSummary&gt; element in the Job representation
1664 shall be set to the appropriate value for the fault type and the
1665 appropriate fault representation (see section 5.5) provided at the error URI:
1666 http://rest-endpoint/transfers/(jobid)/error.</p>
1667 <table>
1668 <tr><th align="left">Fault description</th><th
1669 align="left">errorSummary</th><th align="left">Fault representation</th></tr>
1670 <tr><td>Operation fails</td><td>Internal Fault</td><td>InternalFault</td></tr>
1671 <tr><td>User does not have permissions to perform the
1672 operation</td><td>Permission Denied</td><td>PermissionDenied</td></tr>
1673 <tr><td>Source node does not exist</td><td>Node Not Found</td><td>NodeNotFound</td></tr>
1674 <tr><td>Destination node already exists and it is not a
1675 ContainerNode</td><td>Duplicate Node</td><td>DuplicateNode</td></tr>
1676 <tr><td>A specified URI is invalid</td><td>Invalid
1677 URI</td><td>InvalidURI</td></tr>
1678 </table>
1679 <!-- 5.2.2.4 Example -->
1680 <div class="exampleOuter">
1681 <div class="exampleHeader">Example: moveNode</div>
1682 <div class="exampleWrapper">
1683 <p>The Job to be submitted (newJob.xml) is:</p>
1684 <pre>
1685 &lt;vos:transfer xmlns:vos="http://www.ivoa.net/xml/VOSpace/v2.0" >
1686 &lt;vos:target>vos://nvo.caltech!vospace/mydata1&lt;/vos:target>
1687 &lt;vos:direction>vos://nvo.caltech!vospace/mydata2&lt;/vos:direction>
1688 &lt;vos:keepBytes>false&lt;/vos:keepBytes>
1689 &lt;/vos:transfer>
1690 </pre>
1691
1692 <pre>
1693 > <b>curl -v -X POST -d @newJob.xml "http://localhost:8000/transfers"</b>
1694 </div><div class="exampleInner" style="background-color: rgb(213, 222, 227);">
1695 <pre>
1696 * Connected to localhost (127.0.0.1) port 8000 (#0)
1697 > POST /transfers HTTP/1.1
1698 > User-Agent: curl/7.19.4 (universal-apple-darwin10.0) libcurl/7.19.4 OpenSSL/0.9.8l zlib/1.2.3
1699 > Host: localhost:8000
1700 > Accept: */*
1701 > Content-Length: 762
1702 > Content-Type: application/x-www-form-urlencoded
1703 >
1704 < HTTP/1.1 303 See Other
1705 < Content-Length: 174
1706 < Server: CherryPy/3.1.2
1707 < Location: http://localhost:8080/transfers/ec200b5ff77641fb841978a85d1f7245
1708 < Allow: GET, HEAD, POST, PUT
1709 < Date: Thu, 11 Mar 2010 19:54:00 GMT
1710 < Content-Type: text/html
1711 <
1712 * Connection #0 to host localhost left intact
1713 * Closing connection #0
1714 This resource can be found at <a href='http://localhost:8000/transfers/ec200b5ff77641fb841978a85d1f7245'>http://localhost:8000/transfers/ec200b5ff77641fb841978a85d1f7245</a>.
1715 </pre></div>
1716 <div class="exampleWrapper">
1717 <p>The status of the job can now be polled at the job location:</p>
1718 <pre>
1719 > <b>curl -v "http://localhost:8000/transfers/ec200b5ff77641fb841978a85d1f7245"</b></div><div class="exampleInner" style="background-color: rgb(213, 222, 227);">
1720 <pre>
1721 * Connected to localhost (127.0.0.1) port 8000 (#0)
1722 > GET /transfers/ccfd4ba0dd9f4406b2039c4358ba8ef3 HTTP/1.1
1723 > User-Agent: curl/7.19.4 (universal-apple-darwin10.0) libcurl/7.19.4 OpenSSL/0.9.8l zlib/1.2.3
1724 > Host: localhost:8000
1725 > Accept: */*
1726 >
1727 < HTTP/1.1 200 OK
1728 < Date: Thu, 11 Mar 2010 19:54:02 GMT
1729 < Content-Length: 802
1730 < Content-Type: text/html
1731 < Allow: GET, HEAD, POST, PUT
1732 < Server: CherryPy/3.1.2
1733 <
1734 &lt;uws:job xmlns:uws="http://www.ivoa.net/xml/UWS/v1.0" xmlns:xlink="http://www.w3.org/1999/xlink"
1735 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
1736 xmlns:vos="http://www.ivoa.net/xml/VOSpace/v2.0"
1737 xsi:schemaLocation="http://www.ivoa.net/xml/UWS/v1.0 UWS.xsd ">
1738 &lt;uws:jobId>ec200b5ff77641fb841978a85d1f7245&lt;/uws:jobId>
1739 &lt;uws:ownerId xsi:nil="true"/>
1740 &lt;uws:phase>EXECUTING&lt;/uws:phase>
1741 &lt;uws:startTime>2010-03-11T19:54:00.433058&lt;/uws:startTime>
1742 &lt;uws:endTime xsi:nil="true"/>
1743 &lt;uws:executionDuration>0&lt;/uws:executionDuration>
1744 &lt;uws:destruction xsi:nil="true"/>
1745 &lt;uws:jobInfo>
1746 &lt;vos:transfer>
1747 &lt;vos:target>vos://nvo.caltech!vospace/mydata1&lt;/vos:target>
1748 &lt;vos:direction>vos://nvo.caltech!vospace/mydata2&lt;/vos:direction>
1749 &lt;vos:keepBytes>false&lt;/vos:keepBytes>
1750 &lt;/vos:transfer>
1751 &lt;/uws:jobInfo>
1752 &lt;uws:results/>
1753 * Connection #0 to host localhost left intact
1754 * Closing connection #0
1755 &lt;/uws:job>
1756 </pre>
1757 </div></div>
1758
1759 <h4><a name="sec5_2_3">5.2.3 copyNode</h4>
1760 <p>Copy a node with a VOSpace service.
1761 </p><p>
1762 Note that this does not cover copying data between two separate VOSpace services.
1763 </p><p>
1764 Copying nodes between separate VOSpace services SHOULD be handled by the client, using the import and export methods.
1765 </p><p>
1766 When the source is a ContainerNode, all its children (the full contents of the container) SHALL get copied, i.e. this is a deep recursive copy.
1767 </p><p>
1768 When the destination is an existing ContainerNode, the copy SHALL be placed under it (i.e. within the container).
1769 </p>
1770 <p>The <i>Node</i> type cannot be changed using this method.</p>
1771 <h5><a name="sec5_2_3_1">5.2.3.1 Request</a></h5>
1772 <ul><li> A HTTP POST of a Job representation for the transfer (see
1773 section 3.6) to http://rest-endpoint/transfers.</ul>
1774 <p>
1775 .auto is the reserved URI to indicate an auto-generated URI for the destination, i.e. vos://service/path/.auto SHALL cause a new unique URI for the node within vos://service/path to be generated.
1776 </p>
1777 <h5><a name="sec5_2_3_2">5.2.3.2 Response</a></h5>
1778 <ul><li>The initial response is a HTTP 303 status code with the
1779 Location header keyword assigned to the created job.</li></ul>
1780 <p>If an autogenerated URI for the destination was specified in the
1781 request then its value SHALL be specified as a result in the Results
1782 List for the completed transfer with the id of "destination":
1783 </p>
1784 <pre>
1785 &lt;uws:job>
1786 ...
1787 &lt;uws:jobInfo>
1788 &lt;vos:direction>vos://nvo.caltech!vospace/mjg/.auto&lt;/vos:direction>
1789 ...
1790 &lt;uws:results>
1791 &lt;uws:result id="destination">vos://nvo.caltech!vospace/mjg/abc123&lt;/uws:result>
1792 &lt;/uws:results>
1793 ...
1794 &lt;/uws:job>
1795 </pre>
1796 <h5><a name="sec5_2_3_3">5.2.3.3 Faults</a></h5>
1797 <p>For all faults, the service shall set the PHASE to "ERROR" in the Job
1798 representation. The &lt;errorSummary&gt; element in the Job representation
1799 shall be set to the appropriate value for the fault type and the
1800 appropriate fault representation (see section 5.5) provided at the error URI:
1801 http://rest-endpoint/transfers/(jobid)/error.</p>
1802 <table>
1803 <tr><th align="left">Fault description</th><th
1804 align="left">errorSummary</th><th align="left">Fault representation</th></tr>
1805 <tr><td>Operation fails</td><td>Internal Fault</td><td>InternalFault</td></tr>
1806 <tr><td>User does not have permissions to perform the
1807 operation</td><td>Permission Denied</td><td>PermissionDenied</td></tr>
1808 <tr><td>Source node does not exist</td><td>Node Not Found</td><td>NodeNotFound</td></tr>
1809 <tr><td>Destination node already exists and it is not a
1810 ContainerNode</td><td>Duplicate Node</td><td>DuplicateNode</td></tr>
1811 <tr><td>A specified URI is invalid</td><td>Invalid
1812 URI</td><td>InvalidURI</td></tr>
1813 </table>
1814
1815 <!-- 5.2.3.4 Example -->
1816 <div class="exampleOuter">
1817 <div class="exampleHeader">Example: copyNode</div>
1818 <div class="exampleWrapper">
1819 <p>The Job to be submitted (newJob.xml) is:</p>
1820 <pre>
1821 &lt;vos:transfer xmlns:vos="http://www.ivoa.net/xml/VOSpace/v2.0">
1822 &lt;vos:target>vos://nvo.caltech!vospace/mydata1&lt;/vos:target>
1823 &lt;vos:direction>vos://nvo.caltech!vospace/mydir/.auto&lt;/vos:direction>
1824 &lt;vos:keepBytes>true&lt;/vos:keepBytes>
1825 &lt;/vos:transfer>
1826 </pre>
1827
1828 <pre>
1829 > <b>curl -v -X POST -d @newJob.xml "http://localhost:8000/transfers"</b>
1830 </div><div class="exampleInner" style="background-color: rgb(213, 222, 227);">
1831 <pre>* Connected to localhost (127.0.0.1) port 8000 (#0)
1832 > POST /transfers HTTP/1.1
1833 > User-Agent: curl/7.19.4 (universal-apple-darwin10.0) libcurl/7.19.4 OpenSSL/0.9.8l zlib/1.2.3
1834 > Host: localhost:8000
1835 > Accept: */*
1836 > Content-Length: 765
1837 > Content-Type: application/x-www-form-urlencoded
1838 >
1839 < HTTP/1.1 303 See Other
1840 < Content-Length: 174
1841 < Server: CherryPy/3.1.2
1842 < Location: http://localhost:8080/transfers/6fbb28afec94417ba256d705f5e1f966
1843 < Allow: GET, HEAD, POST, PUT
1844 < Date: Thu, 11 Mar 2010 21:28:19 GMT
1845 < Content-Type: text/html
1846 <
1847 * Connection #0 to host localhost left intact
1848 * Closing connection #0
1849 This resource can be found at <a href='http://localhost:8000/transfers/6fbb28afec94417ba256d705f5e1f966'>http://localhost:8000/transfers/6fbb28afec94417ba256d705f5e1f966</a>.
1850 </pre></div>
1851 <div class="exampleWrapper">
1852
1853 <p>The status of the job can now be polled at the job location:</p>
1854 <pre>
1855 > <b>curl -v "http://localhost:8000/transfers/63fa39fb18f244c18c991ed2f96d26cd"</b></div><div class="exampleInner" style="background-color: rgb(213, 222, 227);"><pre>
1856 * Connected to localhost (127.0.0.1) port 8000 (#0)
1857 > GET /transfers/63fa39fb18f244c18c991ed2f96d26cd HTTP/1.1
1858 > User-Agent: curl/7.19.4 (universal-apple-darwin10.0) libcurl/7.19.4 OpenSSL/0.9.8l zlib/1.2.3
1859 > Host: localhost:8000
1860 > Accept: */*
1861 >
1862 < HTTP/1.1 200 OK
1863 < Date: Thu, 11 Mar 2010 21:28:21 GMT
1864 < Content-Length: 950
1865 < Content-Type: text/html
1866 < Allow: GET, HEAD, POST, PUT
1867 < Server: CherryPy/3.1.2
1868 <
1869 &lt;uws:job xmlns:uws="http://www.ivoa.net/xml/UWS/v1.0" xmlns:xlink="http://www.w3.org/1999/xlink"
1870 xmlns:vos="http://www.ivoa.net/xml/VOSpace/v2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
1871 xsi:schemaLocation="http://www.ivoa.net/xml/UWS/v1.0 UWS.xsd ">
1872 &lt;uws:jobId>6fbb28afec94417ba256d705f5e1f966&lt;/uws:jobId>
1873 &lt;uws:ownerId xsi:nil="true"/>
1874 &lt;uws:phase>COMPLETED&lt;/uws:phase>
1875 &lt;uws:startTime>2010-03-11T21:28:19.200324&lt;/uws:startTime>
1876 &lt;uws:endTime>2010-03-11T21:28:19.200529&lt;/uws:endTime>
1877 &lt;uws:executionDuration>0&lt;/uws:executionDuration>
1878 &lt;uws:destruction xsi:nil="true"/>
1879 &lt;uws:jobInfo>
1880 &lt;vos:transfer>
1881 &lt;vos:keepBytes>true&lt;/vos:keepBytes>
1882 &lt;vos:direction>vos://nvo.caltech!vospace/mydir/.auto&lt;/vos:direction>
1883 &lt;vos:target>vos://nvo.caltech!vospace/mydata1&lt;/vos:target>
1884 &lt;/vos:transfer>
1885 &lt;uws:jobInfo>
1886 &lt;uws:results>
1887 &lt;uws:result id="destination" xlink:href="vos://nvo.caltech!vospace/mydir/ef9ce281f5bd4bff92c8991580cddff4"/>
1888 &lt;/uws:results>
1889 * Connection #0 to host localhost left intact
1890 * Closing connection #0
1891 &lt;/uws:job>
1892 </pre></div></div>
1893
1894 <h4><a name="sec5_2_4">5.2.4 deleteNode</h4>
1895 <p>Delete a node.</p>
1896
1897 <p>When the target is a ContainerNode, all its children (the contents of the container) SHALL also be deleted.</p>
1898
1899 <p>Note that the same operation can also be achieved with a moveNode
1900 (see 5.2.2) with a .null node as the direction (destination node).</p>
1901
1902 <h5><a name="sec5_2_4_1">5.2.4.1 Request</a></h5>
1903 <ul> <li> A HTTP DELETE to the URL of an existing node
1904 </ul>
1905 <h5><a name="sec5_2_4_2">5.2.4.2 Response</a></h5>
1906 <ul><li> A HTTP 204 status code
1907 </ul>
1908 <h5><a name="sec5_2_4_3">5.2.4.3 Faults</a></h5>
1909 <ul><li> The service SHOULD throw a HTTP 500 status code including an InternalFault fault in the entity-body if the operation fails
1910 <li> The service SHALL throw a HTTP 401 status code including a PermissionDenied fault in the entity-body if the user does not have permissions to perform the operation
1911 <li> The service SHALL throw a HTTP 404 status code including a NodeNotFound fault in the entity-body if the target node does not exist
1912 <li> If a parent node in the URI path does not exist then the service SHALL throw a HTTP 404 status code including a ContainerNotFound fault in the entity-body
1913 <ul><li> For example, given the URI path /a/b/c, the service must throw a HTTP 404 status code including a ContainerNotFound fault in the entity-body if either /a or /a/b do not exist.</ul>
1914 <li> If a parent node in the URI path is a LinkNode, the service SHALL throw a HTTP 400 status code including a LinkFound fault in the entity-body.
1915 <ul><li> For example, given the URI path /a/b/c, the service must throw a HTTP 400 status code including a LinkFound fault in the entity-body if either /a or /a/b are LinkNodes.</ul>
1916 <li> If the target node in the URI path does not exist, the service SHALL throw a HTTP 404 status code including a NodeNotFound fault in the entity-body.
1917 <ul><li> For example, given the URI path /a/b/c, the service must throw a HTTP 404 status code including a NodeNotFound fault in the entity-body if /a/b/c does not exist.
1918 </ul>
1919 </ul>
1920
1921 <!-- 5.2.4.4 Example -->
1922 <div class="exampleOuter">
1923 <div class="exampleHeader">Example: deleteNode</div>
1924 <div class="exampleWrapper">
1925 <pre>
1926 > <b>curl -v -X DELETE "http://localhost:8000/nodes/mydata1"</b></pre>
1927 </div><div class="exampleInner" style="background-color: rgb(213, 222, 227);">
1928 <pre>
1929 * Connected to localhost (127.0.0.1) port 8000 (#0)
1930 > DELETE /nodes/mydata1 HTTP/1.1
1931 > User-Agent: curl/7.19.4 (universal-apple-darwin10.0) libcurl/7.19.4 OpenSSL/0.9.8l zlib/1.2.3
1932 > Host: localhost:8000
1933 > Accept: */*
1934 >
1935 < HTTP/1.1 200 OK
1936 < Date: Thu, 11 Mar 2010 22:08:22 GMT
1937 < Content-Length: 0
1938 < Content-Type: text/html
1939 < Allow: DELETE, GET, HEAD, POST, PUT
1940 < Server: CherryPy/3.1.2
1941 <
1942 * Connection #0 to host localhost left intact
1943 * Closing connection #0
1944 </pre>
1945 </div></div>
1946
1947 <h3><a name="sec5_3">5.3 Accessing metadata</a></h3>
1948
1949 <h4><a name="sec5_3_1">5.3.1 getNode</h4>
1950 <p>Get the details for a specific Node.</p>
1951 <h5><a name="sec5_3_1_1">5.3.1.1 Request</a></h5>
1952 <ul><li> A HTTP GET to the URL of an existing node
1953 http://rest-endpoint/nodes/path
1954 </li></ul>
1955 <p>This can take the optional parameters to control the size of the response:</p>
1956 <ul>
1957 <li><i>detail</i> with values of:
1958 <ul><li>min: the returned record for the node contains minimum
1959 detail with all optional parts removed - the node type should be
1960 returned
1961 <ul><li>e.g. &lt;Node uri="vos://service/name" xsi:type="Node"/></ul>
1962 <li>max: the returned record for the node contains the maximum
1963 detail, including any xsi:type specific extensions
1964 <li>properties: the returned record for the node contains the
1965 basic node element with a list of properties but no xsi:type
1966 specific extensions
1967 </ul>
1968 <li><i>uri</i> with a value of a VOSpace identifier, URI-encoded
1969 according to RFC2396
1970 <li><i>limit</i> with an integer value indicating the maximum number of results in the response.
1971 <ul><li>No limit indicates a request for an unpaged list. However the
1972 server MAY still impose its own limit on the size of an individual
1973 response, splitting the results into more than one page if required/ </ul>
1974 </ul>
1975
1976 <p>
1977 The list of supported protocols for a node can be retrieved with:</p>
1978 <ul>
1979 <li> A HTTP POST of an empty protocol representation to the URL of an
1980 existing node http://rest-endpoint/nodes/path
1981 </ul>
1982 <h5><a name="sec5_3_1_2">5.3.1.2 Response</a></h5>
1983 <ul><li> A HTTP 200 status code and a Node representation in the entity-body
1984 </ul><p>
1985 When no parameters are present in the request, the full expanded
1986 record for the node SHALL be returned, including any xsi:type specific
1987 extensions; otherwise the appropriate form for the specified value of
1988 the "detail" parameter SHALL be returned.
1989 </p>
1990 <p>When the node is a container, the returned record will also contain
1991 a list of direct children nodes in the container (as &lt;node>
1992 subelements under the &lt; nodes> element).</p>
1993 <p>If a "uri" and "offset" are specified in the request then the returned
1994 list will consist of the subset of children which begins at the node
1995 matching the specified value of the "uri" parameter and with
1996 cardinality matching the specified value of the "offset" parameter
1997 drawn from an ordered sequence of all children. The ordering is
1998 determined by the server but results must always be drawn from the
1999 same ordered sequence.
2000 <h5><a name="sec5_3_1_3">5.3.1.3 Faults</a></h5>
2001 <ul><li> The service SHOULD throw a HTTP 500 status code including an InternalFault fault in the entity-body if the operation fails
2002 <li> The service SHALL throw a HTTP 401 status code including a PermissionDenied fault in the entity-body if the user does not have permissions to perform the operation
2003 <li> The service SHALL throw a HTTP 404 status code including a NodeNotFound fault in the entity-body if the target Node does not exist
2004 </ul>
2005
2006 <!-- 5.3.1.4 Example -->
2007 <div class="exampleOuter">
2008 <div class="exampleHeader">Example: getNode</div>
2009 <div class="exampleWrapper">
2010 <pre>
2011 > <b>curl -v "http://localhost:8000/nodes/mydir?detail=min&uri=vos://nvo.caltech!vospace/mydir/ngc3401"</b></pre>
2012 </div><div class="exampleInner" style="background-color: rgb(213, 222, 227);">
2013 <pre>
2014 * Connected to localhost (127.0.0.1) port 8000 (#0)
2015 > GET /nodes/mydir?detail=min&uri=vos://nvo.caltech!vospace/mydir/ngc3401 HTTP/1.1
2016 > User-Agent: curl/7.19.4 (universal-apple-darwin10.0) libcurl/7.19.4 OpenSSL/0.9.8l zlib/1.2.3
2017 > Host: localhost:8000
2018 > Accept: */*
2019 >
2020 < HTTP/1.1 200 OK
2021 < Date: Fri, 12 Mar 2010 04:05:39 GMT
2022 < Content-Length: 593
2023 < Content-Type: text/html
2024 < Allow: DELETE, GET, HEAD, POST, PUT
2025 < Server: CherryPy/3.1.2
2026 <
2027 &lt;node xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
2028 xsi:type="vos:ContainerNode" uri="vos://nvo.caltech!vospace/mydir"
2029 xmlns="http://www.ivoa.net/xml/VOSpace/v2.0">
2030 &lt;properties>
2031 &lt;property uri="ivo://ivoa.net/vospace/core#description">My award winning images&lt;/property>
2032 &lt;/properties>
2033 &lt;accepts>
2034 &lt;view uri="ivo://ivoa.net/vospace/core#anyview"/>
2035 &lt;/accepts>
2036 &lt;provides>
2037 &lt;view uri="ivo://ivoa/net/vospace/core#defaultview"/>
2038 &lt;/provides>
2039 &lt;capabilities/>
2040 &lt;nodes>
2041 &lt;node uri="vos://nvo.caltech!vospace/mydir/ngc4323"/>
2042 &lt;node uri="vos://nvo.caltech!vospace/mydir/ngc5796"/>
2043 &lt;node uri="vos://nvo.caltech!vospace/mydir/ngc6801"/>
2044 &lt;/nodes>
2045 &lt;/node>
2046 * Connection #0 to host localhost left intact
2047 * Closing connection #0
2048 </pre>
2049 </div></div>
2050 <h4><a name="sec5_3_2">5.3.2 setNode</h4>
2051 <p>Set the property values for a specific Node</p>
2052
2053 <h5><a name="sec5_3_2_1">5.3.2.1 Request</a></h5>
2054 <ul><li> A HTTP POST of a Node representation to the URL of an existing node http://rest-endpoint/nodes/path including:
2055 <ul><li> node: A Node containing the Node uri and a list of the Properties to set (as defined in section 3.1)
2056 </ul></ul><p>
2057 This will add or update the node properties including any xsi:type specific elements.
2058 </p><p>
2059 The operation is the union of existing values and new ones.
2060 </p><p>
2061 <li> An empty value sets the value to blank.
2062 <li> To delete a Property, set the xsi:nil attribute to true
2063 </p><p>
2064 This method cannot be used to modify the Node type.
2065 </p><p>
2066 This method cannot be used to modify the accepts or provides list of Views for the Node.
2067 </p>
2068 <p>This method cannot be used to create children of a container Node.</p>
2069 <h5><a name="sec5_3_2_2">5.3.2.2 Response</a></h5>
2070 <ul<li> A HTTP 200 status code and a Node representation in the entity-body
2071 </ul><p>
2072 The full expanded record for the node SHALL be returned, including any xsi:type specific extensions.
2073 </p>
2074 <h5><a name="sec5_3_2_3">5.3.2.3 Faults</a></h5>
2075 <ul><li> The service SHOULD throw a HTTP 500 status code including an InternalFault fault in the entity-body if the operation fails
2076 <li> The service SHALL throw a HTTP 401 status code including a PermissionDenied fault in the entity-body if the request attempts to modify a read-only Property
2077 <li> The service SHALL throw a HTTP 401 status code including a PermissionDenied fault in the entity-body if the user does not have permissions to perform the operation
2078 <li> The service SHALL throw a HTTP 404 status code including a
2079 NodeNotFound fault in the entity-body if the target Node does not
2080 exist
2081 <li> If a parent node in the URI path does not exist then the service SHALL throw a HTTP 404 status code including a ContainerNotFound fault in the entity-body
2082 <ul><li> For example, given the URI path /a/b/c, the service must throw a HTTP 404 status code including a ContainerNotFound fault in the entity-body if either /a or /a/b do not exist.</ul>
2083 <li> The service SHALL throw a HTTP 400 status code including an InvalidArgument fault in the entity-body if a specified property value is invalid
2084 </ul>
2085
2086 <!-- 5.3.2.4 Example -->
2087 <div class="exampleOuter">
2088 <div class="exampleHeader">Example: setNode</div>
2089 <div class="exampleWrapper">
2090 <p>The updated node (newNode.xml) is:</p>
2091 <pre>
2092 &lt;node xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
2093 xsi:type="vos:UnstructuredDataNode"
2094 uri="vos://nvo.caltech!vospace/mydata1"
2095 xmlns="http://www.ivoa.net/xml/VOSpace/v2.0">
2096 &lt;properties>
2097 &lt;property uri="ivo://ivoa.net/vospace/core#date">2010-03-12&lt;/property>
2098 &lt;/properties>
2099 &lt;accepts/>
2100 &lt;provides/>
2101 &lt;capabilities/>
2102 &lt;/node>
2103 </pre>
2104 <pre>
2105 > <b>curl -v -X POST -d @newNode.xml "http://localhost:8000/nodes/mydata1"</b>
2106 </pre></div><div class="exampleInner" style="background-color: rgb(213, 222, 227);">
2107 <pre>
2108 * Connected to localhost (127.0.0.1) port 8000 (#0)
2109 > POST /nodes/mydata1 HTTP/1.1
2110 > User-Agent: curl/7.19.4 (universal-apple-darwin10.0) libcurl/7.19.4 OpenSSL/0.9.8l zlib/1.2.3
2111 > Host: localhost:8000
2112 > Accept: */*
2113 > Content-Length: 309
2114 > Content-Type: application/x-www-form-urlencoded
2115 >
2116 < HTTP/1.1 200 OK
2117 < Date: Fri, 12 Mar 2010 18:49:25 GMT
2118 < Content-Length: 445
2119 < Content-Type: text/html
2120 < Allow: DELETE, GET, HEAD, POST, PUT
2121 < Server: CherryPy/3.1.2
2122 <
2123 &lt;node xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
2124 xsi:type="vos:UnstructuredDataNode" uri="vos://nvo.caltech!vospace/mydata1"
2125 xmlns="http://www.ivoa.net/xml/VOSpace/v2.0" busy="false">
2126 &lt;properties>
2127 &lt;property uri="ivo://ivoa.net/vospace/core#description">My important results&lt;/property>
2128 &lt;property uri="ivo://ivoa.net/vospace/core#date">2010-03-12&lt;/property>
2129 &lt;/properties>
2130 &lt;accepts>
2131 &lt;view uri="ivo://ivoa.net/vospace/core#anyview"/>
2132 &lt;/accepts>
2133 &lt;provides/>
2134 &lt;capabilities/>
2135 &lt;/node>
2136 * Connection #0 to host localhost left intact
2137 * Closing connection #0
2138 </pre></div></div>
2139
2140 <h4><a name="sec5_3_3">5.3.3 findNodes</h4>
2141 <p>Find nodes whose properties match the specified values.
2142 </p><p>
2143 This operation is OPTIONAL.
2144 </p>
2145 <h5><a name="sec5_3_3_1">5.3.3.1 Request</a></h5>
2146 <ul><li> A HTTP POST of a Job representation of a Search (see section
2147 3.7) to http://rest-endpoint/searches
2148 </ul>
2149 <p>
2150 A null value of the "matches" parameter implies a full listing of the space.
2151 </p>
2152 </ul>
2153 <h5><a name="sec5_3_3_2">5.3.3.2 Response</a></h5>
2154 <ul><li>The initial response is a HTTP 303 status code with the
2155 Location header keyword assigned to the created job.
2156 </li></ul>
2157 <p>The search results representation can be retrieved directly from the
2158 link reported in the Results List, available from the results endpoint -
2159 http://rest-endpoint/searches/(jobid)/results -, the standard UWS location
2160 under the results endpoint - http://rest-endpoint/searches/(jobid)/results/searchDetails - (which may well just be a redirect to the
2161 former link), or as part of the full Job representation from
2162 http://rest-endpoint/searches/(jobid). The result element in the
2163 Results List SHALL have an id of "searchDetails":</p>
2164 <pre>
2165 &lt;uws:job>
2166 ...
2167 &lt;uws:results>
2168 &lt;uws:result id="searchDetails" xlink:href="http://rest-endpoint/searches/(jobid)/results/listing1"/>
2169 &lt;/uws:results>
2170 ...
2171 &lt;/uws:job>
2172 </pre>
2173
2174 <h5><a name="sec5_3_3_3">5.3.3.3 Faults</a></h5>
2175 <p>For all faults, the service shall set the PHASE to "ERROR" in the Job
2176 representation. The &lt;errorSummary&gt; element in the Job representation
2177 shall be set to the appropriate value for the fault type and the
2178 appropriate fault representation (see section 5.5) provided at the error URI:
2179 http://rest-endpoint/transfers/(jobid)/error.</p>
2180 <table>
2181 <tr><th align="left">Fault description</th><th
2182 align="left">errorSummary</th><th align="left">Fault representation</th></tr>
2183 <tr><td>Operation not supported</td><td>Operation Not Supported</td><td>OperationNotSupported</td></tr>
2184 <tr><td>Operation fails</td><td>Internal Fault</td><td>InternalFault</td></tr>
2185 <tr><td>User does not have permissions to perform the
2186 operation</td><td>Permission
2187 Denied</td><td>PermissionDenied</td></tr>
2188 <tr><td>A particular property is specified and does not exist in the
2189 space</td><td>Property Not Found</td><td>PropertyNotFound</td></tr>
2190 </table>
2191
2192 <!-- 5.3.3.4 Example -->
2193
2194 <div class="exampleOuter">
2195 <div class="exampleHeader">Example: findNodes</div>
2196 <div class="exampleWrapper">
2197 <p>The Job to be submitted (newJob.xml) is:</p>
2198 <pre>&lt;vos:search xmlns:vos="http://www.ivoa.net/xml/VOSpace/v2.0">
2199 &lt;vos:detail>properties&lt;/vos:detail>
2200 &lt;vos:matches>ivo://ivoa.net/vospace/core#description='galax'&lt;/vos:matches>
2201 &lt;vos:search>
2202 </pre>
2203 <pre>
2204 > <b>curl -v -X POST -d @newJob.xml "http://localhost:8000/searches"</b></pre>
2205 </div><div class="exampleInner" style="background-color: rgb(213, 222, 227);">
2206 <pre>
2207 * Connected to localhost (127.0.0.1) port 8000 (#0)
2208 > POST /searches HTTP/1.1
2209 > User-Agent: curl/7.19.4 (universal-apple-darwin10.0) libcurl/7.19.4 OpenSSL/0.9.8l zlib/1.2.3
2210 > Host: localhost:8000
2211 > Accept: */*
2212 > Content-Length: 684
2213 > Content-Type: application/x-www-form-urlencoded
2214 >
2215 < HTTP/1.1 303 See Other
2216 < Content-Length: 172
2217 < Server: CherryPy/3.1.2
2218 < Location: http://localhost:8080/searches/8c5b0f78cd5a44af8694f10da1b92060
2219 < Allow: DELETE, GET, HEAD, POST, PUT
2220 < Date: Fri, 12 Mar 2010 19:50:12 GMT
2221 < Content-Type: text/html
2222 <
2223 * Connection #0 to host localhost left intact
2224 * Closing connection #0
2225 This resource can be found at <a href='http://localhost:8080/searches/8c5b0f78cd5a44af8694f10da1b92060'>http://localhost:8080/searches/8c5b0f78cd5a44af8694f10da1b92060</a>
2226 </pre></div>
2227 <div class="exampleWrapper">
2228 <p>The status of the job can now be polled at the job location:</p>
2229 <pre>
2230 > <b>curl -v "http://localhost:8000/searches/8c6e7bc53ee848638cda35817e47da65"</b></pre></div><div class="exampleInner" style="background-color: rgb(213, 222, 227);">
2231 <pre>
2232 * Connected to localhost (127.0.0.1) port 8000 (#0)
2233 > GET /searches/8c6e7bc53ee848638cda35817e47da65 HTTP/1.1
2234 > User-Agent: curl/7.19.4 (universal-apple-darwin10.0) libcurl/7.19.4 OpenSSL/0.9.8l zlib/1.2.3
2235 > Host: localhost:8000
2236 > Accept: */*
2237 >
2238 < HTTP/1.1 200 OK
2239 < Date: Fri, 12 Mar 2010 19:51:24 GMT
2240 < Content-Length: 891
2241 < Content-Type: text/html
2242 < Allow: DELETE, GET, HEAD, POST, PUT
2243 < Server: CherryPy/3.1.2
2244 <
2245 &lt;uws:job xmlns:uws="http://www.ivoa.net/xml/UWS/v1.0" xmlns:xlink="http://www.w3.org/1999/xlink"
2246 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.ivoa.net/xml/UWS/v1.0 UWS.xsd ">
2247 &lt;uws:jobId>8c6e7bc53ee848638cda35817e47da65&lt;</uws:jobId>
2248 &lt;uws:ownerId xsi:nil="true"/>
2249 &lt;uws:phase>COMPLETED&lt;/uws:phase>
2250 &lt;uws:startTime>2010-03-12T19:50:56.552278&lt;/uws:startTime>
2251 &lt;uws:endTime>2010-03-12T19:50:56.562416&lt;/uws:endTime>
2252 &lt;uws:executionDuration>0&lt;/uws:executionDuration>
2253 &lt;uws:destruction xsi:nil="true"/>
2254 &lt;uws:jobInfo>
2255 &lt;vos:search>
2256 &lt;vos:detail>properties&lt;/vos:detail>
2257 &lt;vos:matches>ivo://ivoa.net/vospace/core#description='galax'&lt;/vos:matches>
2258 &lt;vos:search>
2259 &lt;uws:jobInfo>
2260 &lt;uws:results>
2261 &lt;uws:result id="searchDetails" xlink:href="http://localhost:8000/searches/d55814f88d974c21afe5ad50e4e875c8/results/listing1"/>
2262 &lt;/uws:results>
2263 &lt;/uws:job>
2264 * Connection #0 to host localhost left intact
2265 * Closing connection #0
2266 </pre></div>
2267 <div class="exampleWrapper">
2268 <p>Once the Job has completed, the result can be obtained from the URL
2269 reported in the result element:</p>
2270 <pre>
2271 > <b>curl -v "http://localhost:8000/searches/d55814f88d974c21afe5ad50e4e875c8/results/listing1"</b></pre>
2272 </div><div class="exampleInner" style="background-color: rgb(213, 222, 227);">
2273 <pre>
2274 * Connected to localhost (127.0.0.1) port 8000 (#0)
2275 > GET /searches/d55814f88d974c21afe5ad50e4e875c8/results/listing1 HTTP/1.1
2276 > User-Agent: curl/7.19.4 (universal-apple-darwin10.0) libcurl/7.19.4 OpenSSL/0.9.8l zlib/1.2.3
2277 > Host: localhost:8000
2278 > Accept: */*
2279 >
2280 < HTTP/1.1 200 OK
2281 < Date: Fri, 12 Mar 2010 20:29:25 GMT
2282 < Content-Length: 586
2283 < Content-Type: text/html
2284 < Allow: DELETE, GET, HEAD, POST, PUT
2285 < Server: CherryPy/3.1.2
2286 <
2287 &lt;nodes xmlns="http://www.ivoa.net/xml/VOSpace/v2.0"
2288 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
2289 &lt;node uri="vos://nvo.caltech!vospace/mydir/img1" xsi:type="vos:UnstructuredDataNode">
2290 &lt;properties>
2291 &lt;property uri="ivo://ivoa.net/vospace/core#description">This is an R-band image of the galaxy NGC 3276&lt;/property>
2292 &lt;/properties>
2293 &lt;/node>
2294 &lt;node uri="vos://nvo.caltech!vospace/mydir/img5" xsi:type="vos:StructuredDataNode">
2295 &lt;properties>
2296 &lt;property uri="ivo://ivoa.net/vospace/core#description">This is a Chandra mosaic of the Fornax cluster of galaxies&lt;/property>
2297 &lt;/properties>
2298 &lt;/node>
2299 &lt;/nodes>
2300 * Connection #0 to host localhost left intact
2301 * Closing connection #0
2302 </pre></div></div>
2303
2304 <h3><a name="sec5_4">5.4 Transferring data</a></h3>
2305 <p>Two modes are supported for external data transfers: a simple HTTP GET to
2306 retrieve data from a service (pullFromVoSpace) and a more general mechanism which
2307 employs a UWS-based approach [UWS] for submitting general data
2308 transfer requests (see section 3.6). In the latter, four directions
2309 are specified in which external data transfers can happen:
2310 <ul>
2311 <li> sending data to a service (pushToVoSpace)
2312 <li> importing data into a service (pullToVoSpace)
2313 <li> reading data from a service (pullFromVoSpace)
2314 <li> sending data from a service (pushFromVoSpace)
2315 </ul>
2316
2317 <p>A transfer job is created by a HTTP POST of an appropriate Job
2318 representation to the transfers endpoint of the service: http://rest-endpoint/transfers</p>
2319 <p>The service returns the jobid of the transfer and it can then
2320 be initiated with a HTTP POST of the single parameter "PHASE=RUN" to
2321 the appropriate job endpoint:
2322 http://rest-endpoint/transfers/(jobid)/phase. Alternatively the
2323 transfer can also be run immediately on creation by adding a
2324 "PHASE=RUN" to the initial Job representation.</p>
2325 <p>The status of any transfer can be obtained by polling the phase
2326 endpoint for a particular transfer, i.e. a HTTP GET to
2327 http://rest-endpoint/transfers/(jobid)/phase.</p>
2328 <p>Once a transfer has completed, any results can be obtained by
2329 following the link in the Results List available from
2330 the results endpoint for that transfer, i.e. with a HTTP GET to
2331 http://rest-endpoint/transfers/(jobid)/results. This pertains
2332 particularly to the transfer methods in which data is sent to or
2333 read from a service-negotiated URL (pushToVoSpace and pullFromVoSpace).</p>
2334 <p>A transfer can also be aborted at any stage with a HTTP POST of
2335 the parameter "PHASE=ABORT" to the endpoint:
2336 http://rest-endpoint/transfers/(jobid)/phase</p>
2337 <p>More specific details for each of the four directions are given below.</p>
2338
2339
2340 <h4><a name="sec5_4_1">5.4.1 pushToVoSpace</h4>
2341 <p>Request a list of URLs to send data to a VOSpace node.
2342 </p><p>
2343 This method asks the server for a list of one or more URLs that the client can use to send data to.
2344 </p><p>
2345 The data transfer is initiated by the client, after it has received the response from the VOSpace service.
2346 </p><p>
2347 The primary use case for this method is client that wants to send some data directly to a VOSpace service.
2348 </p>
2349 <p>
2350 This operation is OPTIONAL.
2351 </p>
2352 <h5><a name="sec5_4_1_1">5.4.1.1 Request</a></h5>
2353 <ul<li> A HTTP POST of a Job representation for the transfer to http://rest-endpoint/transfers
2354 </ul><p>
2355 If a Node already exists at the target URI, then the data SHALL be imported into the existing Node and the Node properties SHALL be cleared unless the node is a ContainerNode.
2356 </p><p>
2357 If there is no Node at the target URI, then the service SHALL create a new Node using the uri and the default xsi:type for the space.
2358 </p><p>
2359 The transfer representation contains details of the View and a list of the Protocols that the client wants to use.
2360 </p><p>
2361 The list of Protocols SHOULD not contain endpoint addresses, the service will supply the endpoint addresses in the response.
2362 </p><p>
2363 The service SHALL ignore any of the requested protocols that it does not understand or is unable to support.
2364 </p><p>
2365 .auto is the reserved URI to indicate an auto-generated URI for the destination, i.e. vos://service/path/.auto SHALL cause a new unique URI for the node within vos://service/path to be generated.
2366 </p>
2367 <p>There is also an alternate convenience mode:</p>
2368 <ul><li>A HTTP POST of a Job representation for the transfer to
2369 http://rest-endpoint/sync
2370 </ul>
2371 <p>The assumed transfer protocol is HTTP PUT; however, transfer
2372 negotiation in the usual manner is possible with this convenience mode.</p>
2373
2374
2375 <h5><a name="sec5_4_1_2">5.4.1.2 Response</a></h5>
2376 <ul><li>The initial response is a HTTP 303 status code with the
2377 Location header keyword assigned to the created job.
2378 </ul><p>
2379 The service SHALL select which of the requested Protocols it is
2380 willing to provide and fill in the operational details for each one in
2381 the transfer result representation - this SHOULD normally include specifying the destination URL of the transfer protocol endpoint.
2382 </p><p>
2383 The transfer result SHOULD not include any Protocols that it is unable to support.
2384 </p>
2385 <p>
2386 The transfer results representation can be retrieved directly from the
2387 link reported in the Results List, available either from the results endpoint
2388 - http://rest-endpoint/transfers/(jobid)/results - or as part of the
2389 full Job representation for the completed transfer available from
2390 http://rest-endpoint/transfers/(jobid). The result
2391 element in the Results List SHALL have an id of
2392 "transferDetails":</p>
2393 <pre>
2394 &lt;uws:job>
2395 ...
2396 &lt;uws:results>
2397 &lt;uws:result id="transferDetails" xlink:href="http://rest-endpoint/transfers/(jobid)/results/details1"/>
2398 &lt;/uws:results>
2399 ...
2400 &lt;/uws:job>
2401 </pre>
2402 <p>For the alternate convenience mode:</p>
2403 <ul><li>A HTTP 303 status code with the Location
2404 header keyword assigned to the endpoint: http://rest-endpoint/transfers/(jobid)/results/transferDetails.
2405 </ul>
2406 The HTTP 303 redirect points to a transfer representation with the
2407 required transfer details and endpoints.
2408
2409 </p>
2410 <h5><a name="sec5_4_1_3">5.4.1.3 Faults</a></h5>
2411 <p>For all faults using the UWS mode, the service shall set the PHASE to "ERROR" in the Job
2412 representation. The &lt;errorSummary&gt; element in the Job representation
2413 shall be set to the appropriate value for the fault type and the
2414 appropriate fault representation (see section 5.5) provided at the error URI:
2415 http://rest-endpoint/transfers/(jobid)/error.</p>
2416 <table>
2417 <tr><th align="left">Fault description</th><th
2418 align="left">errorSummary</th><th align="left">Fault representation</th></tr>
2419 <tr><td>Operation not supported</td><td>Operation Not Supported</td><td>OperationNotSupported</td></tr>
2420 <tr><td>Operation fails</td><td>Internal Fault</td><td>InternalFault</td></tr>
2421 <tr><td>User does not have permissions to perform the
2422 operation</td><td>Permission
2423 Denied</td><td>PermissionDenied</td></tr>
2424 <tr><td>Service does not support the requested View</td><td>View Not
2425 Supported</td><td>ViewNotSupported</td></tr>
2426 <tr><td>Service supports none of the requested
2427 Protocols</td><td>Protocol Not
2428 Supported</td><td>ProtocolNotSupported</td></tr>
2429 <tr><td>A View parameter is invalid</td><td>Invalid Argument</td><td>InvalidArgument</td></tr>
2430 <tr><td>A Protocol parameter is invalid</td><td>Invalid
2431 Argument</td><td>InvalidArgument</td></tr>
2432 </table>
2433
2434 <p>If an error occurs with the alternate convenience mode, the
2435 resultingtransfers document SHOULD have no protocols. The
2436 client can then retrieve the Job representation for error
2437 information as with asynchronous transfers.</p>
2438
2439
2440
2441 <!-- 5.4.1.4 Example -->
2442 <div class="exampleOuter">
2443 <div class="exampleHeader">Example: pushToVoSpace</div>
2444 <div class="exampleWrapper">
2445 <p>The Job to be submitted (newJob.xml) is:</p>
2446 <pre>
2447 &lt;vos:transfer xmlns:vos="http://www.ivoa.net/xml/VOSpace/v2.0">
2448 &lt;vos:target>vos://nvo.caltech!vospace/mydata1&lt;/vos:target>
2449 &lt;vos:direction>pushToVoSpace&lt;/vos:direction>
2450 &lt;vos:view uri="ivo://net.ivoa/vospace/core#fits"/>
2451 &lt;vos:protocol uri="ivo://net.ivoa/vospace/core#httpput" authType="ivo://net.ivoa/vospace/core#anon"/>
2452 &lt;/vos:transfer>
2453 </pre>
2454 <pre>
2455 > <b>curl -v -X POST -d @newJob.xml "http://localhost:8000/transfers"</b></pre>
2456 </div><div class="exampleInner" style="background-color: rgb(213, 222, 227);">
2457 <pre>* Connected to localhost (127.0.0.1) port 8000 (#0)
2458 > POST /transfers HTTP/1.1
2459 > User-Agent: curl/7.19.4 (universal-apple-darwin10.0) libcurl/7.19.4 OpenSSL/0.9.8l zlib/1.2.3
2460 > Host: localhost:8000
2461 > Accept: */*
2462 > Content-Length: 836
2463 > Content-Type: application/x-www-form-urlencoded
2464 >
2465 < HTTP/1.1 303 See Other
2466 < Content-Length: 174
2467 < Server: CherryPy/3.1.2
2468 < Location: http://localhost:8000/transfers/fd5cf0cb1b6d4fbd84602982abf19ef1
2469 < Allow: DELETE, GET, HEAD, POST, PUT
2470 < Date: Fri, 12 Mar 2010 22:12:21 GMT
2471 < Content-Type: text/html
2472 <
2473 * Connection #0 to host localhost left intact
2474 * Closing connection #0
2475 This resource can be found at <a href='http://localhost:8000/transfers/fd5cf0cb1b6d4fbd84602982abf19ef1'>http://localhost:8000/transfers/fd5cf0cb1b6d4fbd84602982abf19ef1</a>.
2476 </pre></div>
2477 <div class="exampleWrapper">
2478 <p>The status of the job can now be polled at the job location:</p>
2479 <pre>
2480 > <b>curl -v 'http://localhost:8000/transfers/fd5cf0cb1b6d4fbd84602982abf19ef1'</b></pre></div><div class="exampleInner" style="background-color: rgb(213, 222, 227);">
2481 <pre>
2482 * Connected to localhost (127.0.0.1) port 8000 (#0)
2483 > GET /transfers/fd5cf0cb1b6d4fbd84602982abf19ef1 HTTP/1.1
2484 > User-Agent: curl/7.19.4 (universal-apple-darwin10.0) libcurl/7.19.4 OpenSSL/0.9.8l zlib/1.2.3
2485 > Host: localhost:8000
2486 > Accept: */*
2487 >
2488 < HTTP/1.1 200 OK
2489 < Date: Fri, 12 Mar 2010 22:45:46 GMT
2490 < Content-Length: 1037
2491 < Content-Type: text/html
2492 < Allow: DELETE, GET, HEAD, POST, PUT
2493 < Server: CherryPy/3.1.2
2494 <
2495 &lt;uws:job xmlns:uws="http://www.ivoa.net/xml/UWS/v1.0" xmlns:xlink="http://www.w3.org/1999/xlink"
2496 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.ivoa.net/xml/UWS/v1.0 UWS.xsd">
2497 &lt;uws:jobId>fd5cf0cb1b6d4fbd84602982abf19ef1&lt;/uws:jobId>
2498 &lt;uws:ownerId xsi:nil="true"/>
2499 &lt;uws:phase>COMPLETED&lt;/uws:phase>
2500 &lt;uws:startTime>2010-03-12T22:45:25.568694&lt;/uws:startTime>
2501 &lt;uws:endTime>2010-03-12T22:45:25.568840&lt;/uws:endTime>
2502 &lt;uws:executionDuration>0&lt;/uws:executionDuration>
2503 &lt;uws:destruction xsi:nil="true"/>
2504 &lt;uws:jobInfo>
2505 &lt;vos:transfer>
2506 &lt;vos:target>vos://nvo.caltech!vospace/mydata1&lt;/vos:target>
2507 &lt;vos:direction>pushToVoSpace&lt;/vos:direction>
2508 &lt;vos:view uri="ivo://net.ivoa/vospace/core#fits"/>
2509 &lt;vos:protocol uri="ivo://net.ivoa/vospace/core#httpput" authType="ivo://net.ivoa/vospace/core#anon"/>
2510 &lt;/vos:transfer>
2511 &lt;uws:jobInfo>
2512 &lt;uws:results>
2513 &lt;uws:result id="transferDetails"
2514 xlink:href="http://localhost:8000/transfers/fd5cf0cb1b6d4fbd84602982abf19ef1/results/details"/>
2515 &lt;/uws:results>
2516 &lt;/uws:job>
2517 * Connection #0 to host localhost left intact
2518 * Closing connection #0
2519 </pre></div>
2520 <div class="exampleWrapper">
2521 <p>The final negotiated details of the transfer can be retrieved from
2522 the URL reported in the result element:</p>
2523 <pre>
2524 > <b>curl -v "http://localhost:8000/transfers/fd5cf0cb1b6d4fbd84602982abf19ef1/results/details"</b></pre></div><div class="exampleInner" style="background-color: rgb(213, 222, 227);">
2525 <pre>
2526 * Connected to localhost (127.0.0.1) port 8000 (#0)
2527 > GET /transfers/fd5cf0cb1b6d4fbd84602982abf19ef1/results/details HTTP/1.1
2528 > User-Agent: curl/7.19.4 (universal-apple-darwin10.0) libcurl/7.19.4 OpenSSL/0.9.8l zlib/1.2.3
2529 > Host: localhost:8000
2530 > Accept: */*
2531 >
2532 < HTTP/1.1 200 OK
2533 < Date: Fri, 12 Mar 2010 22:46:17 GMT
2534 < Content-Length: 316
2535 < Content-Type: text/html
2536 < Allow: DELETE, GET, HEAD, POST, PUT
2537 < Server: CherryPy/3.1.2
2538 <
2539 &lt;transfer>
2540 &lt;target>vos://nvo.caltech!vospace/mydata1&lt;/target>
2541 &lt;direction>pushToVoSpace&lt;/direction>
2542 &lt;view>ivo://ivoa.net/vospace/core#fits&lt;/view>
2543 &lt;protocol uri="ivo://ivoa.net/vospace/core#httpput" authType="ivo://net.ivoa/vospace/core#anon">
2544 &lt;endpoint>http://localhost:8000/data/d55814f88d974c21afe5ad50e4e875c8&lt;/endpoint>
2545 &lt;/protocol>
2546 &lt;/transfer>
2547 * Connection #0 to host localhost left intact
2548 * Closing connection #0
2549 </pre></div>
2550 <div class="exampleWrapper">
2551 <p>The FITS image can then be uploaded to the specified HTTP endpoint.</p>
2552 </div></div>
2553
2554 <h4><a name="sec5_4_2">5.4.2 pullToVoSpace</h4>
2555 <p>Import data into a VOSpace node.
2556 </p><p>
2557 This method asks the server to fetch data from a remote location.
2558 </p><p>
2559 The data transfer is initiated by the VOSpace service and transferred direct into the target Node.
2560 </p><p>
2561 The data source can be another VOSpace service, or a standard HTTP or FTP server.
2562 </p><p>
2563 The primary use case for this method is transferring data from one server or service to another.
2564 </p>
2565 <p>
2566 This operation is OPTIONAL.
2567 </p>
2568 <h5><a name="sec5_4_2_1">5.4.2.1 Request</a></h5>
2569 <ul><li> A HTTP POST of a Job representation for the transfer to http://rest-endpoint/transfers
2570 </ul>
2571 <p>If a Node already exists at the target URI, then the data SHALL be imported into the existing Node and the Node properties SHALL be cleared unless the node is a ContainerNode.
2572 </p><p>
2573 If there is no Node at the target URI, then the service SHALL create a new Node using the uri, and the default xsi:type for the space.
2574 </p><p>
2575 <!--<font color="red">The Transfer details SHOULD include the View and -->
2576 <!--a list of one or more Protocols with valid endpoints and -->
2577 <!--parameters. The endpoint SHOULD normally refer to the source URL -->
2578 <!--for the transfer protocol. </font> -->
2579 </p>
2580 <h5><a name="sec5_4_2_2">5.4.2.2 Response</a></h5>
2581 <ul><li>The initial response is a HTTP 303 status code with the
2582 Location header keyword assigned to the created job.
2583 </ul>
2584 <h5><a name="sec5_4_2_3">5.4.2.3 Faults</a></h5>
2585 <p>For all faults, the service shall set the PHASE to "ERROR" in the Job
2586 representation. The &lt;errorSummary&gt; element in the Job representation
2587 shall be set to the appropriate value for the fault type and the
2588 appropriate fault representation (see section 5.5) provided at the error URI:
2589 http://rest-endpoint/transfers/(jobid)/error.</p>
2590 <table>
2591 <tr><th align="left">Fault description</th><th
2592 align="left">errorSummary</th><th align="left">Fault representation</th></tr>
2593 <tr><td>Operation not supported</td><td>Operation Not Supported</td><td>OperationNotSupported</td></tr>
2594 <tr><td>Operation fails</td><td>Internal Fault</td><td>InternalFault</td></tr>
2595 <tr><td>User does not have permissions to perform the
2596 operation</td><td>Permission
2597 Denied</td><td>PermissionDenied</td></tr>
2598 <tr><td>Service does not support the requested View</td><td>View Not
2599 Supported</td><td>ViewNotSupported</td></tr>
2600 <tr><td>Service supports none of the requested
2601 Protocols</td><td>Protocol Not
2602 Supported</td><td>ProtocolNotSupported</td></tr>
2603 <tr><td>Destination URI is invalid</td><td>Invalid URI</td><td>InvalidURI</td></tr>
2604 <tr><td>A View parameter is invalid</td><td>Invalid Argument</td><td>InvalidArgument</td></tr>
2605 <tr><td>A Protocol parameter is invalid</td><td>Invalid
2606 Argument</td><td>InvalidArgument</td></tr>
2607 <tr><td>Data format does not match the requested
2608 View</td><td>Invalid Data</td><td>InvalidData</td></tr>
2609 </table>
2610 <h5><a name="sec5_4_2_4">5.4.2.4 Notes</a></h5>
2611 <p>If the Job request contains more than one protocol parameter, then
2612 the service MAY fail over to use one or more of the options if
2613 the first one fails. The service SHOULD try each protocol
2614 option in turn until one succeeds or all have been tried.</p>
2615
2616 <!-- 5.4.2.5 Example -->
2617 <div class="exampleOuter">
2618 <div class="exampleHeader">Example: pullToVoSpace</div>
2619 <div class="exampleWrapper">
2620 <p>The Job to be submitted (newJob.xml) is:</p>
2621 <pre>
2622 &lt;vos:transfer xmlns:vos="http://www.ivoa.net/xml/VOSpace/v2.0">
2623 &lt;vos:target>vos://nvo.caltech!vospace/mydata1&lt;/vos:target>
2624 &lt;vos:direction>pullToVoSpace&lt;/vos:direction>
2625 &lt;vos:view uri="ivo://ivoa.net/vospace/core#fits"/>
2626 &lt;vos:protocol uri="ivo://ivoa.net/vospace/core#httpget">
2627 &lt;vos:protocolEndpoint>http://some.server.com/here/is/the/data&lt;/vos:protocolEndpoint>
2628 &lt;/vos:protocol>
2629 &lt;/vos:transfer>
2630 </pre>
2631 <pre>
2632 > <b>curl -v -X POST -d @newJob.xml "http://localhost:8000/transfers"</b></pre>
2633 </div><div class="exampleInner" style="background-color: rgb(213, 222, 227);">
2634 <pre>* Connected to localhost (127.0.0.1) port 8000 (#0)
2635 > POST /transfers HTTP/1.1
2636 > User-Agent: curl/7.19.4 (universal-apple-darwin10.0) libcurl/7.19.4 OpenSSL/0.9.8l zlib/1.2.3
2637 > Host: localhost:8000
2638 > Accept: */*
2639 > Content-Length: 932
2640 > Content-Type: application/x-www-form-urlencoded
2641 >
2642 < HTTP/1.1 303 See Other
2643 < Content-Length: 174
2644 < Server: CherryPy/3.1.2
2645 < Location: http://localhost:8000/transfers/ea901be0f7ef41668df9916ca25820f8
2646 < Allow: DELETE, GET, HEAD, POST, PUT
2647 < Date: Fri, 12 Mar 2010 23:36:58 GMT
2648 < Content-Type: text/html
2649 <
2650 * Connection #0 to host localhost left intact
2651 * Closing connection #0
2652 This resource can be found at <a href='http://localhost:8000/transfers/ea901be0f7ef41668df9916ca25820f8'>http://localhost:8000/transfers/ea901be0f7ef41668df9916ca25820f8</a>.
2653 </pre>
2654 </div>
2655 <div class="exampleWrapper">
2656 <p>The status of the job can now be polled at the phase endpoint:</p>
2657 <pre>
2658 > <b>curl -v "http://localhost:8000/transfers/ea901be0f7ef41668df9916ca25820f8/phase"</b></pre>
2659 </div><div class="exampleInner" style="background-color: rgb(213, 222, 227);">
2660 <pre>
2661 * Connected to localhost (127.0.0.1) port 8000 (#0)
2662 > GET /transfers/ea901be0f7ef41668df9916ca25820f8/phase HTTP/1.1
2663 > User-Agent: curl/7.19.4 (universal-apple-darwin10.0) libcurl/7.19.4 OpenSSL/0.9.8l zlib/1.2.3
2664 > Host: localhost:8000
2665 > Accept: */*
2666 >
2667 < HTTP/1.1 200 OK
2668 < Date: Fri, 12 Mar 2010 23:37:02 GMT
2669 < Content-Length: 9
2670 < Content-Type: text/html
2671 < Allow: DELETE, GET, HEAD, POST, PUT
2672 < Server: CherryPy/3.1.2
2673 <
2674 EXECUTING
2675 * Connection #0 to host localhost left intact
2676 * Closing connection #0
2677 </pre></div></div>
2678
2679 <h3><a name="sec5_4_3">5.4.3 pullFromVoSpace</h3>
2680 <p>Request a set of URLs that the client can read data from.</p>
2681
2682 <p>The client requests access to the data in a Node, and the server SHALL respond with a set of
2683 URLs that the client can read the data from. </p>
2684
2685 <h5><a name="sec5_4_3_1">5.4.3.1 Request</a></h5>
2686 <ul><li> A HTTP POST of a Job representation for the transfer to http://rest-endpoint/transfers
2687 </ul><p>
2688 The transfer representation SHOULD contain details of the View and a list of the Protocols that the client would like to use.
2689 </p><p>
2690 The list of Protocols SHOULD not contain endpoint addresses; the service SHALL supply the endpoint addresses in the response.
2691 </p><p>
2692 The service SHALL ignore any of the requested protocols that it does not understand or is unable to support.
2693 </p>
2694 <p>
2695 A transfer may also be initiated by a HTTP POST of a Job
2696 representation for the transfer to http://rest-endpoint/sync. The
2697 assumed transport protocol is HTTP GET but transfer negotiation is possible.
2698 </p>
2699 <p>There is also an alternate, optimized convenience mode:</p>
2700 <ul><li>A HTTP GET to the /sync endpoint with transfer parameters in the query string will issue a redirect to the data transfer endpoint directly:
2701 <ul><li>curl -d "TARGET=vos://nvo.caltech!vospace/mydata1&DIRECTION=pullFromVoSpace&PROTOCOL=ivo://ivoa.net/vospace/core#httpget&REQUEST=redirct" "http://localhost:8000/sync"
2702 </ul></ul>
2703 <p>Other values of the URL parameter "view" may be used by individual
2704 services for particular purposes, e.g., "view=rss" to identify a RSS
2705 feed on the resource.</p>
2706
2707 <h5><a name="sec5_4_3_2">5.4.3.2 Response</a></h5>
2708 <ul><li>The initial response for the UWS mode is a HTTP 303 status code
2709 with the Location header keyword assigned to the created job
2710 </ul><p>
2711 The service SHALL select which of the requested Protocols it is
2712 willing to provide and fill in the operational details for each one in
2713 the transfer result representation - this SHOULD normally include specifying the source URL of the transfer protocol endpoint.
2714 </p><p>
2715 The service response SHOULD not include any Protocols that it is unable to support.
2716 </p>
2717 <p>
2718 The transfer results representation can be retrieved directly from the
2719 link reported in the Results List, available either from the results
2720 endpoint - http://rest-endpoint/transfers/(jobid)/results - or as part
2721 of the full Job representation for the completed transfer available from
2722 http://rest-endpoint/transfers/(jobid). In the latter case, the result
2723 element in the Results List SHALL have an id of "transferDetails":</p>
2724 <pre>
2725 &lt;uws:job>
2726 ...
2727 &lt;uws:results>
2728 &lt;uws:result id="transferDetails" xlink:href="http://rest-endpoint/transfers/(jobid)/results/details1"/>
2729 &lt;/uws:results>
2730 ...
2731 &lt; /uws:job>
2732 </pre>
2733 <p>
2734 If the transfer was initiated with a HTTP POST to
2735 http://rest-endpoint/sync then the response is:
2736 <ul><li>A HTTP 303 status code with the Location
2737 header keyword assigned to the endpoint: http://rest-endpoint/transfers/(jobid)/results/transferDetails.
2738 </ul>
2739 The HTTP 303 redirect points to a transfer representation with the
2740 required transfer details and endpoints.
2741 </p>
2742 <p>For the alternate convenience mode (HTTP GET to the node):</p>
2743 <ul><li>A direct byte stream for the node</ul>
2744 <p>or</p>
2745 <ul>
2746 <li>A HTTP 303 status code with the Location header keyword assigned
2747 to an endpoint where a direct byte stream can be obtained
2748 </ul>
2749 <p>Although HTTP GET is the assumed transfer protocol in this mode,
2750 the HTTP 303 redirect could point to a endpoint supported by an
2751 alternate transfer protocol, i.e. a FTP endpoint. The client can
2752 check for this on the scheme returned URI.</p>
2753 <h5><a name="sec5_4_3_3">5.4.3.3 Faults</a></h5>
2754 <p>For all faults using the UWS mode, the service shall set the PHASE to "ERROR" in the Job
2755 representation. The &lt;errorSummary&gt; element in the Job representation
2756 shall be set to the appropriate value for the fault type and the
2757 appropriate fault representation (see section 5.5) provided at the error URI:
2758 http://rest-endpoint/transfers/(jobid)/error.</p>
2759 <table>
2760 <tr><th align="left">Fault description</th><th
2761 align="left">errorSummary</th><th align="left">Fault representation</th></tr>
2762 <tr><td>Operation fails</td><td>Internal Fault</td><td>InternalFault</td></tr>
2763 <tr><td>User does not have permissions to perform the
2764 operation</td><td>Permission
2765 Denied</td><td>PermissionDenied</td></tr>
2766 <tr><td>Source Node does not exist</td><td>Node Not Found</td><td>NodeNotFound</td></tr>
2767 <tr><td>Service does not support the requested View</td><td>View Not
2768 Supported</td><td>ViewNotSupported</td></tr>
2769 <tr><td>Service supports none of the requested
2770 Protocols</td><td>Protocol Not
2771 Supported</td><td>ProtocolNotSupported</td></tr>
2772 <tr><td>A View parameter is invalid</td><td>Invalid Argument</td><td>InvalidArgument</td></tr>
2773 <tr><td>A Protocol parameter is invalid</td><td>Invalid
2774 Argument</td><td>InvalidArgument</td></tr>
2775 </table>
2776
2777 <p>If an error occurs with the alternate convenience mode, the
2778 resulting transfers document SHOULD have no protocols. The
2779 client can then retrieve the Job representation for error
2780 information as with asynchronous transfers.</p>
2781
2782
2783 <h5><a name="sec5_4_3_4">5.4.3.4 Notes</a></h5>
2784 <p>The endpoint URLs supplied in the UWS response SHOULD be considered as 'one shot' URLs. A VOSpace service connected to a standard web server MAY return the public URL for the data. However, a different implementation MAY create a unique single use URL specifically for this transfer. </p>
2785
2786 <!-- 5.4.3.5 Example -->
2787 <div class="exampleOuter">
2788 <div class="exampleHeader">Example: pullFromVoSpace</div>
2789 <div class="exampleWrapper">
2790 <p>The Job to be submitted (newJob.xml) is:</p>
2791 <pre>
2792 &lt;vos:transfer xmlns:vos="http://www.ivoa.net/xml/VOSpace/v2.0">
2793 &lt;vos:target>vos://nvo.caltech!vospace/mydata1&lt;/vos:target>
2794 &lt;vos:direction>pullFromVoSpace&lt;/vos:direction>
2795 &lt;vos:view uri="ivo://ivoa.net/vospace/core#defaultview"/>
2796 &lt;vos:protocol uri="ivo://ivoa.net/vospace/core#httpget" authType="ivo://net.ivoa/vospace/core#anon"/>
2797 &lt;vos:protocol uri="ivo://ivoa.net/vospace/core#ftpget"/>
2798 &lt;/vos:transfer>
2799 </pre>
2800 <pre>
2801 > <b>curl -v -X POST -d @newJob.xml "http://localhost:8000/transfers"</b></pre>
2802 </div><div class="exampleInner" style="background-color: rgb(213, 222, 227);">
2803 <pre>* Connected to localhost (127.0.0.1) port 8000 (#0)
2804 > POST /transfers HTTP/1.1
2805 > User-Agent: curl/7.19.4 (universal-apple-darwin10.0) libcurl/7.19.4 OpenSSL/0.9.8l zlib/1.2.3
2806 > Host: localhost:8000
2807 > Accept: */*
2808 > Content-Length: 928
2809 > Content-Type: application/x-www-form-urlencoded
2810 >
2811 < HTTP/1.1 303 See Other
2812 < Content-Length: 174
2813 < Server: CherryPy/3.1.2
2814 < Location: http://localhost:8000/transfers/1ce91a4346b54432a4fd4a756fc75397
2815 < Allow: DELETE, GET, HEAD, POST, PUT
2816 < Date: Fri, 12 Mar 2010 23:46:46 GMT
2817 < Content-Type: text/html
2818 <
2819 * Connection #0 to host localhost left intact
2820 * Closing connection #0
2821 This resource can be found at <a
2822 href='http://localhost:8000/transfers/1ce91a4346b54432a4fd4a756fc75397'>http://localhost:8000/transfers/1ce91a4346b54432a4fd4a756fc75397</a>.
2823 </pre></div>
2824 <div class="exampleWrapper">
2825 <p>Once the job has completed (by polling the phase endpoint of the
2826 service), the results can be obtained from the result endpoint:</p>
2827 <pre>
2828 > <b>curl -v "http://localhost:8000/transfers/1ce91a4346b54432a4fd4a756fc75397/results"</b></pre>
2829 </div><div class="exampleInner" style="background-color: rgb(213, 222, 227);">
2830 <pre>* Connected to localhost (127.0.0.1) port 8000 (#0)
2831 > GET /transfers/1ce91a4346b54432a4fd4a756fc75397/results HTTP/1.1
2832 > User-Agent: curl/7.19.4 (universal-apple-darwin10.0) libcurl/7.19.4 OpenSSL/0.9.8l zlib/1.2.3
2833 > Host: localhost:8000
2834 > Accept: */*
2835 >
2836 < HTTP/1.1 200 OK
2837 < Date: Sat, 13 Mar 2010 00:00:20 GMT
2838 < Content-Length: 239
2839 < Content-Type: text/html
2840 < Allow: DELETE, GET, HEAD, POST, PUT
2841 < Server: CherryPy/3.1.2
2842 <
2843 &lt;ns0:results xmlns:ns0="http://www.ivoa.net/xml/UWS/v1.0">
2844 &lt;ns0:result xmlns:ns1="http://www.w3.org/1999/xlink" id="transferDetails"
2845 ns1:href="http://localhost:8000/transfers/83c19a500b1c48108d631f1aa020e8bb/results/details"/>
2846 &lt;/ns0:results>
2847 * Connection #0 to host localhost left intact
2848 * Closing connection #0
2849 </pre></div>
2850 <div class="exampleWrapper">
2851 <p>The final negotiated details of the transfer can then be retrieved
2852 from the URL reported in the result element:</p>
2853 <pre>
2854 > <b>curl -v "http://localhost:8000/transfers/83c19a500b1c48108d631f1aa020e8bb/results/details"</b></pre>
2855 </div><div class="exampleInner" style="background-color: rgb(213, 222, 227);">
2856 <pre>* Connected to localhost (127.0.0.1) port 8000 (#0)
2857 > GET /transfers/1ce91a4346b54432a4fd4a756fc75397/results/details HTTP/1.1
2858 > User-Agent: curl/7.19.4 (universal-apple-darwin10.0) libcurl/7.19.4 OpenSSL/0.9.8l zlib/1.2.3
2859 > Host: localhost:8000
2860 > Accept: */*
2861 >
2862 < HTTP/1.1 200 OK
2863 < Date: Sat, 13 Mar 2010 00:13:18 GMT
2864 < Content-Length: 477
2865 < Content-Type: text/html
2866 < Allow: DELETE, GET, HEAD, POST, PUT
2867 < Server: CherryPy/3.1.2
2868 <
2869 &lt;transfer>
2870 &lt;target>vos://nvo.caltech!vospace/mydata1&lt;/target>
2871 &lt;direction>pullFromVoSpace&lt;/direction>
2872 &lt;view uri="ivo://ivoa.net/vospace/core#defaultview"/>
2873 &lt;protocol uri="ivo://ivoa.net/vospace/core#httpget" authType="ivo://net.ivoa/vospace/core#anon">
2874 &lt;endpoint>http://localhost:8000/data/d27282305c6746889691e914abab9403&lt;/endpoint>
2875 &lt;/protocol>
2876 &lt;protocol uri="ivo://ivoa.net/vospace/core#ftpget">
2877 &lt;endpoint>ftp://localhost:8000/data/0d4824049dd444a290f6a524323dbcd0&lt;/endpoint>
2878 &lt;/protocol>
2879 &lt;/transfer>
2880 * Connection #0 to host localhost left intact
2881 * Closing connection #0
2882 </pre></div></div>
2883
2884 <h3><a name="sec5_4_4">5.4.4 pushFromVoSpace</h3>
2885 <p>Ask the server to send data to a remote location.
2886 </p><p>
2887 The client supplies a list of URLs and asks the server to send the data to the remote location.
2888 </p><p>
2889 The transfer is initiated by the server, and the data transferred direct from the server to the remote location.
2890 </p>
2891 <p>
2892 This operation is OPTIONAL.
2893 </p>
2894 <h5><a name="sec5_4_4_1">5.4.4.1 Request</a></h5>
2895 <ul><li> A HTTP POST of a Job representation for the transfer to http://rest-endpoint/transfers
2896 </ul>
2897 <!--<p><font color="red">The Transfer details SHOULD include the View and a list of one or more Protocols with valid endpoint and parameters. The endpoints will normally refer to the destination URLs for the transfer protocols.</font> -->
2898 </p>
2899 <h5><a name="sec5_4_4_2">5.4.4.2 Response</a></h5>
2900 <ul><li>The initial response is a HTTP 303 status code with the
2901 Location header keyword assigned to the created job.</ul>
2902 </ul>
2903 <h5><a name="sec5_4_4_3">5.4.4.3 Faults</a></h5>
2904 <table>
2905 <tr><th align="left">Fault description</th><th
2906 align="left">errorSummary</th><th align="left">Fault representation</th></tr>
2907 <tr><td>Operation not supported</td><td>Operation Not Supported</td><td>OperationNotSupported</td></tr>
2908 <tr><td>Operation fails</td><td>Internal Fault</td><td>InternalFault</td></tr>
2909 <tr><td>User does not have permissions to perform the
2910 operation</td><td>Permission
2911 Denied</td><td>PermissionDenied</td></tr>
2912 <tr><td>Source Node does not exist</td><td>Node Not Found</td><td>NodeNotFound</swtd></tr>
2913
2914 <tr><td>Service does not support the requested View</td><td>View Not
2915 Supported</td><td>ViewNotSupported</td></tr>
2916 <tr><td>Service supports none of the requested
2917 Protocols</td><td>Protocol Not
2918 Supported</td><td>ProtocolNotSupported</td></tr>
2919 <tr><td>Destination URI is invalid</td><td>Invalid URI</td><td>InvalidURI</td></tr>
2920 <tr><td>A Protocol parameter is invalid</td><td>Invalid
2921 Argument</td><td>InvalidArgument</td></tr>
2922 <tr><td>Data transfer does not complete</td><td>Transfer Failed</td><td>TransferFailed</td></tr>
2923 </table>
2924
2925 <h5><a name="sec5_4_4_4">5.4.4.4 Notes</a></h5>
2926 <p>
2927 If the Job request contains more than one protocol parameter then the service MAY fail over to use one or more of the options if the first one fails. The service SHOULD try each protocol option in turn until one succeeds or all have been tried.
2928 </p>
2929 <!-- 5.4.4.5 Example -->
2930 <div class="exampleOuter">
2931 <div class="exampleHeader">Example: pushFromVoSpace</div>
2932 <div class="exampleWrapper">
2933 <p>The Job to be submitted (newJob.xml) is:</p>
2934 <pre>
2935 &lt;vos:transfer xmlns:vos="http://www.ivoa.net/xml/VOSpace/v2.0">
2936 &lt;vos:target">vos://nvo.caltech!vospace/mydata1&lt;/uws:parameter>
2937 &lt;vos:direction">pushFromVoSpace&lt;/uws:parameter>
2938 &lt;vos:view">ivo://ivoa.net/vospace/core#defaultview&lt;/uws:parameter>
2939 &lt;vos:protocol uri="ivo://ivoa.net/vospace/core#httpput">
2940 &lt;vos:protocolEndpoint>http://some.server.com/put/the/data/here&lt;/vos:protocolEndpoint>
2941 &lt;/vos:protocol>
2942 &lt;vos:protocol uri="ivo://ivoa.net/vospace/core#ftpput">
2943 &lt;vos:protocolEndpoint>ftp://some.other.server.com/put/the/data/here&lt;/vos:protocolEndpoint>
2944 &lt;/vos:protocol>
2945 &lt;/vos:transfer>
2946 </pre>
2947 <pre>
2948 > <b>curl -v -X POST -d @newJob.xml "http://localhost:8000/transfers"</b></pre>
2949 </div><div class="exampleInner" style="background-color: rgb(213, 222, 227);">
2950 <pre>* Connected to localhost (127.0.0.1) port 8000 (#0)
2951 > POST /transfers HTTP/1.1
2952 > User-Agent: curl/7.19.4 (universal-apple-darwin10.0) libcurl/7.19.4 OpenSSL/0.9.8l zlib/1.2.3
2953 > Host: localhost:8000
2954 > Accept: */*
2955 > Content-Length: 942
2956 > Content-Type: application/x-www-form-urlencoded
2957 >
2958 < HTTP/1.1 303 See Other
2959 < Content-Length: 174
2960 < Server: CherryPy/3.1.2
2961 < Location: http://localhost:8000/transfers/346d5cd27a0d405a8311819c90818cbc
2962 < Allow: DELETE, GET, HEAD, POST, PUT
2963 < Date: Sat, 13 Mar 2010 00:41:20 GMT
2964 < Content-Type: text/html
2965 <
2966 * Connection #0 to host localhost left intact
2967 * Closing connection #0
2968 This resource can be found at <a href='http://localhost:8000/transfers/346d5cd27a0d405a8311819c90818cbc'>http://localhost:8000/transfers/346d5cd27a0d405a8311819c90818cbc</a>.
2969 </pre>
2970 </div>
2971 <div class="exampleWrapper">
2972 <p>The Job can then be started with:</p>
2973 <pre>
2974 > <b>curl -v -d PHASE=RUN http://localhost:8000/transfers/346d5cd27a0d405a8311819c90818cbc</b></pre>
2975 </div><div class="exampleInner" style="background-color: rgb(213, 222, 227);">
2976 <pre>* Connected to localhost (127.0.0.1) port 8000 (#0)
2977 > POST /transfers HTTP/1.1
2978 > User-Agent: curl/7.19.4 (universal-apple-darwin10.0) libcurl/7.19.4 OpenSSL/0.9.8l zlib/1.2.3
2979 > Host: localhost:8000
2980 > Accept: */*
2981 > Content-Length: 9
2982 > Content-Type: application/x-www-form-urlencoded
2983 >
2984 </pre>
2985 </div>
2986 <div class="exampleWrapper">
2987 <p>The status of the job can now be polled at the phase endpoint:</p>
2988 <pre>
2989 > <b>curl -v "http://localhost:8000/transfers/346d5cd27a0d405a8311819c90818cbc/phase"</b></pre>
2990 </div><div class="exampleInner" style="background-color: rgb(213, 222, 227);">
2991 <pre>
2992 * Connected to localhost (127.0.0.1) port 8000 (#0)
2993 > GET /transfers/346d5cd27a0d405a8311819c90818cbc/phase HTTP/1.1
2994 > User-Agent: curl/7.19.4 (universal-apple-darwin10.0) libcurl/7.19.4 OpenSSL/0.9.8l zlib/1.2.3
2995 > Host: localhost:8000
2996 > Accept: */*
2997 >
2998 < HTTP/1.1 200 OK
2999 < Date: Fri, 12 Mar 2010 23:37:02 GMT
3000 < Content-Length: 9
3001 < Content-Type: text/html
3002 < Allow: DELETE, GET, HEAD, POST, PUT
3003 < Server: CherryPy/3.1.2
3004 <
3005 COMPLETED
3006 * Connection #0 to host localhost left intact
3007 * Closing connection #0
3008 </pre></div></div>
3009
3010 <h3><a name="sec5_5">5.5 Fault arguments</a></h3>
3011 <p>Faults reported by a VOSpace service SHALL contain the following information:</p>
3012 <h4><a name="sec5_5_1">5.5.1 InternalFault</a></h4>
3013 <p>This is thrown with a description of the cause of the fault. </p>
3014 <h4><a name="sec5_5_2">5.5.2 PermissionDenied </a></h4>
3015 <p>This is thrown with a description of why the credentials (if any were provided) were rejected. </p>
3016 <h4><a name="sec5_5_3">5.5.3 InvalidURI </a></h4>
3017 <p>This is thrown with details of the invalid URI. </p>
3018 <h4><a name="sec5_5_4">5.5.4 NodeNotFound </a></h4>
3019 <p>This is thrown with the URI of the missing Node. </p>
3020 <h4><a name="sec5_5_5">5.5.5 DuplicateNode </a></h4>
3021 <p>This is thrown with the URI of the duplicate Node.</p>
3022 <h4><a name="sec5_5_6">5.5.6 InvalidToken </a></h4>
3023 <p>This is thrown with the invalid token. </p>
3024 <h4><a name="sec5_5_7">5.5.7 InvalidArgument </a></h4>
3025 <p>This is thrown with a description of the invalid argument, including the View or Protocol URI and the name and value of the parameter that caused the fault. </p>
3026 <h4><a name="sec5_5_8">5.5.8 TypeNotSupported </a></h4>
3027 <p>This is thrown with the QName of the unsupported type.</p>
3028 <h4><a name="sec5_5_9">5.5.9 ViewNotSupported </a></h4>
3029 <p>This is thrown with the uri of the View. </p>
3030 <h4><a name="sec5_5_10">5.5.10 InvalidData </a></h4>
3031 <p>This is thrown with any error message that the data parser produced.</p>
3032 <h4><a name=