Skip to content

Commit 5da8cc1

Browse files
committed
Updates for DomainOps
1 parent 991471a commit 5da8cc1

File tree

4 files changed

+103
-59
lines changed

4 files changed

+103
-59
lines changed

DomainOps/DELETE_Domain.rst

Lines changed: 21 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,15 @@ Syntax
1414
------
1515
.. code-block:: http
1616
17-
DELETE / HTTP/1.1
18-
Host: DOMAIN
17+
DELETE / HTTP/1.1
18+
X-Hdf-domain: DOMAIN
1919
Authorization: <authorization_string>
20-
20+
21+
.. code-block:: http
22+
23+
DELETE /?domain=DOMAIN HTTP/1.1
24+
Authorization: <authorization_string>
25+
2126
Request Parameters
2227
------------------
2328
This implementation of the operation does not use request parameters.
@@ -57,23 +62,29 @@ Sample Request
5762
.. code-block:: http
5863
5964
DELETE / HTTP/1.1
65+
Host: hsdshdflab.hdfgroup.org
66+
X-Hdf-domain: /shared/deleteme.h5
6067
Content-Length: 0
61-
User-Agent: python-requests/2.3.0 CPython/2.7.8 Darwin/14.0.0
62-
host: deleteme.test.hdfgroup.org
6368
Accept: */*
69+
70+
Sample cURL command
71+
-------------------
72+
73+
.. code-block:: bash
74+
75+
$ curl -X DELETE -u username:password --header "X-Hdf-domain: /shared/deleteme.h5" hsdshdflab.hdfgroup.org/
6476
6577
Sample Response
6678
---------------
6779

6880
.. code-block:: http
6981
7082
HTTP/1.1 200 OK
71-
Date: Fri, 16 Jan 2015 03:47:33 GMT
83+
Date: Thu, 12 Jul 2018 16:33:54 GMT
7284
Content-Length: 0
73-
Content-Type: text/html; charset=UTF-8
74-
Server: TornadoServer/3.2.2
75-
76-
85+
Content-Type: application/json
86+
Server: nginx/1.15.0
87+
7788
7889
Related Resources
7990
=================

DomainOps/GET_Domain.rst

Lines changed: 42 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,14 @@ http://tall.data.hdfgroup.org:7253/
1212
returns data about the domain "tall" hosted on data.hdfgroup.org.
1313
The DNS server will determine the proper IP that maps to this domain.
1414

15-
If the DNS Server is not setup, specify the desired domain in the Host line of the http
15+
If the DNS Server is not setup, specify the desired domain in the "X-Hdf-domain" line of the http
1616
header.
1717

18-
Alternatively, the domain can be specified as a 'Host' query parameter. Example:
19-
http://127.0.0.1:7253?host=tall.data.hdfgroup.org.
18+
Alternatively, the domain can be specified as a query parameter. Example:
2019

21-
If no Host value is supplied, the default Table of Contents (TOC) domain is returned.
20+
http://127.0.0.1:7253?domain=tall.data.hdfgroup.org.
21+
22+
If no X-Hdf-domain value is supplied, the default Table of Contents (TOC) domain is returned.
2223

2324
Requests
2425
========
@@ -28,7 +29,12 @@ Syntax
2829
.. code-block:: http
2930
3031
GET / HTTP/1.1
31-
Host: DOMAIN
32+
X-Hdf-domain: DOMAIN
33+
Authorization: <authorization_string>
34+
35+
.. code-block:: http
36+
37+
GET /?domain=DOMAIN HTTP/1.1
3238
Authorization: <authorization_string>
3339
3440
Request Parameters
@@ -62,6 +68,10 @@ created
6268
^^^^^^^
6369
A timestamp giving the time the domain was created in UTC (ISO-8601 format).
6470

71+
owner
72+
^^^^^
73+
The user which owns the domain.
74+
6575
lastModified
6676
^^^^^^^^^^^^
6777
A timestamp giving the most recent time that any content in the domain has been
@@ -86,36 +96,47 @@ Sample Request
8696
.. code-block:: http
8797
8898
GET / HTTP/1.1
89-
host: tall.test.hdfgroup.org
99+
Host: hsdshdflab.hdfgroup.org
100+
X-Hdf-domain: /shared/tall.h5
90101
Accept-Encoding: gzip, deflate
91102
Accept: */*
92-
User-Agent: python-requests/2.3.0 CPython/2.7.8 Darwin/14.0.0
103+
104+
Sample cURL command
105+
-------------------
106+
107+
.. code-block:: bash
108+
109+
$ curl -X GET --header "X-Hdf-domain: /shared/tall.h5" hsdshdflab.hdfgroup.org/
93110
94111
Sample Response
95112
---------------
96113

