Skip to content

Commit 44fdc7e

Browse files
authored
Merge pull request #2 from jhendersonHDF/master
Update examples in DomainOps and GroupOps
2 parents 935486c + c621a8c commit 44fdc7e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+1384
-1818
lines changed

AdminTools.rst

Lines changed: 0 additions & 104 deletions
This file was deleted.

AttrOps/DELETE_Attribute.rst

Lines changed: 50 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@ DELETE Attribute
44

55
Description
66
===========
7-
The implementation of the DELETE operation deletes the attribute named in the URI. All
8-
attributes and links of the dataset will also be deleted.
7+
The implementation of the DELETE operation deletes the attribute named in the URI.
98

109
Requests
1110
========
@@ -15,12 +14,39 @@ Syntax
1514
.. code-block:: http
1615
1716
DELETE /groups/<id>/<name> HTTP/1.1
18-
Host: DOMAIN
17+
X-Hdf-domain: DOMAIN
1918
Authorization: <authorization_string>
20-
19+
20+
.. code-block:: http
21+
22+
DELETE /groups/<id>/<name>?domain=DOMAIN HTTP/1.1
23+
Authorization: <authorization_string>
24+
25+
.. code-block:: http
26+
27+
DELETE /datasets/<id>/<name> HTTP/1.1
28+
X-Hdf-domain: DOMAIN
29+
Authorization: <authorization_string>
30+
31+
.. code-block:: http
32+
33+
DELETE /datasets/<id>/<name>?domain=DOMAIN HTTP/1.1
34+
Authorization: <authorization_string>
35+
36+
.. code-block:: http
37+
38+
DELETE /datatypess/<id>/<name> HTTP/1.1
39+
X-Hdf-domain: DOMAIN
40+
Authorization: <authorization_string>
41+
42+
.. code-block:: http
43+
44+
DELETE /datatypes/<id>/<name>?domain=DOMAIN HTTP/1.1
45+
Authorization: <authorization_string>
46+
2147
* *<id>* is the UUID of the dataset/group/committed datatype
2248
* *<name>* is the url-encoded name of the requested attribute
23-
49+
2450
Request Parameters
2551
------------------
2652
This implementation of the operation does not use request parameters.
@@ -62,35 +88,34 @@ Sample Request
6288

6389
.. code-block:: http
6490
65-
DELETE /groups/36ae688a-ac0e-11e4-a44b-3c15c2da029e/attributes/attr1 HTTP/1.1
66-
Content-Length: 0
67-
User-Agent: python-requests/2.3.0 CPython/2.7.8 Darwin/14.0.0
68-
host: tall_updated.test.hdfgroup.org
91+
DELETE /groups/g-45f464d8-883e-11e8-a9dc-0242ac12000e/attributes/attr1 HTTP/1.1
92+
Host: hsdshdflab.hdfgroup.org
93+
X-Hdf-domain: /shared/tall.h5
6994
Accept: */*
7095
Accept-Encoding: gzip, deflate
71-
96+
97+
Sample cURL command
98+
-------------------
99+
100+
.. code-block:: bash
101+
102+
$ curl -X DELETE -u username:password --header "X-Hdf-domain: /shared/tall.h5" hsdshdflab.hdfgroup.org/groups/g-45f464d8-883e-11e8-a9dc-0242ac12000e/attributes/attr1
103+
72104
Sample Response
73105
---------------
74106

75107
.. code-block:: http
76108
77109
HTTP/1.1 200 OK
78-
Date: Wed, 04 Feb 2015 01:36:17 GMT
79-
Content-Length: 420
110+
Date: Sun, 15 Jul 2018 16:06:54 GMT
111+
Content-Length: 13
80112
Content-Type: application/json
81-
Server: TornadoServer/3.2.2
82-
113+
Server: nginx/1.15.0
114+
83115
.. code-block:: json
84-
85-
{
86-
"hrefs": [
87-
{"href": "http://tall_updated.test.hdfgroup.org/groups/36ae688a-ac0e-11e4-a44b-3c15c2da029e/attributes", "rel": "self"},
88-
{"href": "http://tall_updated.test.hdfgroup.org/groups/36ae688a-ac0e-11e4-a44b-3c15c2da029e", "rel": "owner"},
89-
{"href": "http://tall_updated.test.hdfgroup.org/groups/36ae688a-ac0e-11e4-a44b-3c15c2da029e", "rel": "root"},
90-
{"href": "http://tall_updated.test.hdfgroup.org/", "rel": "home"}
91-
]
92-
}
93-
116+
117+
{"hrefs": []}
118+
94119
Related Resources
95120
=================
96121

@@ -100,6 +125,6 @@ Related Resources
100125
* :doc:`../DatatypeOps/GET_Datatype`
101126
* :doc:`../GroupOps/GET_Group`
102127
* :doc:`PUT_Attribute`
103-
128+
104129

105130

AttrOps/GET_Attribute.rst

Lines changed: 56 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -17,25 +17,40 @@ To get an attribute of a group:
1717
.. code-block:: http
1818
1919
GET /groups/<id>/attributes/<name> HTTP/1.1
20-
Host: DOMAIN
20+
X-Hdf-domain: DOMAIN
2121
Authorization: <authorization_string>
22-
22+
23+
.. code-block:: http
24+
25+
GET /groups/<id>/attributes/<name>?domain=DOMAIN HTTP/1.1
26+
Authorization: <authorization_string>
27+
2328
To get an attribute of a dataset:
2429

2530
.. code-block:: http
2631
2732
GET /datasets/<id>/attributes/<name> HTTP/1.1
28-
Host: DOMAIN
33+
X-Hdf-domain: DOMAIN
2934
Authorization: <authorization_string>
30-
35+
36+
.. code-block:: http
37+
38+
GET /datasets/<id>/attributes/<name>?domain=DOMAIN HTTP/1.1
39+
Authorization: <authorization_string>
40+
3141
To get an attribute of a datatype:
3242

3343
.. code-block:: http
3444
3545
GET /datatypes/<id>/attributes/<name> HTTP/1.1
36-
Host: DOMAIN
46+
X-Hdf-domain: DOMAIN
3747
Authorization: <authorization_string>
38-
48+
49+
.. code-block:: http
50+
51+
GET /datatypes/<id>/attributes/<name>?domain=DOMAIN HTTP/1.1
52+
Authorization: <authorization_string>
53+
3954
where:
4055

4156
* *<id>* is the UUID of the dataset/group/committed datatype
@@ -105,51 +120,57 @@ Examples
105120
Sample Request
106121
--------------
107122

108-
Get an attribute named "attr1" from a group with UUID: "1a956e54-...".
123+
Get an attribute named "attr1" from a group with UUID: "g-be5996fa-...".
109124

110125
.. code-block:: http
111126
112-
GET /groups/1a956e54-abf6-11e4-b878-3c15c2da029e/attributes/attr1 HTTP/1.1
113-
host: tall.test.hdfgroup.org
127+
GET /groups/g-be5996fa-83c5-11e8-a8e6-0242ac120016/attributes/attr1 HTTP/1.1
128+
Host: hsdshdflab.hdfgroup.org
129+
X-Hdf-domain: /shared/tall.h5
114130
Accept-Encoding: gzip, deflate
115131
Accept: */*
116-
User-Agent: python-requests/2.3.0 CPython/2.7.8 Darwin/14.0.0
117-
132+
133+
Sample cURL command
134+
-------------------
135+
136+
.. code-block:: bash
137+
138+
$ curl -X GET --header "X-Hdf-domain: /shared/tall.h5" hsdshdflab.hdfgroup.org/groups/g-be5996fa-83c5-11e8-a8e6-0242ac120016/attributes/attr1
139+
118140
Sample Response
119141
---------------
120142

