Zu den Hauptinhalten
  • Bestellungen schnell und einfach aufgeben
  • Bestellungen anzeigen und den Versandstatus verfolgen
  • Profitieren Sie von exklusiven Prämien und Rabatten für Mitglieder
  • Erstellen Sie eine Liste Ihrer Produkte, auf die Sie jederzeit zugreifen können.
  • Verwalten Sie mit der Unternehmensverwaltung Ihre Dell EMC Seiten, Produkte und produktspezifischen Kontakte.

PowerScale OneFS API Reference

PDF

Set attributes on a file

Sets attributes on a specified file with the metadata query argument through the JSON body. You can also set attributes with a header when the file is created through a header with the format: x-isi-ifs-<name>=<value>.

Request syntax

PUT /namespace/<access_point>/<file_path>?metadata HTTP/1.1
Host <hostname>[:<port>]
Content-Length : <length>
Content-Type : application/JSON
Date: <date>
Authorization: <signature>

{
   "action":"<action_value>",
   "attrs":[
      {
         "name":"<key_name>",
         "value":"<key_value>",
         "namespace":"<namespace_value>",
         "op":"<operation_value>"
      },
      ...
   ]
}
NOTE:

You can modify only the <content_type> and user specified attributes. All other system attributes are ignored.

Request query parameters

Parameter Name Description Default Type Required
metadata The metadata argument must be placed at the first position of the argument list in the URI. N/A String No

Request body parameters

Parameter Name Description Default Type Required
action The values for the <action_value> field are replace or update. The <action_value> field operates in conjunction with the <operation_value> field.

To modify the existing attributes, set both <action_value> and <operation_value> fields to update.

To delete the existing attribute, set the <action_value> field to update and <operation_value> to delete.

To remove all extended attributes first and then replace the attributes with the values that are specified in the attrs parameter, set <action_value> to replace. When <action_value> is set to replace, the <operation_value> field is ignored.

update String No
op The values for the <operation_value> field are update or delete. The <operation_value> field is only applicable when <action_value> is set to update. update String No
namespace Specifies the value for the namespace that the attribute associates with a directory. This parameter must be set to user if the attributes are specified by users. user String No

Request headers

This call sends common request headers.

Response headers

This call returns common response headers.

Response body

No response body is returned upon success.

Example request

PUT /namespace/accesspoint1/my_folder/mytest.txt?metadata HTTP/1.1
Host my_cluster:8080
Content-Length : <length>
Date: <date>
Authorization: <signature>

{
   "action":"replace",
   "attrs":[
      {
         "name":"Manufacture",
         "value":"Foo",
         "namespace":"user"
      },
      {
         "name":"user.Material",
         "value":"Steel",
         "namespace":"user"
      }
   ]
}

Example response

HTTP/1.1 200 OK
Date:  Thu, 21 Mar 2013 14:33:29 GMT
Server:  Apache/2.2.21 (FreeBSD) mod_ssl/2.2.21 OpenSSL/0.9.8x mod_webkit2/1.0 mod_fastcgi/2.4.6
Allow:  DELETE, GET, HEAD, POST, PUT
x-isi-ifs-spec-version:  1.0
Vary:  Accept-Encoding
Content-Encoding:  gzip
Keep-Alive:  timeout=15, max=500
Connection:  Keep-Alive
Transfer-Encoding:  chunked
Content-Type:  text/plain

Diesen Inhalt bewerten

Präzise
Nützlich
Leicht verständlich
War dieser Artikel hilfreich?
0/3000 characters
  Bitte geben Sie eine Bewertung ab (1 bis 5 Sterne).
  Bitte geben Sie eine Bewertung ab (1 bis 5 Sterne).
  Bitte geben Sie eine Bewertung ab (1 bis 5 Sterne).
  Bitte geben Sie an, ob der Artikel hilfreich war.
  Die folgenden Sonderzeichen dürfen in Kommentaren nicht verwendet werden: <>()\