97114
.. code-block:: http
98115
99116
HTTP/1.1 200 OK
100-
Date: Fri, 16 Jan 2015 03:51:58 GMT
101-
Content-Length: 508
117+
Date: Thu, 12 Jul 2018 16:08:23 GMT
118+
Content-Length: 638
102119
Etag: "e45bef255ffc0530c33857b88b15f551f371de38"
103120
Content-Type: application/json
104-
Server: TornadoServer/3.2.2
121+
Server: nginx/1.15.0
105122
106123
.. code-block:: json
107-
124+
108125
{
109-
"root": "052dcbbd-9d33-11e4-86ce-3c15c2da029e",
110-
"created": "2015-01-16T03:51:58Z",
111-
"lastModified": "2015-01-16T03:51:58Z",
112-
"hrefs": [
113-
{"href": "http://tall.test.hdfgroup.org/", "rel": "self"},
114-
{"href": "http://tall.test.hdfgroup.org/datasets", "rel": "database"},
115-
{"href": "http://tall.test.hdfgroup.org/groups", "rel": "groupbase"},
116-
{"href": "http://tall.test.hdfgroup.org/datatypes", "rel": "typebase"},
117-
{"href": "http://tall.test.hdfgroup.org/groups/052dcbbd-9d33-11e4-86ce-3c15c2da029e", "rel": "root"}
118-
]
126+
"root": "g-be5996fa-83c5-11e8-a8e6-0242ac120016",
127+
"created": 1531174596.0696847,
128+
"owner": "admin",
129+
"class": "domain",
130+
"lastModified": 1531174596.0696847,
131+
"hrefs": [
132+
{"href": "hsdshdflab.hdfgroup.org/", "rel": "self"},
133+
{"href": "hsdshdflab.hdfgroup.org/datasets", "rel": "database"},
134+
{"href": "hsdshdflab.hdfgroup.org/groups", "rel": "groupbase"},
135+
{"href": "hsdshdflab.hdfgroup.org/datatypes", "rel": "typebase"},
136+
{"href": "hsdshdflab.hdfgroup.org/groups/g-be5996fa-83c5-11e8-a8e6-0242ac120016", "rel": "root"},
137+
{"href": "hsdshdflab.hdfgroup.org/acls", "rel": "acls"},
138+
{"href": "hsdshdflab.hdfgroup.org/?domain=/shared", "rel": "parent"}
139+
]
119140
}
120141
121142
Related Resources

DomainOps/PUT_Domain.rst

Lines changed: 39 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,14 @@ Syntax
1919
.. code-block:: http
2020
2121
PUT / HTTP/1.1
22-
Host: DOMAIN
22+
X-Hdf-domain: DOMAIN
2323
Authorization: <authorization_string>
24-
24+
25+
.. code-block:: http
26+
27+
PUT /?domain=DOMAIN HTTP/1.1
28+
Authorization: <authorization_string>
29+
2530
Request Parameters
2631
------------------
2732
This implementation of the operation does not use request parameters.
@@ -53,14 +58,18 @@ created
5358
^^^^^^^
5459
A timestamp giving the time the domain was created in UTC (ISO-8601 format).
5560

