Skip to content
Draft
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
9 changes: 7 additions & 2 deletions AttrOps/DELETE_Attribute.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ DELETE Attribute

Description
===========
The implementation of the DELETE operation deletes the attribute named in the URI.
The implementation of the DELETE operation deletes the attribute named in the URI. For attributes with
names containing '/' or '#', :docs:`DELETE_Attributes` must be used.

Requests
========
Expand Down Expand Up @@ -49,7 +50,10 @@ Syntax

Request Parameters
------------------
This implementation of the operation does not use request parameters.

domain
^^^^^
The domain containing the attribute's parent object. This parameter is optional if the domain is specified in the request headers.

Request Headers
---------------
Expand Down Expand Up @@ -119,6 +123,7 @@ Sample Response
Related Resources
=================

* :docs:`DELETE_Attributes`
* :doc:`GET_Attributes`
* :doc:`GET_Attribute`
* :doc:`../DatasetOps/GET_Dataset`
Expand Down
151 changes: 151 additions & 0 deletions AttrOps/DELETE_Attributes.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,151 @@
**********************************************
DELETE Attributes
**********************************************

Description
===========
Delete a collection of attributes specified by name as a parameter.

========

Syntax
------
.. code-block:: http

DELETE /groups/<id>/attributes?attr_names=<name>/<name>/.../<name> HTTP/1.1
X-Hdf-domain: DOMAIN
Authorization: <authorization_string>

.. code-block:: http

DELETE /groups/<id>/attributes?separator=:&attr_names=<name>:<name>:...:<name> HTTP/1.1
X-Hdf-domain: DOMAIN
Authorization: <authorization_string>

.. code-block:: http

DELETE /datasets/<id>/attributes?attr_names=<name>/<name>/.../<name> HTTP/1.1
X-Hdf-domain: DOMAIN
Authorization: <authorization_string>

.. code-block:: http

DELETE /datasets/<id>/attributes?separator=:&attr_names=<name>:<name>:...:<name> HTTP/1.1
X-Hdf-domain: DOMAIN
Authorization: <authorization_string>

.. code-block:: http

DELETE /datatypes/<id>/attributes?attr_names=<name>/<name>/.../<name> HTTP/1.1
X-Hdf-domain: DOMAIN
Authorization: <authorization_string>

.. code-block:: http

DELETE /datatypes/<id>/attributes?separator=:&attr_names=<name>:<name>:...:<name> HTTP/1.1
X-Hdf-domain: DOMAIN
Authorization: <authorization_string>


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

Request Parameters
------------------

This operation requires the parameter `attr_names` to specify the attributes to delete. Other parameters are optional.

attr_names
^^^^^
The names of the attributes to delete, as a single query parameter. Each individual attribute name is separated by a separator string. This parameter is required.

separator
^^^^^
The string that separates individual attribute names in the `attr_names` parameter. This parameter is optional, with a default value of `/`.

domain
^^^^^
The domain containing the attributes' parent object. This parameter is optional if the domain is specified in the request headers.

encoding
^^^^^
The type of encoding used for the attribute names. This parameter is optional.

Request Headers
---------------
This implementation of the operation uses only the request headers that are common
to most requests. See :doc:`../CommonRequestHeaders`

Responses
=========

Response Headers
----------------

This implementation of the operation uses only response headers that are common to
most responses. See :doc:`../CommonResponseHeaders`.

Response Elements
-----------------

On success, a JSON response will be returned with the following elements:

hrefs
^^^^^
An array of links to related resources. See :doc:`../Hypermedia`.

Special Errors
--------------

This implementation of the operation does not return special errors. For general
information on standard error codes, see :doc:`../CommonErrorResponses`.

Examples
========

Sample Request
--------------

.. code-block:: http

DELETE /groups/g-45f464d8-883e-11e8-a9dc-0242ac12000e/attributes/?attr_names=attr1/attr2/attr3 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/?attr_names=attr1/attr2/attr3

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

.. code-block:: http

HTTP/1.1 200 OK
Date: Sun, 15 Jul 2018 16:06:54 GMT
Content-Length: 13
Content-Type: application/json
Server: nginx/1.15.0

.. code-block:: json

{"hrefs": []}

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

* :doc:`DELETE_Attribute`
* :doc:`GET_Attributes`
* :doc:`GET_Attribute`
* :doc:`../DatasetOps/GET_Dataset`
* :doc:`../DatatypeOps/GET_Datatype`
* :doc:`../GroupOps/GET_Group`
* :doc:`PUT_Attribute`



22 changes: 21 additions & 1 deletion AttrOps/GET_Attribute.rst
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,26 @@ where:

Request Parameters
------------------
This implementation of the operation does not use request parameters.

domain
^^^^^
The domain containing the attribute's parent object. This
parameter is optional if the domain is specified in the request headers.

ignore_nan
^^^^^
This parameter specifies whether to replace NaN values in retrieved data
with None instances. This parameter is optional and defaults to false.

IncludeData
^^^^^
This parameter specifies whether to return the data of the attributein
addition to the metadata. This parameter is optional and defaults to true.

encoding
^^^^^
What encoding the attribute is stored in. This parameter is optional,
and defaults to no encoding.

Request Headers
---------------
Expand Down Expand Up @@ -175,6 +194,7 @@ Related Resources
=================

* :doc:`DELETE_Attribute`
* :doc:`GET_AttributeValue`
* :doc:`GET_Attributes`
* :doc:`../DatasetOps/GET_Dataset`
* :doc:`../DatatypeOps/GET_Datatype`
Expand Down
Loading