Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Final update examples changes #3

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
105 changes: 60 additions & 45 deletions AclOps/GET_ACL.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,39 +17,58 @@ To get a user's default access for a domain:
.. code-block:: http

GET /acls/<userid> HTTP/1.1
Host: DOMAIN
X-Hdf-domain: DOMAIN
Authorization: <authorization_string>

.. code-block:: http

GET /acls/<userid>?domain=DOMAIN HTTP/1.1
Authorization: <authorization_string>

To get a user's access information for a group:

.. code-block:: http

GET /groups/<id>/acls/<userid> HTTP/1.1
Host: DOMAIN
X-Hdf-domain: DOMAIN
Authorization: <authorization_string>

.. code-block:: http

GET /groups/<id>/acls/<userid>?domain=DOMAIN HTTP/1.1
Authorization: <authorization_string>

To get a user's access information for a dataset:

.. code-block:: http

GET /datasets/<id>/acls/<userid> HTTP/1.1
Host: DOMAIN
X-Hdf-domain: DOMAIN
Authorization: <authorization_string>

.. code-block:: http

GET /datasets/<id>/acls/<userid>?domain=DOMAIN HTTP/1.1
Authorization: <authorization_string>


To get a user's access information for a committed datatype:

.. code-block:: http

GET /datatypes/<id>/acls/<userid> HTTP/1.1
Host: DOMAIN
X-Hdf-domain: DOMAIN
Authorization: <authorization_string>

.. code-block:: http

GET /datatypes/<id>/acls/<userid>?domain=DOMAIN HTTP/1.1
Authorization: <authorization_string>

where:
* <id> is the UUID of the requested dataset/group/committed datatype
* <userid> is the userid for the requested user. Use the special userid "default" to get the default access permisions for the object

* *<id>* is the UUID of the requested dataset/group/committed datatype
* *<userid>* is the userid for the requested user. Use the special userid "default" to get the default access permisions for the object

Request Parameters
------------------
This implementation of the operation does not use request parameters.
Expand Down Expand Up @@ -111,61 +130,57 @@ Sample Request

.. code-block:: http

GET /groups/052dcbbd-9d33-11e4-86ce-3c15c2da029e/acls/test_user1 HTTP/1.1
host: tall.test.hdfgroup.org
GET /groups/g-be5996fa-83c5-11e8-a8e6-0242ac120016/acls/default HTTP/1.1
Host: hsdshdflab.hdfgroup.org
X-Hdf-domain: /shared/tall.h5
Accept-Encoding: gzip, deflate
Accept: */*
User-Agent: python-requests/2.3.0 CPython/2.7.8 Darwin/14.0.0


Sample cURL command
-------------------

.. code-block:: bash

$ curl -X GET -u username:password --header "X-Hdf-domain: /shared/tall.h5" hsdshdflab.hdfgroup.org/groups/g-be5996fa-83c5-11e8-a8e6-0242ac120016/acls/default

Sample Response
---------------

.. code-block:: http

HTTP/1.1 200 OK
Date: Fri, 16 Jan 2015 20:06:08 GMT
Content-Length: 660
Date: Wed, 18 Jul 2018 16:21:21 GMT
Content-Length: 408
Etag: "2c410d1c469786f25ed0075571a8e7a3f313cec1"
Content-Type: application/json
Server: TornadoServer/3.2.2
Server: nginx/1.15.0

.. code-block:: json

{
"acl": {
"create": false,
"delete": false,
"read": true,
"readACL": false,
"update": false,
"updateACL": false,
"userName": "test_user1"
},
"hrefs": [
{
"href": "http://tall_acl.test.hdfgroup.org/groups/eb8f6959-8775-11e5-96b6-3c15c2da029e/acls/test_user1",
"rel": "self"
},
{
"href": "http://tall_acl.test.hdfgroup.org/groups/eb8f6959-8775-11e5-96b6-3c15c2da029e",
"rel": "root"
},
{
"href": "http://tall_acl.test.hdfgroup.org/",
"rel": "home"
"acl": {
"userName": "default",
"create": false,
"update": false,
"updateACL": false,
"read": true,
"readACL": false,
"delete": false
},
{
"href": "http://tall_acl.test.hdfgroup.org/groups/eb8f6959-8775-11e5-96b6-3c15c2da029e",
"rel": "owner"
}
]

"hrefs": [
{"rel": "self", "href": "hsdshdflab.hdfgroup.org/acls"},
{"rel": "root", "href": "hsdshdflab.hdfgroup.org/groups/g-be5996fa-83c5-11e8-a8e6-0242ac120016"},
{"rel": "home", "href": "hsdshdflab.hdfgroup.org/"},
{"rel": "owner", "href": "hsdshdflab.hdfgroup.org/"}
]
}

Related Resources
=================

* :doc:`PUT_ACL`
* :doc:`GET_ACLs`




148 changes: 82 additions & 66 deletions AclOps/GET_ACLs.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,39 +18,57 @@ To get the ACL for a domain:
.. code-block:: http

GET /acls HTTP/1.1
Host: DOMAIN
X-Hdf-domain: DOMAIN
Authorization: <authorization_string>

.. code-block:: http

GET /acls?domain=DOMAIN HTTP/1.1
Authorization: <authorization_string>

To get the ACL for a group:

.. code-block:: http

GET /groups/<id>/acls HTTP/1.1
Host: DOMAIN
X-Hdf-domain: DOMAIN
Authorization: <authorization_string>

.. code-block:: http

GET /groups/<id>/acls?domain=DOMAIN HTTP/1.1
Authorization: <authorization_string>


To get the ACL for a dataset:

.. code-block:: http

GET /datasets/<id>/acls HTTP/1.1
Host: DOMAIN
X-Hdf-domain: DOMAIN
Authorization: <authorization_string>

.. code-block:: http

GET /datasets/<id>/acls?domain=DOMAIN HTTP/1.1
Authorization: <authorization_string>


To get the ACL for a committed datatype:

.. code-block:: http

GET /datatypes/<id>/acls HTTP/1.1
Host: DOMAIN
X-Hdf-domain: DOMAIN
Authorization: <authorization_string>

.. code-block:: http

GET /datatypes/<id>/acls?domain=DOMAIN HTTP/1.1
Authorization: <authorization_string>

where:
* <id> is the UUID of the requested dataset/group/committed datatype

* *<id>* is the UUID of the requested dataset/group/committed datatype

Request Parameters
------------------
This implementation of the operation does not use request parameters.
Expand Down Expand Up @@ -114,81 +132,79 @@ Sample Request

.. code-block:: http

GET /groups/052dcbbd-9d33-11e4-86ce-3c15c2da029e/acls HTTP/1.1
host: tall.test.hdfgroup.org
GET /groups/g-be5996fa-83c5-11e8-a8e6-0242ac120016/acls HTTP/1.1
Host: hsdshdflab.hdfgroup.org
X-Hdf-domain: /shared/tall.h5
Accept-Encoding: gzip, deflate
Accept: */*
User-Agent: python-requests/2.3.0 CPython/2.7.8 Darwin/14.0.0


