Skip to content
Merged
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
104 changes: 0 additions & 104 deletions AdminTools.rst

This file was deleted.

75 changes: 50 additions & 25 deletions AttrOps/DELETE_Attribute.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ DELETE Attribute

Description
===========
The implementation of the DELETE operation deletes the attribute named in the URI. All
attributes and links of the dataset will also be deleted.
The implementation of the DELETE operation deletes the attribute named in the URI.

Requests
========
Expand All @@ -15,12 +14,39 @@ Syntax
.. code-block:: http

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


.. code-block:: http

DELETE /groups/<id>/<name>?domain=DOMAIN HTTP/1.1
Authorization: <authorization_string>

.. code-block:: http

DELETE /datasets/<id>/<name> HTTP/1.1
X-Hdf-domain: DOMAIN
Authorization: <authorization_string>

.. code-block:: http

DELETE /datasets/<id>/<name>?domain=DOMAIN HTTP/1.1
Authorization: <authorization_string>

.. code-block:: http

DELETE /datatypess/<id>/<name> HTTP/1.1
X-Hdf-domain: DOMAIN
Authorization: <authorization_string>

.. code-block:: http

DELETE /datatypes/<id>/<name>?domain=DOMAIN HTTP/1.1
Authorization: <authorization_string>

* *<id>* is the UUID of the dataset/group/committed datatype
* *<name>* is the url-encoded name of the requested attribute

Request Parameters
------------------
This implementation of the operation does not use request parameters.
Expand Down Expand Up @@ -62,35 +88,34 @@ Sample Request

.. code-block:: http

DELETE /groups/36ae688a-ac0e-11e4-a44b-3c15c2da029e/attributes/attr1 HTTP/1.1
Content-Length: 0
User-Agent: python-requests/2.3.0 CPython/2.7.8 Darwin/14.0.0
host: tall_updated.test.hdfgroup.org
DELETE /groups/g-45f464d8-883e-11e8-a9dc-0242ac12000e/attributes/attr1 HTTP/1.1
Host: hsdshdflab.hdfgroup.org
X-Hdf-domain: /shared/tall.h5
Accept: */*
Accept-Encoding: gzip, deflate


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

.. code-block:: bash

$ 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

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

.. code-block:: http

HTTP/1.1 200 OK
Date: Wed, 04 Feb 2015 01:36:17 GMT
Content-Length: 420
Date: Sun, 15 Jul 2018 16:06:54 GMT
Content-Length: 13
Content-Type: application/json
Server: TornadoServer/3.2.2
Server: nginx/1.15.0

.. code-block:: json

{
"hrefs": [
{"href": "http://tall_updated.test.hdfgroup.org/groups/36ae688a-ac0e-11e4-a44b-3c15c2da029e/attributes", "rel": "self"},
{"href": "http://tall_updated.test.hdfgroup.org/groups/36ae688a-ac0e-11e4-a44b-3c15c2da029e", "rel": "owner"},
{"href": "http://tall_updated.test.hdfgroup.org/groups/36ae688a-ac0e-11e4-a44b-3c15c2da029e", "rel": "root"},
{"href": "http://tall_updated.test.hdfgroup.org/", "rel": "home"}
]
}


{"hrefs": []}

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

Expand All @@ -100,6 +125,6 @@ Related Resources
* :doc:`../DatatypeOps/GET_Datatype`
* :doc:`../GroupOps/GET_Group`
* :doc:`PUT_Attribute`



91 changes: 56 additions & 35 deletions AttrOps/GET_Attribute.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,25 +17,40 @@ To get an attribute of a group:
.. code-block:: http

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


.. code-block:: http

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

To get an attribute of a dataset:

.. code-block:: http

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


.. code-block:: http

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

To get an attribute of a datatype:

.. code-block:: http

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


.. code-block:: http

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

where:

* *<id>* is the UUID of the dataset/group/committed datatype
Expand Down Expand Up @@ -105,51 +120,57 @@ Examples
Sample Request
--------------

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

.. code-block:: http

GET /groups/1a956e54-abf6-11e4-b878-3c15c2da029e/attributes/attr1 HTTP/1.1
host: tall.test.hdfgroup.org
GET /groups/g-be5996fa-83c5-11e8-a8e6-0242ac120016/attributes/attr1 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 --header "X-Hdf-domain: /shared/tall.h5" hsdshdflab.hdfgroup.org/groups/g-be5996fa-83c5-11e8-a8e6-0242ac120016/attributes/attr1

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

.. code-block:: http

HTTP/1.1 200 OK
Date: Tue, 03 Feb 2015 22:44:04 GMT
Content-Length: 648
Date: Sun, 15 Jul 2018 16:17:44 GMT
Content-Length: 522
Etag: "55b2e2ce2d3a2449a49cfd76c4dae635ec43a150"
Content-Type: application/json
Server: TornadoServer/3.2.2
Server: nginx/1.15.0

.. code-block:: json

{
"name": "attr1",
"type": {
"class": "H5T_INTEGER",
"base": "H5T_STD_I8LE"
},
"shape": {
"class": "H5S_SIMPLE",
"dims": [10]
},
"value": [97, 98, 99, 100, 101, 102, 103, 104, 105, 0],
"created": "2015-02-03T22:40:09Z",
"lastModified": "2015-02-03T22:40:09Z",
"hrefs": [
{"href": "http://tall.test.hdfgroup.org/groups/1a956e54-abf6-11e4-b878-3c15c2da029e/attributes/attr1", "rel": "self"},
{"href": "http://tall.test.hdfgroup.org/groups/1a956e54-abf6-11e4-b878-3c15c2da029e", "rel": "owner"},
{"href": "http://tall.test.hdfgroup.org/groups/1a956e54-abf6-11e4-b878-3c15c2da029e", "rel": "root"},
{"href": "http://tall.test.hdfgroup.org/", "rel": "home"}
]
"name": "attr1",
"type": {
"base": "H5T_STD_I8LE",
"class": "H5T_INTEGER"
},
"shape": {
"class": "H5S_SIMPLE",
"dims": [10]
},
"created": 1531174596.117736,
"lastModified": 1531174596.117736,
"value": [97, 98, 99, 100, 101, 102, 103, 104, 105, 0],
"hrefs": [
{"href": "hsdshdflab.hdfgroup.org/groups/g-be5996fa-83c5-11e8-a8e6-0242ac120016/attributes/attr1", "rel": "self"},
{"href": "hsdshdflab.hdfgroup.org/", "rel": "home"},
{"href": "hsdshdflab.hdfgroup.org/groups/g-be5996fa-83c5-11e8-a8e6-0242ac120016", "rel": "owner"}
]
}

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

Expand All @@ -159,6 +180,6 @@ Related Resources
* :doc:`../DatatypeOps/GET_Datatype`
* :doc:`../GroupOps/GET_Group`
* :doc:`PUT_Attribute`



Loading