61+
owner
62+
^^^^^
63+
The user which owns the domain.
64+
5665
lastModified
5766
^^^^^^^^^^^^
5867
A timestamp giving the most recent time that any content in the domain has been
5968
modified in UTC (ISO-8601 format).
6069

61-
hrefs
62-
^^^^^
63-
An array of links to related resources. See :doc:`../Hypermedia`.
70+
acls
71+
^^^^
72+
A JSON object representing the :doc:`../AclOps/index` values for the domain.
6473

6574
Special Errors
6675
--------------
@@ -79,39 +88,43 @@ Sample Request
7988
.. code-block:: http
8089
8190
PUT / HTTP/1.1
91+
Host: hsdshdflab.hdfgroup.org
92+
X-Hdf-domain: /shared/newfile.h5
8293
Content-Length: 0
83-
User-Agent: python-requests/2.3.0 CPython/2.7.8 Darwin/14.0.0
84-
host: newfile.test.hdfgroup.org
8594
Accept: */*
8695
Accept-Encoding: gzip, deflate
87-
96+
97+
Sample cURL command
98+
-------------------
99+
100+
.. code-block:: bash
101+
102+
$ curl -X PUT -u username:password --header "X-Hdf-domain: /shared/newfile.h5" hsdshdflab.hdfgroup.org/
103+
88104
Sample Response
89105
---------------
90106

91107
.. code-block:: http
92108
93109
HTTP/1.1 201 Created
94-
Date: Fri, 16 Jan 2015 04:11:52 GMT
95-
Content-Length: 523
110+
Date: Thu, 12 Jul 2018 16:16:34 GMT
111+
Content-Length: 380
96112
Content-Type: application/json
97-
Server: TornadoServer/3.2.2
98-
113+
Server: nginx/1.15.0
114+
99115
.. code-block:: json
100116
101-
102-
{
103-
"root": "cd31cfdc-9d35-11e4-aa58-3c15c2da029e",
104-
"created": "2015-01-16T04:11:52Z",
105-
"lastModified": "2015-01-16T04:11:52Z",
106-
"hrefs": [
107-
{"href": "http://newfile.test.hdfgroup.org/", "rel": "self"},
108-
{"href": "http://newfile.test.hdfgroup.org/datasets", "rel": "database"},
109-
{"href": "http://newfile.test.hdfgroup.org/groups", "rel": "groupbase"},
110-
{"href": "http://newfile.test.hdfgroup.org/datatypes", "rel": "typebase"},
111-
{"href": "http://newfile.test.hdfgroup.org/groups/cd31cfdc-9d35-11e4-aa58-3c15c2da029e", "rel": "root"}
112-
]
113-
}
114-
117+
{
118+
"root": "g-a6915d1a-85ef-11e8-8659-0242ac12000c",
119+
"created": 1531412497.967022,
120+
"owner": "test_user1",
121+
"lastModified": 1531412497.967022,
122+
"acls": {
123+
"default": {"updateACL": false, "read": true, "delete": false, "update": false, "create": false, "readACL": false},
124+
"test_user1": {"updateACL": true, "read": true, "delete": true, "update": true, "create": true, "readACL": true}
125+
}
126+
}
127+
115128
Related Resources
116129
=================
117130

DomainOps/index.rst

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@ file in the traditional HDF5 library. In the HDF Kita implementation of the HDF
77
domains *are* files, but in general the HDF REST API supports alternative implementations
88
(e.g. data that is stored in a database).
99
Most operations of the service act on a domain resource that is provided in
10-
the *Host* http header or (alternatively) the Host query parameter.
11-
TODO: X-Hdf-domain header, domain/host query parameter
10+
the *X-Hdf-domain* http header or (alternatively) the domain query parameter.
1211

1312
Mapping of file paths to domain names
1413
-------------------------------------

0 commit comments

Comments
 (0)