Skip to content

Commit 935486c

Browse files
authored
Merge pull request #1 from jhendersonHDF/master
Add in revised docs from h5serv
2 parents ad03944 + 3142325 commit 935486c

Some content is hidden

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

66 files changed

+7835
-1
lines changed

AclOps/GET_ACL.rst

Lines changed: 171 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,171 @@
1+
**********************************************
2+
GET ACL
3+
**********************************************
4+
5+
Description
6+
===========
7+
Returns access information for the given user for the object with the UUID provided in the URI.
8+
9+
Requests
10+
========
11+
12+
Syntax
13+
------
14+
15+
To get a user's default access for a domain:
16+
17+
.. code-block:: http
18+
19+
GET /acls/<userid> HTTP/1.1
20+
Host: DOMAIN
21+
Authorization: <authorization_string>
22+
23+
To get a user's access information for a group:
24+
25+
.. code-block:: http
26+
27+
GET /groups/<id>/acls/<userid> HTTP/1.1
28+
Host: DOMAIN
29+
Authorization: <authorization_string>
30+
31+
To get a user's access information for a dataset:
32+
33+
.. code-block:: http
34+
35+
GET /datasets/<id>/acls/<userid> HTTP/1.1
36+
Host: DOMAIN
37+
Authorization: <authorization_string>
38+
39+
40+
To get a user's access information for a committed datatype:
41+
42+
.. code-block:: http
43+
44+
GET /datatypes/<id>/acls/<userid> HTTP/1.1
45+
Host: DOMAIN
46+
Authorization: <authorization_string>
47+
48+
where:
49+
50+
* <id> is the UUID of the requested dataset/group/committed datatype
51+
* <userid> is the userid for the requested user. Use the special userid "default" to get the default access permisions for the object
52+
53+
Request Parameters
54+
------------------
55+
This implementation of the operation does not use request parameters.
56+
57+
Request Headers
58+
---------------
59+
This implementation of the operation uses only the request headers that are common
60+
to most requests. See :doc:`../CommonRequestHeaders`
61+
62+
Responses
63+
=========
64+
65+
Response Headers
66+
----------------
67+
68+
This implementation of the operation uses only response headers that are common to
69+
most responses. See :doc:`../CommonResponseHeaders`.
70+
71+
Response Elements
72+
-----------------
73+
74+
On success, a JSON response will be returned with the following elements:
75+
76+
77+
acl
78+
^^^
79+
A JSON object that describes a user's access permissions. Subkeys of acl are:
80+
81+
userName: the userid of the requested user
82+
83+
create: A boolean flag that indicates if the user is authorized to create new resources
84+
85+
delete: A boolean flag that indicates if the user is authorized to delete resources
86+
87+
read: A boolean flag that indicates if the user is authorized to read (GET) resources
88+
89+
update: A boolean flag that indicates if the user is authorized to update resources
90+
91+
readACL: A boolean flag that indicates if the user is authorized to read the object's ACL
92+
93+
updateACL: A boolean flag that indicates if the user is authorized to update the object's ACL
94+
95+
96+
hrefs
97+
^^^^^
98+
An array of hypertext links to related resources. See :doc:`../Hypermedia`.
99+
100+
Special Errors
101+
--------------
102+
103+
This implementation of the operation does not return special errors. For general
104+
information on standard error codes, see :doc:`../CommonErrorResponses`.
105+
106+
Examples
107+
========
108+
109+
Sample Request
110+
--------------
111+
112+
.. code-block:: http
113+
114+
GET /groups/052dcbbd-9d33-11e4-86ce-3c15c2da029e/acls/test_user1 HTTP/1.1
115+
host: tall.test.hdfgroup.org
116+
Accept-Encoding: gzip, deflate
117+
Accept: */*
118+
User-Agent: python-requests/2.3.0 CPython/2.7.8 Darwin/14.0.0
119+
120+
Sample Response
121+
---------------
122+
123+
.. code-block:: http
124+
125+
HTTP/1.1 200 OK
126+
Date: Fri, 16 Jan 2015 20:06:08 GMT
127+
Content-Length: 660
128+
Etag: "2c410d1c469786f25ed0075571a8e7a3f313cec1"
129+
Content-Type: application/json
130+
Server: TornadoServer/3.2.2
131+
132+
.. code-block:: json
133+
134+
{
135+
"acl": {
136+
"create": false,
137+
"delete": false,
138+
"read": true,
139+
"readACL": false,
140+
"update": false,
141+
"updateACL": false,
142+
"userName": "test_user1"
143+
},
144+
"hrefs": [
145+
{
146+
"href": "http://tall_acl.test.hdfgroup.org/groups/eb8f6959-8775-11e5-96b6-3c15c2da029e/acls/test_user1",
147+
"rel": "self"
148+
},
149+
{
150+
"href": "http://tall_acl.test.hdfgroup.org/groups/eb8f6959-8775-11e5-96b6-3c15c2da029e",
151+
"rel": "root"
152+
},
153+
{
154+
"href": "http://tall_acl.test.hdfgroup.org/",
155+
"rel": "home"
156+
},
157+
{
158+
"href": "http://tall_acl.test.hdfgroup.org/groups/eb8f6959-8775-11e5-96b6-3c15c2da029e",
159+
"rel": "owner"
160+
}
161+
]
162+
163+
Related Resources
164+
=================
165+
166+
* :doc:`PUT_ACL`
167+
* :doc:`GET_ACLs`
168+
169+
170+
171+

AclOps/GET_ACLs.rst

Lines changed: 194 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,194 @@
1+
**********************************************
2+
GET ACLs
3+
**********************************************
4+
5+
Description
6+
===========
7+
Returns access information for all users defined in the ACL (Access Control List)
8+
for the object with the UUID provided in the URI.
9+
10+
Requests
11+
========
12+
13+
Syntax
14+
------
15+
16+
To get the ACL for a domain:
17+
18+
.. code-block:: http
19+
20+
GET /acls HTTP/1.1
21+
Host: DOMAIN
22+
Authorization: <authorization_string>
23+
24+
To get the ACL for a group:
25+
26+
.. code-block:: http
27+
28+
GET /groups/<id>/acls HTTP/1.1
29+
Host: DOMAIN
30+
Authorization: <authorization_string>
31+
32+
33+
To get the ACL for a dataset:
34+
35+
.. code-block:: http
36+
37+
GET /datasets/<id>/acls HTTP/1.1
38+
Host: DOMAIN
39+
Authorization: <authorization_string>
40+
41+
42+
To get the ACL for a committed datatype:
43+
44+
.. code-block:: http
45+
46+
GET /datatypes/<id>/acls HTTP/1.1
47+
Host: DOMAIN
48+
Authorization: <authorization_string>
49+
50+
where:
51+
52+
* <id> is the UUID of the requested dataset/group/committed datatype
53+
54+
Request Parameters
55+
------------------
56+
This implementation of the operation does not use request parameters.
57+
58+
Request Headers
59+
---------------
60+
This implementation of the operation uses only the request headers that are common
61+
to most requests. See :doc:`../CommonRequestHeaders`
62+
63+
Responses
64+
=========
65+
66+
Response Headers
67+
----------------
68+
69+
This implementation of the operation uses only response headers that are common to
70+
most responses. See :doc:`../CommonResponseHeaders`.
71+
72+
Response Elements
73+
-----------------
74+
75+
On success, a JSON response will be returned with the following elements:
76+
77+
78+
acls
79+
^^^^
80+
A JSON list that contains one element for each user specified in the ACL.
81+
The elements will be JSON objects that describe each user's access permissions.
82+
The subkeys of each element are:
83+
84+
userName: the userid of the user ('default' for the default access)
85+
86+
create: A boolean flag that indicates if the user is authorized to create new resources
87+
88+
delete: A boolean flag that indicates if the user is authorized to delete resources
89+
90+
read: A boolean flag that indicates if the user is authorized to read (GET) resources
91+
92+
update: A boolean flag that indicates if the user is authorized to update resources
93+
94+
readACL: A boolean flag that indicates if the user is authorized to read the object's ACL
95+
96+
updateACL: A boolean flag that indicates if the user is authorized to update the object's ACL
97+
98+
99+
hrefs
100+
^^^^^
101+
An array of hypertext links to related resources. See :doc:`../Hypermedia`.
102+
103+
Special Errors
104+
--------------
105+
106+
This implementation of the operation does not return special errors. For general
107+
information on standard error codes, see :doc:`../CommonErrorResponses`.
108+
109+
Examples
110+
========
111+
112+
Sample Request
113+
--------------
114+
115+
.. code-block:: http
116+
117+
GET /groups/052dcbbd-9d33-11e4-86ce-3c15c2da029e/acls HTTP/1.1
118+
host: tall.test.hdfgroup.org
119+
Accept-Encoding: gzip, deflate
120+
Accept: */*
121+
User-Agent: python-requests/2.3.0 CPython/2.7.8 Darwin/14.0.0
122+
123+
Sample Response
124+
---------------
125+
126+
.. code-block:: http
127+
128+
HTTP/1.1 200 OK
129+
Date: Fri, 16 Jan 2015 20:06:08 GMT
130+
Content-Length: 660
131+
Etag: "2c410d1c469786f25ed0075571a8e7a3f313cec1"
132+
Content-Type: application/json
133+
Server: TornadoServer/3.2.2
134+
135+
.. code-block:: json
136+
137+
{
138+
"acls": [
139+
{
140+
"create": true,
141+
"delete": true,
142+
"read": true,
143+
"readACL": true,
144+
"update": true,
145+
"updateACL": true,
146+
"userName": "test_user2"
147+
},
148+
{
149+
"create": false,
150+
"delete": false,
151+
"read": true,
152+
"readACL": false,
153+
"update": false,
154+
"updateACL": false,
155+
"userName": "test_user1"
156+
},
157+
{
158+
"create": false,
159+
"delete": false,
160+
"read": false,
161+
"readACL": false,
162+
"update": false,
163+
"updateACL": false,
164+
"userName": "default"
165+
}
166+
],
167+
"hrefs": [
168+
{
169+
"href": "http://tall_acl.test.hdfgroup.org/groups/eb8f6959-8775-11e5-96b6-3c15c2da029e/acls",
170+
"rel": "self"
171+
},
172+
{
173+
"href": "http://tall_acl.test.hdfgroup.org/groups/eb8f6959-8775-11e5-96b6-3c15c2da029e",
174+
"rel": "root"
175+
},
176+
{
177+
"href": "http://tall_acl.test.hdfgroup.org/",
178+
"rel": "home"
179+
},
180+
{
181+
"href": "http://tall_acl.test.hdfgroup.org/groups/eb8f6959-8775-11e5-96b6-3c15c2da029e",
182+
"rel": "owner"
183+
}
184+
]
185+
186+
Related Resources
187+
=================
188+
189+
* :doc:`PUT_ACL`
190+
* :doc:`GET_ACL`
191+
192+
193+
194+

0 commit comments

Comments
 (0)