Skip to content

Commit 77d30c7

Browse files
committed
Updates for Datatype Ops
1 parent ea9af33 commit 77d30c7

File tree

4 files changed

+213
-155
lines changed

4 files changed

+213
-155
lines changed

DatatypeOps/DELETE_Datatype.rst

Lines changed: 24 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,16 @@ Syntax
1515
.. code-block:: http
1616
1717
DELETE /datatypes/<id> HTTP/1.1
18-
Host: DOMAIN
18+
X-Hdf-domain: DOMAIN
1919
Authorization: <authorization_string>
20-
20+
21+
.. code-block:: http
22+
23+
DELETE /datatypes/<id>?domain=DOMAIN HTTP/1.1
24+
Authorization: <authorization_string>
25+
2126
*<id>* is the UUID of the datatype to be deleted.
22-
27+
2328
Request Parameters
2429
------------------
2530
This implementation of the operation does not use request parameters.
@@ -41,11 +46,7 @@ most responses. See :doc:`../CommonResponseHeaders`.
4146
Response Elements
4247
-----------------
4348

44-
On success, a JSON response will be returned with the following elements:
45-
46-
hrefs
47-
^^^^^
48-
An array of links to related resources. See :doc:`../Hypermedia`.
49+
This implementation of the operation does not return any response elements.
4950

5051
Special Errors
5152
--------------
@@ -61,34 +62,30 @@ Sample Request
6162

6263
.. code-block:: http
6364
64-
DELETE /datatypes/93b6a335-ac44-11e4-8d71-3c15c2da029e HTTP/1.1
65+
DELETE /datatypes/t-6b0bdf9a-86b2-11e8-89f2-0242ac120009 HTTP/1.1
66+
Host: hsdshdflab.hdfgroup.org
67+
X-Hdf-domain: /shared/tall.h5
6568
Content-Length: 0
66-
User-Agent: python-requests/2.3.0 CPython/2.7.8 Darwin/14.0.0
67-
host: namedtype_deleted.test.hdfgroup.org
6869
Accept: */*
6970
Accept-Encoding: gzip, deflate
70-
71+
72+
Sample cURL command
73+
-------------------
74+
75+
.. code-block:: bash
76+
77+
$ curl -X DELETE -u username:password --header "X-Hdf-domain: /shared/tall.h5" hsdshdflab.hdfgroup.org/datatypes/t-6b0bdf9a-86b2-11e8-89f2-0242ac120009
78+
7179
Sample Response
7280
---------------
7381

7482
.. code-block:: http
7583
7684
HTTP/1.1 200 OK
77-
Date: Wed, 04 Feb 2015 08:05:26 GMT
78-
Content-Length: 363
85+
Date: Fri, 13 Jul 2018 15:49:44 GMT
7986
Content-Type: application/json
80-
Server: TornadoServer/3.2.2
81-
82-
.. code-block:: json
83-
84-
{
85-
"hrefs": [
86-
{"href": "http://namedtype_deleted.test.hdfgroup.org/datatypes", "rel": "self"},
87-
{"href": "http://namedtype_deleted.test.hdfgroup.org/", "rel": "home"},
88-
{"href": "http://namedtype_deleted.test.hdfgroup.org/groups/93b51245-ac44-11e4-8a21-3c15c2da029e", "rel": "root"}
89-
]
90-
}
91-
87+
Server: nginx/1.15.0
88+
9289
Related Resources
9390
=================
9491

@@ -98,6 +95,6 @@ Related Resources
9895
* :doc:`POST_Datatype`
9996
* :doc:`../DatasetOps/POST_Dataset`
10097
* :doc:`../AttrOps/PUT_Attribute`
101-
98+
10299

103100

DatatypeOps/GET_Datatype.rst

Lines changed: 47 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,16 @@ Syntax
1414
.. code-block:: http
1515
1616
GET /datatypes/<id> HTTP/1.1
17-
Host: DOMAIN
17+
X-Hdf-domain: DOMAIN
1818
Authorization: <authorization_string>
19-
19+
20+
.. code-block:: http
21+
22+
GET /datatypes/<id>?domain=DOMAIN HTTP/1.1
23+
Authorization: <authorization_string>
24+
2025
*<id>* is the UUID of the requested datatype.
21-
26+
2227
Request Parameters
2328
------------------
2429
This implementation of the operation does not use request parameters.
@@ -44,9 +49,12 @@ On success, a JSON response will be returned with the following elements:
4449

4550
id
4651
^^
47-
4852
The UUID of the datatype object.
4953

54+
root
55+
^^^^
56+
The root group of the domain which the datatype is within.
57+
5058
type
5159
^^^^
5260
A JSON object representing the type of the datatype object.
@@ -76,50 +84,60 @@ information on standard error codes, see :doc:`../CommonErrorResponses`.
7684
Examples
7785
========
7886

79-
Get the committed datatype with UUID: "f545543d-...".
87+
Get the committed datatype with UUID: "t-3e37ab7e-...".
8088

8189
Sample Request
8290
--------------
8391

8492
.. code-block:: http
8593
86-
GET /datatypes/f545543d-a1b4-11e4-8fa4-3c15c2da029e HTTP/1.1
87-
host: namedtype.test.hdfgroup.org
94+
GET /datatypes/t-3e37ab7e-86b3-11e8-bce3-0242ac12000c HTTP/1.1
95+
Host: hsdshdflab.hdfgroup.org
96+
X-Hdf-domain: /shared/tall.h5
8897
Accept-Encoding: gzip, deflate
8998
Accept: */*
90-
User-Agent: python-requests/2.3.0 CPython/2.7.8 Darwin/14.0.0
91-
99+
100+
Sample cURL command
101+
-------------------
102+
103+
.. code-block:: bash
104+
105+
$ curl -X GET --header "X-Hdf-domain: /shared/tall.h5" hsdshdflab.hdfgroup.org/datatypes/t-3e37ab7e-86b3-11e8-bce3-0242ac12000c
106+
92107
Sample Response
93108
---------------
94109