Sample cURL command
-------------------

.. code-block:: bash

$ curl -X GET -u username:password --header "X-Hdf-domain: /shared/tall.h5" hsdshdflab.hdfgroup.org/groups/g-be5996fa-83c5-11e8-a8e6-0242ac120016/acls

Sample Response
---------------

.. code-block:: http

HTTP/1.1 200 OK
Date: Fri, 16 Jan 2015 20:06:08 GMT
Content-Length: 660
Date: Wed, 18 Jul 2018 16:30:29 GMT
Content-Length: 701
Etag: "2c410d1c469786f25ed0075571a8e7a3f313cec1"
Content-Type: application/json
Server: TornadoServer/3.2.2
Server: nginx/1.15.0

.. code-block:: json

{
"acls": [
{
"create": true,
"delete": true,
"read": true,
"readACL": true,
"update": true,
"updateACL": true,
"userName": "test_user2"
},
{
"create": false,
"delete": false,
"read": true,
"readACL": false,
"update": false,
"updateACL": false,
"userName": "test_user1"
},
{
"create": false,
"delete": false,
"read": false,
"readACL": false,
"update": false,
"updateACL": false,
"userName": "default"
}
],
"hrefs": [
{
"href": "http://tall_acl.test.hdfgroup.org/groups/eb8f6959-8775-11e5-96b6-3c15c2da029e/acls",
"rel": "self"
},
{
"href": "http://tall_acl.test.hdfgroup.org/groups/eb8f6959-8775-11e5-96b6-3c15c2da029e",
"rel": "root"
},
{
"href": "http://tall_acl.test.hdfgroup.org/",
"rel": "home"
},
{
"href": "http://tall_acl.test.hdfgroup.org/groups/eb8f6959-8775-11e5-96b6-3c15c2da029e",
"rel": "owner"
}
]

"acls": [
{
"create": false,
"read": true,
"readACL": false,
"userName": "default",
"delete": false,
"update": false,
"updateACL": false
},
{
"create": true,
"domain": "/shared/tall.h5",
"read": true,
"readACL": true,
"userName": "test_user1",
"update": true,
"delete": true,
"updateACL": true
},
{
"create": false,
"domain": "/shared/tall.h5",
"read": true,
"readACL": false,
"userName": "test_user2",
"update": false,
"delete": false,
"updateACL": false
}
],
"hrefs": [
{"href": "hsdshdflab.hdfgroup.org/acls", "rel": "self"},
{"href": "hsdshdflab.hdfgroup.org/groups/g-be5996fa-83c5-11e8-a8e6-0242ac120016", "rel": "root"},
{"href": "hsdshdflab.hdfgroup.org/", "rel": "home"},
{"href": "hsdshdflab.hdfgroup.org/", "rel": "owner"}
]
}

Related Resources
=================

* :doc:`PUT_ACL`
* :doc:`GET_ACL`




Loading