@@ -17,25 +17,40 @@ To get an attribute of a group:
17
17
.. code-block :: http
18
18
19
19
GET /groups/<id>/attributes/<name> HTTP/1.1
20
- Host : DOMAIN
20
+ X-Hdf-domain : DOMAIN
21
21
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
+
23
28
To get an attribute of a dataset:
24
29
25
30
.. code-block :: http
26
31
27
32
GET /datasets/<id>/attributes/<name> HTTP/1.1
28
- Host : DOMAIN
33
+ X-Hdf-domain : DOMAIN
29
34
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
+
31
41
To get an attribute of a datatype:
32
42
33
43
.. code-block :: http
34
44
35
45
GET /datatypes/<id>/attributes/<name> HTTP/1.1
36
- Host : DOMAIN
46
+ X-Hdf-domain : DOMAIN
37
47
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
+
39
54
where:
40
55
41
56
* *<id> * is the UUID of the dataset/group/committed datatype
@@ -105,51 +120,57 @@ Examples
105
120
Sample Request
106
121
--------------
107
122
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 -...".
109
124
110
125
.. code-block :: http
111
126
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
114
130
Accept-Encoding: gzip, deflate
115
131
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
+
118
140
Sample Response
119
141
---------------
120
142
121
143
.. code-block :: http
122
144
123
145
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
126
148
Etag: "55b2e2ce2d3a2449a49cfd76c4dae635ec43a150"
127
149
Content-Type: application/json
128
- Server: TornadoServer/3.2.2
129
-
150
+ Server: nginx/1.15.0
151
+
130
152
.. code-block :: json
131
153
132
154
{
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
+ ]
151
172
}
152
-
173
+
153
174
Related Resources
154
175
=================
155
176
@@ -159,6 +180,6 @@ Related Resources
159
180
* :doc: `../DatatypeOps/GET_Datatype `
160
181
* :doc: `../GroupOps/GET_Group `
161
182
* :doc: `PUT_Attribute `
162
-
183
+
163
184
164
185
0 commit comments