95110
.. code-block:: http
96111
97112
HTTP/1.1 200 OK
98-
Date: Wed, 21 Jan 2015 21:36:49 GMT
99-
Content-Length: 619
113+
Date: Fri, 13 Jul 2018 15:57:37 GMT
114+
Content-Length: 602
100115
Etag: "c53bc5b2d3c3b5059b71ef92ca7d144a2df54456"
101116
Content-Type: application/json
102-
Server: TornadoServer/3.2.2
103-
117+
Server: nginx/1.15.0
118+
104119
.. code-block:: json
105120
106121
{
107-
"id": "f545543d-a1b4-11e4-8fa4-3c15c2da029e",
108-
"type": {
109-
"base": "H5T_IEEE_F32LE",
110-
"class": "H5T_FLOAT"
111-
},
112-
"created": "2015-01-21T21:32:01Z",
113-
"lastModified": "2015-01-21T21:32:01Z",
114-
"attributeCount": 1,
115-
"hrefs": [
116-
{"href": "http://namedtype.test.hdfgroup.org/datatypes/f545543d-a1b4-11e4-8fa4-3c15c2da029e", "rel": "self"},
117-
{"href": "http://namedtype.test.hdfgroup.org/groups/f545103d-a1b4-11e4-b4a1-3c15c2da029e", "rel": "root"},
118-
{"href": "http://namedtype.test.hdfgroup.org/datatypes/f545543d-a1b4-11e4-8fa4-3c15c2da029e/attributes", "rel": "attributes"},
119-
{"href": "http://namedtype.test.hdfgroup.org/", "rel": "home"}
120-
]
122+
"id": "t-3e37ab7e-86b3-11e8-bce3-0242ac12000c",
123+
"root": "g-b116b6f0-85e9-11e8-9cc2-0242ac120008",
124+
"domain": "/shared/tall.h5",
125+
"type": {
126+
"class": "H5T_FLOAT",
127+
"base": "H5T_IEEE_F64LE"
128+
},
129+
"attributeCount": 0,
130+
"created": 1531496503.6064572,
131+
"lastModified": 1531496503.6064572,
132+
"hrefs": [
133+
{"rel": "self", "href": "hsdshdflab.hdfgroup.org/datatypes/t-3e37ab7e-86b3-11e8-bce3-0242ac12000c"},
134+
{"rel": "root", "href": "hsdshdflab.hdfgroup.org/groups/g-b116b6f0-85e9-11e8-9cc2-0242ac120008"},
135+
{"rel": "home", "href": "hsdshdflab.hdfgroup.org/"},
136+
{"rel": "attributes", "href": "hsdshdflab.hdfgroup.org/datatypes/t-3e37ab7e-86b3-11e8-bce3-0242ac12000c/attributes"}
137+
]
121138
}
122-
139+
140+
123141
Related Resources
124142
=================
125143