121143
.. code-block:: http
122144
123145
HTTP/1.1 200 OK
124-
Date: Tue, 03 Feb 2015 22:44:04 GMT
125-
Content-Length: 648
146+
Date: Sun, 15 Jul 2018 16:17:44 GMT
147+
Content-Length: 522
126148
Etag: "55b2e2ce2d3a2449a49cfd76c4dae635ec43a150"
127149
Content-Type: application/json
128-
Server: TornadoServer/3.2.2
129-
150+
Server: nginx/1.15.0
151+
130152
.. code-block:: json
131153
132154
{
133-
"name": "attr1",
134-
"type": {
135-
"class": "H5T_INTEGER",
136-
"base": "H5T_STD_I8LE"
137-
},
138-
"shape": {
139-
"class": "H5S_SIMPLE",
140-
"dims": [10]
141-
},
142-
"value": [97, 98, 99, 100, 101, 102, 103, 104, 105, 0],
143-
"created": "2015-02-03T22:40:09Z",
144-
"lastModified": "2015-02-03T22:40:09Z",
145-
"hrefs": [
146-
{"href": "http://tall.test.hdfgroup.org/groups/1a956e54-abf6-11e4-b878-3c15c2da029e/attributes/attr1", "rel": "self"},
147-
{"href": "http://tall.test.hdfgroup.org/groups/1a956e54-abf6-11e4-b878-3c15c2da029e", "rel": "owner"},
148-
{"href": "http://tall.test.hdfgroup.org/groups/1a956e54-abf6-11e4-b878-3c15c2da029e", "rel": "root"},
149-
{"href": "http://tall.test.hdfgroup.org/", "rel": "home"}
150-
]
155+
"name": "attr1",
156+
"type": {
157+
"base": "H5T_STD_I8LE",
158+
"class": "H5T_INTEGER"
159+
},
160+
"shape": {
161+
"class": "H5S_SIMPLE",
162+
"dims": [10]
163+
},
164+
"created": 1531174596.117736,
165+
"lastModified": 1531174596.117736,
166+
"value": [97, 98, 99, 100, 101, 102, 103, 104, 105, 0],
167+
"hrefs": [
168+
{"href": "hsdshdflab.hdfgroup.org/groups/g-be5996fa-83c5-11e8-a8e6-0242ac120016/attributes/attr1", "rel": "self"},
169+
{"href": "hsdshdflab.hdfgroup.org/", "rel": "home"},
170+
{"href": "hsdshdflab.hdfgroup.org/groups/g-be5996fa-83c5-11e8-a8e6-0242ac120016", "rel": "owner"}
171+
]
151172
}
152-
173+
153174
Related Resources
154175
=================
155176

@@ -159,6 +180,6 @@ Related Resources
159180
* :doc:`../DatatypeOps/GET_Datatype`
160181
* :doc:`../GroupOps/GET_Group`
161182
* :doc:`PUT_Attribute`
162-
183+
163184

164185

0 commit comments

Comments
 (0)