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