@@ -128,6 +146,6 @@ Related Resources
128146
* :doc:`POST_Datatype`
129147
* :doc:`../DatasetOps/POST_Dataset`
130148
* :doc:`../AttrOps/PUT_Attribute`
131-
149+
132150

133151

DatatypeOps/GET_Datatypes.rst

Lines changed: 77 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,14 @@ Syntax
1414
.. code-block:: http
1515
1616
GET /datatypes HTTP/1.1
17-
Host: DOMAIN
17+
X-Hdf-domain: DOMAIN
1818
Authorization: <authorization_string>
19-
19+
20+
.. code-block:: http
21+
22+
GET /datatypes?domain=DOMAIN HTTP/1.1
23+
Authorization: <authorization_string>
24+
2025
Request Parameters
2126
------------------
2227
This implementation of the operation uses the following request parameters (both
@@ -70,82 +75,109 @@ Sample Request
7075
.. code-block:: http
7176
7277
GET /datatypes HTTP/1.1
73-
host: namedtype.test.hdfgroup.org
78+
Host: hsdshdflab.hdfgroup.org
79+
X-Hdf-domain: /shared/tall.h5
7480
Accept-Encoding: gzip, deflate
7581
Accept: */*
76-
User-Agent: python-requests/2.3.0 CPython/2.7.8 Darwin/14.0.0
77-
82+
83+
Sample cURL command
84+
-------------------
85+
86+
.. code-block:: bash
87+
88+
$ curl -X GET --header "X-Hdf-domain: /shared/tall.h5" hsdshdflab.hdfgroup.org/datatypes
89+
7890
Sample Response
7991
---------------
8092

8193
.. code-block:: http
8294
8395
HTTP/1.1 200 OK
84-
Date: Wed, 21 Jan 2015 22:42:30 GMT
85-
Content-Length: 350
96+
Date: Fri, 13 Jul 2018 18:23:58 GMT
97+
Content-Length: 746
8698
Etag: "e01f56869a9a919b1496c463f3569a2a7c319f11"
8799
Content-Type: application/json
88-
Server: TornadoServer/3.2.2
89-
100+
Server: nginx/1.15.0
101+
90102
.. code-block:: json
91103
92104
{
93-
"datatypes": [
94-
"f54542e6-a1b4-11e4-90bf-3c15c2da029e",
95-
"f545543d-a1b4-11e4-8fa4-3c15c2da029e"
96-
],
97-
"hrefs": [
98-
{"href": "http://namedtype.test.hdfgroup.org/datatypes", "rel": "self"},
99-
{"href": "http://namedtype.test.hdfgroup.org/groups/f545103d-a1b4-11e4-b4a1-3c15c2da029e", "rel": "root"},
100-
{"href": "http://namedtype.test.hdfgroup.org/", "rel": "home"}
101-
]
105+
"datatypes": [
106+
"t-3e37ab7e-86b3-11e8-bce3-0242ac12000c",
107+
"t-af48f618-86c9-11e8-9cb8-0242ac120008",
108+
"t-b0510adc-86c9-11e8-9361-0242ac120007",
109+
"t-b0e855b8-86c9-11e8-ac22-0242ac12000d",
110+
"t-b17d24fe-86c9-11e8-b364-0242ac12000a",
111+
"t-b21dd3ea-86c9-11e8-9cb8-0242ac120008",
112+
"t-b2b2a380-86c9-11e8-9361-0242ac120007",
113+
"t-b34f3542-86c9-11e8-ac22-0242ac12000d",
114+
"t-b4659570-86c9-11e8-b364-0242ac12000a",
115+
"t-b4f32ffc-86c9-11e8-9cb8-0242ac120008",
116+
"t-b58f2b50-86c9-11e8-9361-0242ac120007",
117+
"t-b66113c2-86c9-11e8-ac22-0242ac12000d",
118+
"t-b6f8e454-86c9-11e8-b364-0242ac12000a"
119+
],
120+
"hrefs": [
121+
{"href": "hsdshdflab.hdfgroup.org/datatypes", "rel": "self"},
122+
{"href": "hsdshdflab.hdfgroup.org/groups/g-b116b6f0-85e9-11e8-9cc2-0242ac120008", "rel": "root"},
123+
{"href": "hsdshdflab.hdfgroup.org/", "rel": "home"}
124+
]
102125
}
103-
126+
104127
Sample Request with Marker and Limit
105128
------------------------------------
106129

107130
This example uses the "Marker" request parameter to return only UUIDs after the given
108131
Marker value.
109-
Also the "Limit" request parameter is used to limit the number of UUIDs in the response to 5.
132+
Also, the "Limit" request parameter is used to limit the number of UUIDs in the response to 5.
110133

111134
.. code-block:: http
112135
113-
GET /datatypes?Marker=d779cd5e-a1e6-11e4-8fc5-3c15c2da029e&Limit=5 HTTP/1.1
114-
host: type1k.test.hdfgroup.org
136+
GET /datatypes?Marker=t-b17d24fe-86c9-11e8-b364-0242ac12000a&Limit=5 HTTP/1.1
137+
Host: hsdshdflab.hdfgroup.org
138+
X-Hdf-domain: /shared/tall.h5
115139
Accept-Encoding: gzip, deflate
116140
Accept: */*
117-
User-Agent: python-requests/2.3.0 CPython/2.7.8 Darwin/14.0.0
118-
141+
142+
Sample cURL command
143+
-------------------
144+
145+
*URL enclosed in quotes to prevent shell from seeing ampersand*
146+
147+
.. code-block:: bash
148+
149+
$ curl -X GET --header "X-Hdf-domain: /shared/tall.h5" "hsdshdflab.hdfgroup.org/datatypes?Marker=t-b17d24fe-86c9-11e8-b364-0242ac12000a&Limit=5"
150+
119151
Sample Response with Marker and Limit
120152
-------------------------------------
121153

122154
.. code-block:: http
123-
155+
124156
HTTP/1.1 200 OK
125-
Date: Thu, 22 Jan 2015 03:32:13 GMT
126-
Content-Length: 461
157+
Date: Fri, 13 Jul 2018 18:30:29 GMT
158+
Content-Length: 410
127159
Etag: "a2e2d5a3ae63cd504d02b51d99f27b30d17b75b5"
128160
Content-Type: application/json
129-
Server: TornadoServer/3.2.2
130-
161+
Server: nginx/1.15.0
162+
131163
.. code-block:: json
132-
164+
133165
{
134-
"datatypes": [
135-
"d779ddd9-a1e6-11e4-89e5-3c15c2da029e",
136-
"d779ef11-a1e6-11e4-8837-3c15c2da029e",
137-
"d77a008a-a1e6-11e4-8840-3c15c2da029e",
138-
"d77a121e-a1e6-11e4-b2b0-3c15c2da029e",
139-
"d77a2523-a1e6-11e4-aa6d-3c15c2da029e"
140-
],
141-
"hrefs": [
142-
{"href": "http://type1k.test.hdfgroup.org/datatypes", "rel": "self"},
143-
{"href": "http://type1k.test.hdfgroup.org/groups/d7742c14-a1e6-11e4-b2a8-3c15c2da029e", "rel": "root"},
144-
{"href": "http://type1k.test.hdfgroup.org/", "rel": "home"}
145-
]
166+
"datatypes": [
167+
"t-b21dd3ea-86c9-11e8-9cb8-0242ac120008",
168+
"t-b2b2a380-86c9-11e8-9361-0242ac120007",
169+
"t-b34f3542-86c9-11e8-ac22-0242ac12000d",
170+
"t-b4659570-86c9-11e8-b364-0242ac12000a",
171+
"t-b4f32ffc-86c9-11e8-9cb8-0242ac120008"
172+
],
173+
"hrefs": [
174+
{"href": "hsds.local/datatypes", "rel": "self"},
175+
{"href": "hsds.local/groups/g-b116b6f0-85e9-11e8-9cc2-0242ac120008", "rel": "root"},
176+
{"href": "hsds.local/", "rel": "home"}
177+
]
146178
}
147-
148-
179+
180+
149181
Related Resources
150182
=================
151183

@@ -154,6 +186,6 @@ Related Resources
154186
* :doc:`POST_Datatype`
155187
* :doc:`../DatasetOps/POST_Dataset`
156188
* :doc:`../AttrOps/PUT_Attribute`
157-
189+
158190

159191

0 commit comments

Comments
 (0)